blob: 13e3d4883f5160efe05d63f2a84d69a447eaeacf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersond4b721b2010-03-23 20:58:37 +00002# From configure.in Revision: 78964 .
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
Victor Stinner6cbf90f2010-03-25 00:21:53 +00002370save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371ac_ext=c
2372ac_cpp='$CPP $CPPFLAGS'
2373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2375ac_compiler_gnu=$ac_cv_c_compiler_gnu
2376if test -n "$ac_tool_prefix"; then
2377 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2378set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002382 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383else
2384 if test -n "$CC"; then
2385 ac_cv_prog_CC="$CC" # Let the user override the test.
2386else
Martin v. Löwis11437992002-04-12 09:54:03 +00002387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
2392 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393 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 +00002394 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 break 2
2397 fi
2398done
2399done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
Jack Jansendd19cf82001-12-06 22:36:17 +00002402fi
2403fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002404CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002405if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002406 { echo "$as_me:$LINENO: result: $CC" >&5
2407echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002409 { echo "$as_me:$LINENO: result: no" >&5
2410echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412
Martin v. Löwiseba40652007-08-30 20:10:57 +00002413
Martin v. Löwis11437992002-04-12 09:54:03 +00002414fi
2415if test -z "$ac_cv_prog_CC"; then
2416 ac_ct_CC=$CC
2417 # Extract the first word of "gcc", so it can be a program name with args.
2418set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002423else
2424 if test -n "$ac_ct_CC"; then
2425 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2426else
2427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2428for as_dir in $PATH
2429do
2430 IFS=$as_save_IFS
2431 test -z "$as_dir" && as_dir=.
2432 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433 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 +00002434 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002435 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 break 2
2437 fi
2438done
2439done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442fi
2443fi
2444ac_ct_CC=$ac_cv_prog_ac_ct_CC
2445if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002446 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2447echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002449 { echo "$as_me:$LINENO: result: no" >&5
2450echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451fi
2452
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453 if test "x$ac_ct_CC" = x; then
2454 CC=""
2455 else
2456 case $cross_compiling:$ac_tool_warned in
2457yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002458{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2459whose name does not start with the host triplet. If you think this
2460configuration is useful to you, please write to autoconf@gnu.org." >&5
2461echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2462whose name does not start with the host triplet. If you think this
2463configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464ac_tool_warned=yes ;;
2465esac
2466 CC=$ac_ct_CC
2467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002468else
2469 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002470fi
2471
Jack Jansendd19cf82001-12-06 22:36:17 +00002472if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473 if test -n "$ac_tool_prefix"; then
2474 # 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 +00002475set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002476{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002478if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002479 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002480else
2481 if test -n "$CC"; then
2482 ac_cv_prog_CC="$CC" # Let the user override the test.
2483else
Martin v. Löwis11437992002-04-12 09:54:03 +00002484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487 IFS=$as_save_IFS
2488 test -z "$as_dir" && as_dir=.
2489 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002490 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 +00002491 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002492 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 break 2
2494 fi
2495done
2496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002498
2499fi
2500fi
2501CC=$ac_cv_prog_CC
2502if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002503 { echo "$as_me:$LINENO: result: $CC" >&5
2504echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002506 { echo "$as_me:$LINENO: result: no" >&5
2507echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002508fi
2509
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002512fi
2513if test -z "$CC"; then
2514 # Extract the first word of "cc", so it can be a program name with args.
2515set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002516{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002518if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002519 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002520else
2521 if test -n "$CC"; then
2522 ac_cv_prog_CC="$CC" # Let the user override the test.
2523else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002524 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2526for as_dir in $PATH
2527do
2528 IFS=$as_save_IFS
2529 test -z "$as_dir" && as_dir=.
2530 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531 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 +00002532 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2533 ac_prog_rejected=yes
2534 continue
2535 fi
2536 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 break 2
2539 fi
2540done
2541done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002542IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002544if test $ac_prog_rejected = yes; then
2545 # We found a bogon in the path, so make sure we never use it.
2546 set dummy $ac_cv_prog_CC
2547 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002549 # We chose a different compiler from the bogus one.
2550 # However, it has the same basename, so the bogon will be chosen
2551 # first if we set CC to just the basename; use the full file name.
2552 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002554 fi
2555fi
2556fi
2557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002558CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002559if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002560 { echo "$as_me:$LINENO: result: $CC" >&5
2561echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002563 { echo "$as_me:$LINENO: result: no" >&5
2564echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002565fi
2566
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568fi
2569if test -z "$CC"; then
2570 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 do
2573 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2574set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002575{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2576echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002577if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002579else
2580 if test -n "$CC"; then
2581 ac_cv_prog_CC="$CC" # Let the user override the test.
2582else
Martin v. Löwis11437992002-04-12 09:54:03 +00002583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2584for as_dir in $PATH
2585do
2586 IFS=$as_save_IFS
2587 test -z "$as_dir" && as_dir=.
2588 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 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 +00002590 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002591 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002594done
2595done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002597
2598fi
2599fi
2600CC=$ac_cv_prog_CC
2601if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002602 { echo "$as_me:$LINENO: result: $CC" >&5
2603echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002605 { echo "$as_me:$LINENO: result: no" >&5
2606echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002607fi
2608
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 test -n "$CC" && break
2611 done
2612fi
2613if test -z "$CC"; then
2614 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002616do
2617 # Extract the first word of "$ac_prog", so it can be a program name with args.
2618set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002619{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2620echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002621if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002623else
2624 if test -n "$ac_ct_CC"; then
2625 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2626else
2627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628for as_dir in $PATH
2629do
2630 IFS=$as_save_IFS
2631 test -z "$as_dir" && as_dir=.
2632 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002633 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 +00002634 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002635 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 break 2
2637 fi
2638done
2639done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642fi
2643fi
2644ac_ct_CC=$ac_cv_prog_ac_ct_CC
2645if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002646 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2647echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649 { echo "$as_me:$LINENO: result: no" >&5
2650echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002651fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002652
Martin v. Löwiseba40652007-08-30 20:10:57 +00002653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 test -n "$ac_ct_CC" && break
2655done
Michael W. Hudson54241132001-12-07 15:38:26 +00002656
Martin v. Löwiseba40652007-08-30 20:10:57 +00002657 if test "x$ac_ct_CC" = x; then
2658 CC=""
2659 else
2660 case $cross_compiling:$ac_tool_warned in
2661yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2663whose name does not start with the host triplet. If you think this
2664configuration is useful to you, please write to autoconf@gnu.org." >&5
2665echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2666whose name does not start with the host triplet. If you think this
2667configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002668ac_tool_warned=yes ;;
2669esac
2670 CC=$ac_ct_CC
2671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002672fi
2673
2674fi
2675
2676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002677test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002678See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002679echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002680See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002681 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
2683# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002684echo "$as_me:$LINENO: checking for C compiler version" >&5
2685ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002686{ (ac_try="$ac_compiler --version >&5"
2687case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696{ (ac_try="$ac_compiler -v >&5"
2697case "(($ac_try" in
2698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2699 *) ac_try_echo=$ac_try;;
2700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002702 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002706{ (ac_try="$ac_compiler -V >&5"
2707case "(($ac_try" in
2708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709 *) ac_try_echo=$ac_try;;
2710esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002712 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 (exit $ac_status); }
2716
2717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002718/* confdefs.h. */
2719_ACEOF
2720cat confdefs.h >>conftest.$ac_ext
2721cat >>conftest.$ac_ext <<_ACEOF
2722/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002723
Martin v. Löwis11437992002-04-12 09:54:03 +00002724int
2725main ()
2726{
2727
2728 ;
2729 return 0;
2730}
2731_ACEOF
2732ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002733ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002734# Try to create an executable without -o first, disregard a.out.
2735# It will help us diagnose broken compilers, and finding out an intuition
2736# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002737{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2738echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2739ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2740#
2741# List of possible output files, starting from the most likely.
2742# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2743# only as a last resort. b.out is created by i960 compilers.
2744ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2745#
2746# The IRIX 6 linker writes into existing files which may not be
2747# executable, retaining their permissions. Remove them first so a
2748# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002749ac_rmfiles=
2750for ac_file in $ac_files
2751do
2752 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002753 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2755 esac
2756done
2757rm -f $ac_rmfiles
2758
2759if { (ac_try="$ac_link_default"
2760case "(($ac_try" in
2761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2762 *) ac_try_echo=$ac_try;;
2763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2770# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2771# in a Makefile. We should not override ac_cv_exeext if it was cached,
2772# so that the user can short-circuit this test for compilers unknown to
2773# Autoconf.
2774for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002775do
2776 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002778 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002779 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002780 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002781 # We found the default executable, but exeext='' is most
2782 # certainly right.
2783 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002784 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002785 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2786 then :; else
2787 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2788 fi
2789 # We set ac_cv_exeext here because the later test for it is not
2790 # safe: cross compilers may not add the suffix if given an `-o'
2791 # argument, so we may need to know it at that point already.
2792 # Even if this section looks crufty: it has the advantage of
2793 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002794 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002795 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002796 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 esac
2798done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002799test "$ac_cv_exeext" = no && ac_cv_exeext=
2800
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002801else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802 ac_file=''
2803fi
2804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002805{ echo "$as_me:$LINENO: result: $ac_file" >&5
2806echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002807if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002809sed 's/^/| /' conftest.$ac_ext >&5
2810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002811{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002812See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002814See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002815 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002816fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002817
Martin v. Löwis11437992002-04-12 09:54:03 +00002818ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002819
Martin v. Löwiseba40652007-08-30 20:10:57 +00002820# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002821# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002822{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2823echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002824# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2825# If not cross compiling, check that we can run a simple program.
2826if test "$cross_compiling" != yes; then
2827 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002828 { (case "(($ac_try" in
2829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2830 *) ac_try_echo=$ac_try;;
2831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002833 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 (exit $ac_status); }; }; then
2837 cross_compiling=no
2838 else
2839 if test "$cross_compiling" = maybe; then
2840 cross_compiling=yes
2841 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002843If you meant to cross compile, use \`--host'.
2844See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002845echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002846If you meant to cross compile, use \`--host'.
2847See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002848 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002849 fi
2850 fi
2851fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852{ echo "$as_me:$LINENO: result: yes" >&5
2853echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002855rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002856ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002857# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002858# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002859{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2860echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2861{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2862echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002864{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2865echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866if { (ac_try="$ac_link"
2867case "(($ac_try" in
2868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2869 *) ac_try_echo=$ac_try;;
2870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002872 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 (exit $ac_status); }; then
2876 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2877# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2878# work properly (i.e., refer to `conftest.exe'), while it won't with
2879# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002880for ac_file in conftest.exe conftest conftest.*; do
2881 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002885 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 * ) break;;
2887 esac
2888done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002890 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002891See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002893See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002894 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002895fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002896
Martin v. Löwis11437992002-04-12 09:54:03 +00002897rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2899echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002900
2901rm -f conftest.$ac_ext
2902EXEEXT=$ac_cv_exeext
2903ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002904{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2905echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002906if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002907 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002908else
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002910/* confdefs.h. */
2911_ACEOF
2912cat confdefs.h >>conftest.$ac_ext
2913cat >>conftest.$ac_ext <<_ACEOF
2914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002915
Martin v. Löwis11437992002-04-12 09:54:03 +00002916int
2917main ()
2918{
2919
2920 ;
2921 return 0;
2922}
2923_ACEOF
2924rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002925if { (ac_try="$ac_compile"
2926case "(($ac_try" in
2927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2928 *) ac_try_echo=$ac_try;;
2929esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002931 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002932 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002935 for ac_file in conftest.o conftest.obj conftest.*; do
2936 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2940 break;;
2941 esac
2942done
2943else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002945sed 's/^/| /' conftest.$ac_ext >&5
2946
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002947{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002948See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002949echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002950See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002951 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002952fi
2953
2954rm -f conftest.$ac_cv_objext conftest.$ac_ext
2955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002956{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2957echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002958OBJEXT=$ac_cv_objext
2959ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002960{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2961echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002962if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002963 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002964else
2965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002966/* confdefs.h. */
2967_ACEOF
2968cat confdefs.h >>conftest.$ac_ext
2969cat >>conftest.$ac_ext <<_ACEOF
2970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002971
Martin v. Löwis11437992002-04-12 09:54:03 +00002972int
2973main ()
2974{
2975#ifndef __GNUC__
2976 choke me
2977#endif
2978
2979 ;
2980 return 0;
2981}
2982_ACEOF
2983rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002984if { (ac_try="$ac_compile"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002992 grep -v '^ *+' conftest.er1 >conftest.err
2993 rm -f conftest.er1
2994 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996 (exit $ac_status); } && {
2997 test -z "$ac_c_werror_flag" ||
2998 test ! -s conftest.err
2999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003000 ac_compiler_gnu=yes
3001else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003003sed 's/^/| /' conftest.$ac_ext >&5
3004
Martin v. Löwiseba40652007-08-30 20:10:57 +00003005 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003009ac_cv_c_compiler_gnu=$ac_compiler_gnu
3010
3011fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003012{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3013echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3014GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003015ac_test_CFLAGS=${CFLAGS+set}
3016ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003017{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3018echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003019if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003021else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003022 ac_save_c_werror_flag=$ac_c_werror_flag
3023 ac_c_werror_flag=yes
3024 ac_cv_prog_cc_g=no
3025 CFLAGS="-g"
3026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003027/* confdefs.h. */
3028_ACEOF
3029cat confdefs.h >>conftest.$ac_ext
3030cat >>conftest.$ac_ext <<_ACEOF
3031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033int
3034main ()
3035{
3036
3037 ;
3038 return 0;
3039}
3040_ACEOF
3041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003042if { (ac_try="$ac_compile"
3043case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003050 grep -v '^ *+' conftest.er1 >conftest.err
3051 rm -f conftest.er1
3052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (exit $ac_status); } && {
3055 test -z "$ac_c_werror_flag" ||
3056 test ! -s conftest.err
3057 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003058 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003061sed 's/^/| /' conftest.$ac_ext >&5
3062
Martin v. Löwiseba40652007-08-30 20:10:57 +00003063 CFLAGS=""
3064 cat >conftest.$ac_ext <<_ACEOF
3065/* confdefs.h. */
3066_ACEOF
3067cat confdefs.h >>conftest.$ac_ext
3068cat >>conftest.$ac_ext <<_ACEOF
3069/* end confdefs.h. */
3070
3071int
3072main ()
3073{
3074
3075 ;
3076 return 0;
3077}
3078_ACEOF
3079rm -f conftest.$ac_objext
3080if { (ac_try="$ac_compile"
3081case "(($ac_try" in
3082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3083 *) ac_try_echo=$ac_try;;
3084esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003086 (eval "$ac_compile") 2>conftest.er1
3087 ac_status=$?
3088 grep -v '^ *+' conftest.er1 >conftest.err
3089 rm -f conftest.er1
3090 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092 (exit $ac_status); } && {
3093 test -z "$ac_c_werror_flag" ||
3094 test ! -s conftest.err
3095 } && test -s conftest.$ac_objext; then
3096 :
3097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003098 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099sed 's/^/| /' conftest.$ac_ext >&5
3100
3101 ac_c_werror_flag=$ac_save_c_werror_flag
3102 CFLAGS="-g"
3103 cat >conftest.$ac_ext <<_ACEOF
3104/* confdefs.h. */
3105_ACEOF
3106cat confdefs.h >>conftest.$ac_ext
3107cat >>conftest.$ac_ext <<_ACEOF
3108/* end confdefs.h. */
3109
3110int
3111main ()
3112{
3113
3114 ;
3115 return 0;
3116}
3117_ACEOF
3118rm -f conftest.$ac_objext
3119if { (ac_try="$ac_compile"
3120case "(($ac_try" in
3121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3122 *) ac_try_echo=$ac_try;;
3123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125 (eval "$ac_compile") 2>conftest.er1
3126 ac_status=$?
3127 grep -v '^ *+' conftest.er1 >conftest.err
3128 rm -f conftest.er1
3129 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003131 (exit $ac_status); } && {
3132 test -z "$ac_c_werror_flag" ||
3133 test ! -s conftest.err
3134 } && test -s conftest.$ac_objext; then
3135 ac_cv_prog_cc_g=yes
3136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003137 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003138sed 's/^/| /' conftest.$ac_ext >&5
3139
3140
Guido van Rossum627b2d71993-12-24 10:39:16 +00003141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142
3143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003145
3146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3147fi
3148
3149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3150 ac_c_werror_flag=$ac_save_c_werror_flag
3151fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003152{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3153echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003154if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003155 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003156elif test $ac_cv_prog_cc_g = yes; then
3157 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003158 CFLAGS="-g -O2"
3159 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003160 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003161 fi
3162else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003163 if test "$GCC" = yes; then
3164 CFLAGS="-O2"
3165 else
3166 CFLAGS=
3167 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003169{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3170echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003172 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003173else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003174 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003175ac_save_CC=$CC
3176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003177/* confdefs.h. */
3178_ACEOF
3179cat confdefs.h >>conftest.$ac_ext
3180cat >>conftest.$ac_ext <<_ACEOF
3181/* end confdefs.h. */
3182#include <stdarg.h>
3183#include <stdio.h>
3184#include <sys/types.h>
3185#include <sys/stat.h>
3186/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3187struct buf { int x; };
3188FILE * (*rcsopen) (struct buf *, struct stat *, int);
3189static char *e (p, i)
3190 char **p;
3191 int i;
3192{
3193 return p[i];
3194}
3195static char *f (char * (*g) (char **, int), char **p, ...)
3196{
3197 char *s;
3198 va_list v;
3199 va_start (v,p);
3200 s = g (p, va_arg (v,int));
3201 va_end (v);
3202 return s;
3203}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003204
3205/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3206 function prototypes and stuff, but not '\xHH' hex character constants.
3207 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003209 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3210 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003211 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003212int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3213
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3215 inside strings and character constants. */
3216#define FOO(x) 'x'
3217int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3218
Skip Montanaro6dead952003-09-25 14:50:04 +00003219int test (int i, double x);
3220struct s1 {int (*f) (int a);};
3221struct s2 {int (*f) (double a);};
3222int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3223int argc;
3224char **argv;
3225int
3226main ()
3227{
3228return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3229 ;
3230 return 0;
3231}
3232_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3234 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003235do
3236 CC="$ac_save_CC $ac_arg"
3237 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238if { (ac_try="$ac_compile"
3239case "(($ac_try" in
3240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3241 *) ac_try_echo=$ac_try;;
3242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003246 grep -v '^ *+' conftest.er1 >conftest.err
3247 rm -f conftest.er1
3248 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250 (exit $ac_status); } && {
3251 test -z "$ac_c_werror_flag" ||
3252 test ! -s conftest.err
3253 } && test -s conftest.$ac_objext; then
3254 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003255else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003257sed 's/^/| /' conftest.$ac_ext >&5
3258
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259
Skip Montanaro6dead952003-09-25 14:50:04 +00003260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003261
3262rm -f core conftest.err conftest.$ac_objext
3263 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003264done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003266CC=$ac_save_CC
3267
3268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003269# AC_CACHE_VAL
3270case "x$ac_cv_prog_cc_c89" in
3271 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003272 { echo "$as_me:$LINENO: result: none needed" >&5
3273echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003274 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003275 { echo "$as_me:$LINENO: result: unsupported" >&5
3276echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003277 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003278 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003279 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3280echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003281esac
3282
Skip Montanaro6dead952003-09-25 14:50:04 +00003283
Martin v. Löwis11437992002-04-12 09:54:03 +00003284ac_ext=c
3285ac_cpp='$CPP $CPPFLAGS'
3286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3288ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289
Victor Stinner6cbf90f2010-03-25 00:21:53 +00003290CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003291
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003292
3293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003294{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3295echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296
Martin v. Löwiseba40652007-08-30 20:10:57 +00003297# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300
3301 case $withval in
3302 no) with_cxx_main=no
3303 MAINCC='$(CC)';;
3304 yes) with_cxx_main=yes
3305 MAINCC='$(CXX)';;
3306 *) with_cxx_main=yes
3307 MAINCC=$withval
3308 if test -z "$CXX"
3309 then
3310 CXX=$withval
3311 fi;;
3312 esac
3313else
3314
3315 with_cxx_main=no
3316 MAINCC='$(CC)'
3317
Martin v. Löwiseba40652007-08-30 20:10:57 +00003318fi
3319
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003320{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3321echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003322
3323preset_cxx="$CXX"
3324if test -z "$CXX"
3325then
3326 case "$CC" in
3327 gcc) # Extract the first word of "g++", so it can be a program name with args.
3328set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003329{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003331if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003333else
3334 case $CXX in
3335 [\\/]* | ?:[\\/]*)
3336 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3337 ;;
3338 *)
3339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3340for as_dir in notfound
3341do
3342 IFS=$as_save_IFS
3343 test -z "$as_dir" && as_dir=.
3344 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345 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 +00003346 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003347 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003348 break 2
3349 fi
3350done
3351done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003353
3354 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3355 ;;
3356esac
3357fi
3358CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003359if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003360 { echo "$as_me:$LINENO: result: $CXX" >&5
3361echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003363 { echo "$as_me:$LINENO: result: no" >&5
3364echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003366
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003367 ;;
3368 cc) # Extract the first word of "c++", so it can be a program name with args.
3369set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003370{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3371echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003372if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003374else
3375 case $CXX in
3376 [\\/]* | ?:[\\/]*)
3377 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3378 ;;
3379 *)
3380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381for as_dir in notfound
3382do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386 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 +00003387 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003388 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003389 break 2
3390 fi
3391done
3392done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394
3395 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3396 ;;
3397esac
3398fi
3399CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003400if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003401 { echo "$as_me:$LINENO: result: $CXX" >&5
3402echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 { echo "$as_me:$LINENO: result: no" >&5
3405echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003408 ;;
3409 esac
3410 if test "$CXX" = "notfound"
3411 then
3412 CXX=""
3413 fi
3414fi
3415if test -z "$CXX"
3416then
3417 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3418do
3419 # Extract the first word of "$ac_prog", so it can be a program name with args.
3420set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003423if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003425else
3426 if test -n "$CXX"; then
3427 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3428else
3429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3430for as_dir in $PATH
3431do
3432 IFS=$as_save_IFS
3433 test -z "$as_dir" && as_dir=.
3434 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003435 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 +00003436 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003438 break 2
3439 fi
3440done
3441done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003442IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003443
3444fi
3445fi
3446CXX=$ac_cv_prog_CXX
3447if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003448 { echo "$as_me:$LINENO: result: $CXX" >&5
3449echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003451 { echo "$as_me:$LINENO: result: no" >&5
3452echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003453fi
3454
Martin v. Löwiseba40652007-08-30 20:10:57 +00003455
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003456 test -n "$CXX" && break
3457done
3458test -n "$CXX" || CXX="notfound"
3459
3460 if test "$CXX" = "notfound"
3461 then
3462 CXX=""
3463 fi
3464fi
3465if test "$preset_cxx" != "$CXX"
3466then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003467 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003468
3469 By default, distutils will build C++ extension modules with \"$CXX\".
3470 If this is not intended, then set CXX on the configure command line.
3471 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003472echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003473
3474 By default, distutils will build C++ extension modules with \"$CXX\".
3475 If this is not intended, then set CXX on the configure command line.
3476 " >&2;}
3477fi
3478
3479
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003480# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003481
3482ac_ext=c
3483ac_cpp='$CPP $CPPFLAGS'
3484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3486ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003487{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3488echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003489# On Suns, sometimes $CPP names a directory.
3490if test -n "$CPP" && test -d "$CPP"; then
3491 CPP=
3492fi
3493if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003496else
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 # Double quotes because CPP needs to be expanded
3498 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3499 do
3500 ac_preproc_ok=false
3501for ac_c_preproc_warn_flag in '' yes
3502do
3503 # Use a header file that comes with gcc, so configuring glibc
3504 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003505 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3506 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003507 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 # not just through cpp. "Syntax error" is here to catch this case.
3509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003510/* confdefs.h. */
3511_ACEOF
3512cat confdefs.h >>conftest.$ac_ext
3513cat >>conftest.$ac_ext <<_ACEOF
3514/* end confdefs.h. */
3515#ifdef __STDC__
3516# include <limits.h>
3517#else
3518# include <assert.h>
3519#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003520 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003538 :
3539else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003541sed 's/^/| /' conftest.$ac_ext >&5
3542
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 # Broken: fails on valid input.
3544continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546
Martin v. Löwis11437992002-04-12 09:54:03 +00003547rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003548
Martin v. Löwiseba40652007-08-30 20:10:57 +00003549 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # can be detected and how.
3551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003552/* confdefs.h. */
3553_ACEOF
3554cat confdefs.h >>conftest.$ac_ext
3555cat >>conftest.$ac_ext <<_ACEOF
3556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003557#include <ac_nonexistent.h>
3558_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003559if { (ac_try="$ac_cpp conftest.$ac_ext"
3560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003565 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003567 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 rm -f conftest.er1
3569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571 (exit $ac_status); } >/dev/null && {
3572 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3573 test ! -s conftest.err
3574 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 # Broken: success on invalid input.
3576continue
3577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003579sed 's/^/| /' conftest.$ac_ext >&5
3580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 # Passes both tests.
3582ac_preproc_ok=:
3583break
3584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585
Martin v. Löwis11437992002-04-12 09:54:03 +00003586rm -f conftest.err conftest.$ac_ext
3587
3588done
3589# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3590rm -f conftest.err conftest.$ac_ext
3591if $ac_preproc_ok; then
3592 break
3593fi
3594
3595 done
3596 ac_cv_prog_CPP=$CPP
3597
3598fi
3599 CPP=$ac_cv_prog_CPP
3600else
3601 ac_cv_prog_CPP=$CPP
3602fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003603{ echo "$as_me:$LINENO: result: $CPP" >&5
3604echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605ac_preproc_ok=false
3606for ac_c_preproc_warn_flag in '' yes
3607do
3608 # Use a header file that comes with gcc, so configuring glibc
3609 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003610 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3611 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 # On the NeXT, cc -E runs the code through the compiler's parser,
3613 # not just through cpp. "Syntax error" is here to catch this case.
3614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003615/* confdefs.h. */
3616_ACEOF
3617cat confdefs.h >>conftest.$ac_ext
3618cat >>conftest.$ac_ext <<_ACEOF
3619/* end confdefs.h. */
3620#ifdef __STDC__
3621# include <limits.h>
3622#else
3623# include <assert.h>
3624#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003625 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003626_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003627if { (ac_try="$ac_cpp conftest.$ac_ext"
3628case "(($ac_try" in
3629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3630 *) ac_try_echo=$ac_try;;
3631esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003635 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 rm -f conftest.er1
3637 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639 (exit $ac_status); } >/dev/null && {
3640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3641 test ! -s conftest.err
3642 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 :
3644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003646sed 's/^/| /' conftest.$ac_ext >&5
3647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 # Broken: fails on valid input.
3649continue
3650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651
Martin v. Löwis11437992002-04-12 09:54:03 +00003652rm -f conftest.err conftest.$ac_ext
3653
Martin v. Löwiseba40652007-08-30 20:10:57 +00003654 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 # can be detected and how.
3656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003657/* confdefs.h. */
3658_ACEOF
3659cat confdefs.h >>conftest.$ac_ext
3660cat >>conftest.$ac_ext <<_ACEOF
3661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003662#include <ac_nonexistent.h>
3663_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664if { (ac_try="$ac_cpp conftest.$ac_ext"
3665case "(($ac_try" in
3666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3667 *) ac_try_echo=$ac_try;;
3668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003670 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003671 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003672 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 rm -f conftest.er1
3674 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676 (exit $ac_status); } >/dev/null && {
3677 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3678 test ! -s conftest.err
3679 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 # Broken: success on invalid input.
3681continue
3682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003684sed 's/^/| /' conftest.$ac_ext >&5
3685
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 # Passes both tests.
3687ac_preproc_ok=:
3688break
3689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003690
Martin v. Löwis11437992002-04-12 09:54:03 +00003691rm -f conftest.err conftest.$ac_ext
3692
3693done
3694# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3695rm -f conftest.err conftest.$ac_ext
3696if $ac_preproc_ok; then
3697 :
3698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003700See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003701echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003702See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003703 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705
3706ac_ext=c
3707ac_cpp='$CPP $CPPFLAGS'
3708ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3709ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3710ac_compiler_gnu=$ac_cv_c_compiler_gnu
3711
3712
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003713{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3714echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003715if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003716 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003718 # Extract the first word of "grep ggrep" to use in msg output
3719if test -z "$GREP"; then
3720set dummy grep ggrep; ac_prog_name=$2
3721if test "${ac_cv_path_GREP+set}" = set; then
3722 echo $ECHO_N "(cached) $ECHO_C" >&6
3723else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003725# Loop through the user's path and test for each of PROGNAME-LIST
3726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003727for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
3731 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003732 for ac_exec_ext in '' $ac_executable_extensions; do
3733 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3734 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3735 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736 # Check for GNU $ac_path_GREP
3737case `"$ac_path_GREP" --version 2>&1` in
3738*GNU*)
3739 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3740*)
3741 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003742 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003743 while :
3744 do
3745 cat "conftest.in" "conftest.in" >"conftest.tmp"
3746 mv "conftest.tmp" "conftest.in"
3747 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3750 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3751 ac_count=`expr $ac_count + 1`
3752 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3753 # Best one so far, save it but keep looking for a better one
3754 ac_cv_path_GREP="$ac_path_GREP"
3755 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003756 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003757 # 10*(2^10) chars as input seems more than enough
3758 test $ac_count -gt 10 && break
3759 done
3760 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3761esac
3762
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003763
3764 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003765 done
3766done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767
3768done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003769IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003770
3771
3772fi
3773
3774GREP="$ac_cv_path_GREP"
3775if test -z "$GREP"; then
3776 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3777echo "$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 +00003778 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003779fi
3780
Martin v. Löwiseba40652007-08-30 20:10:57 +00003781else
3782 ac_cv_path_GREP=$GREP
3783fi
3784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003785
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003787{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3788echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789 GREP="$ac_cv_path_GREP"
3790
3791
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003792{ echo "$as_me:$LINENO: checking for egrep" >&5
3793echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003795 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003796else
3797 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3798 then ac_cv_path_EGREP="$GREP -E"
3799 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003800 # Extract the first word of "egrep" to use in msg output
3801if test -z "$EGREP"; then
3802set dummy egrep; ac_prog_name=$2
3803if test "${ac_cv_path_EGREP+set}" = set; then
3804 echo $ECHO_N "(cached) $ECHO_C" >&6
3805else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003807# Loop through the user's path and test for each of PROGNAME-LIST
3808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
3813 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003814 for ac_exec_ext in '' $ac_executable_extensions; do
3815 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3816 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3817 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818 # Check for GNU $ac_path_EGREP
3819case `"$ac_path_EGREP" --version 2>&1` in
3820*GNU*)
3821 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3822*)
3823 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003824 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825 while :
3826 do
3827 cat "conftest.in" "conftest.in" >"conftest.tmp"
3828 mv "conftest.tmp" "conftest.in"
3829 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003830 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3832 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3833 ac_count=`expr $ac_count + 1`
3834 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3835 # Best one so far, save it but keep looking for a better one
3836 ac_cv_path_EGREP="$ac_path_EGREP"
3837 ac_path_EGREP_max=$ac_count
3838 fi
3839 # 10*(2^10) chars as input seems more than enough
3840 test $ac_count -gt 10 && break
3841 done
3842 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3843esac
3844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003845
3846 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847 done
3848done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003849
3850done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003851IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003852
3853
3854fi
3855
3856EGREP="$ac_cv_path_EGREP"
3857if test -z "$EGREP"; then
3858 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3859echo "$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 +00003860 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003861fi
3862
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863else
3864 ac_cv_path_EGREP=$EGREP
3865fi
3866
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003867
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868 fi
3869fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003870{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3871echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003872 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003873
3874
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003875
3876{ echo "$as_me:$LINENO: checking for AIX" >&5
3877echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3878cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003879/* confdefs.h. */
3880_ACEOF
3881cat confdefs.h >>conftest.$ac_ext
3882cat >>conftest.$ac_ext <<_ACEOF
3883/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003884#ifdef _AIX
3885 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003886#endif
3887
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003888_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3890 $EGREP "yes" >/dev/null 2>&1; then
3891 { echo "$as_me:$LINENO: result: yes" >&5
3892echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003893cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003894#define _ALL_SOURCE 1
3895_ACEOF
3896
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003897else
3898 { echo "$as_me:$LINENO: result: no" >&5
3899echo "${ECHO_T}no" >&6; }
3900fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003901rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902
3903
3904
3905# Check for unsupported systems
3906case $ac_sys_system/$ac_sys_release in
3907atheos*|Linux*/1*)
3908 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3909 echo See README for details.
3910 exit 1;;
3911esac
3912
3913
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003914{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3915echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003916
3917# Check whether --with-suffix was given.
3918if test "${with_suffix+set}" = set; then
3919 withval=$with_suffix;
3920 case $withval in
3921 no) EXEEXT=;;
3922 yes) EXEEXT=.exe;;
3923 *) EXEEXT=$withval;;
3924 esac
3925fi
3926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003927{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3928echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003929
3930# Test whether we're running on a non-case-sensitive system, in which
3931# case we give a warning if no ext is given
3932
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003933{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3934echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003935if test ! -d CaseSensitiveTestDir; then
3936mkdir CaseSensitiveTestDir
3937fi
3938
3939if test -d casesensitivetestdir
3940then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003941 { echo "$as_me:$LINENO: result: yes" >&5
3942echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003943 BUILDEXEEXT=.exe
3944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003945 { echo "$as_me:$LINENO: result: no" >&5
3946echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003947 BUILDEXEEXT=$EXEEXT
3948fi
3949rmdir CaseSensitiveTestDir
3950
3951case $MACHDEP in
3952bsdos*)
3953 case $CC in
3954 gcc) CC="$CC -D_HAVE_BSDI";;
3955 esac;;
3956esac
3957
3958case $ac_sys_system in
3959hp*|HP*)
3960 case $CC in
3961 cc|*/cc) CC="$CC -Ae";;
3962 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003963SunOS*)
3964 # Some functions have a prototype only with that define, e.g. confstr
3965
3966cat >>confdefs.h <<\_ACEOF
3967#define __EXTENSIONS__ 1
3968_ACEOF
3969
3970 ;;
3971esac
3972
3973
3974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003975{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3976echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003977if test -z "$LIBRARY"
3978then
3979 LIBRARY='libpython$(VERSION).a'
3980fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003981{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3982echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003983
3984# LDLIBRARY is the name of the library to link against (as opposed to the
3985# name of the library into which to insert object files). BLDLIBRARY is also
3986# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3987# is blank as the main program is not linked directly against LDLIBRARY.
3988# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3989# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3990# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3991# DLLLIBRARY is the shared (i.e., DLL) library.
3992#
3993# RUNSHARED is used to run shared python without installed libraries
3994#
3995# INSTSONAME is the name of the shared library that will be use to install
3996# on the system - some systems like version suffix, others don't
3997
3998
3999
4000
4001
4002
4003LDLIBRARY="$LIBRARY"
4004BLDLIBRARY='$(LDLIBRARY)'
4005INSTSONAME='$(LDLIBRARY)'
4006DLLLIBRARY=''
4007LDLIBRARYDIR=''
4008RUNSHARED=''
4009
4010# LINKCC is the command that links the python executable -- default is $(CC).
4011# If CXX is set, and if it is needed to link a main function that was
4012# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4013# python might then depend on the C++ runtime
4014# This is altered for AIX in order to build the export list before
4015# linking.
4016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004017{ echo "$as_me:$LINENO: checking LINKCC" >&5
4018echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004019if test -z "$LINKCC"
4020then
4021 LINKCC='$(PURIFY) $(MAINCC)'
4022 case $ac_sys_system in
4023 AIX*)
4024 exp_extra="\"\""
4025 if test $ac_sys_release -ge 5 -o \
4026 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4027 exp_extra="."
4028 fi
4029 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004030 QNX*)
4031 # qcc must be used because the other compilers do not
4032 # support -N.
4033 LINKCC=qcc;;
4034 esac
4035fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004036{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4037echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004038
4039# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4040# make sure we default having it set to "no": this is used by
4041# distutils.unixccompiler to know if it should add --enable-new-dtags
4042# to linker command lines, and failing to detect GNU ld simply results
4043# in the same bahaviour as before.
4044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004045{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4046echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004047ac_prog=ld
4048if test "$GCC" = yes; then
4049 ac_prog=`$CC -print-prog-name=ld`
4050fi
4051case `"$ac_prog" -V 2>&1 < /dev/null` in
4052 *GNU*)
4053 GNULD=yes;;
4054 *)
4055 GNULD=no;;
4056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004057{ echo "$as_me:$LINENO: result: $GNULD" >&5
4058echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004059
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004060{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4061echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004062# Check whether --enable-shared was given.
4063if test "${enable_shared+set}" = set; then
4064 enableval=$enable_shared;
4065fi
4066
4067
4068if test -z "$enable_shared"
4069then
4070 case $ac_sys_system in
4071 CYGWIN* | atheos*)
4072 enable_shared="yes";;
4073 *)
4074 enable_shared="no";;
4075 esac
4076fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004077{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4078echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004079
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004080{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4081echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004082# Check whether --enable-profiling was given.
4083if test "${enable_profiling+set}" = set; then
4084 enableval=$enable_profiling; ac_save_cc="$CC"
4085 CC="$CC -pg"
4086 if test "$cross_compiling" = yes; then
4087 ac_enable_profiling="no"
4088else
4089 cat >conftest.$ac_ext <<_ACEOF
4090/* confdefs.h. */
4091_ACEOF
4092cat confdefs.h >>conftest.$ac_ext
4093cat >>conftest.$ac_ext <<_ACEOF
4094/* end confdefs.h. */
4095int main() { return 0; }
4096_ACEOF
4097rm -f conftest$ac_exeext
4098if { (ac_try="$ac_link"
4099case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004104 (eval "$ac_link") 2>&5
4105 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4108 { (case "(($ac_try" in
4109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4110 *) ac_try_echo=$ac_try;;
4111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004113 (eval "$ac_try") 2>&5
4114 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004116 (exit $ac_status); }; }; then
4117 ac_enable_profiling="yes"
4118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004119 echo "$as_me: program exited with status $ac_status" >&5
4120echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123( exit $ac_status )
4124ac_enable_profiling="no"
4125fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4127fi
4128
4129
4130 CC="$ac_save_cc"
4131fi
4132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004133{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4134echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004135
4136case "$ac_enable_profiling" in
4137 "yes")
4138 BASECFLAGS="-pg $BASECFLAGS"
4139 LDFLAGS="-pg $LDFLAGS"
4140 ;;
4141esac
4142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004143{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4144echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004145
4146# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4147# library that we build, but we do not want to link against it (we
4148# will find it with a -framework option). For this reason there is an
4149# extra variable BLDLIBRARY against which Python and the extension
4150# modules are linked, BLDLIBRARY. This is normally the same as
4151# LDLIBRARY, but empty for MacOSX framework builds.
4152if test "$enable_framework"
4153then
4154 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4155 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4156 BLDLIBRARY=''
4157else
4158 BLDLIBRARY='$(LDLIBRARY)'
4159fi
4160
4161# Other platforms follow
4162if test $enable_shared = "yes"; then
4163
4164cat >>confdefs.h <<\_ACEOF
4165#define Py_ENABLE_SHARED 1
4166_ACEOF
4167
4168 case $ac_sys_system in
4169 BeOS*)
4170 LDLIBRARY='libpython$(VERSION).so'
4171 ;;
4172 CYGWIN*)
4173 LDLIBRARY='libpython$(VERSION).dll.a'
4174 DLLLIBRARY='libpython$(VERSION).dll'
4175 ;;
4176 SunOS*)
4177 LDLIBRARY='libpython$(VERSION).so'
4178 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4179 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4180 INSTSONAME="$LDLIBRARY".$SOVERSION
4181 ;;
4182 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4183 LDLIBRARY='libpython$(VERSION).so'
4184 BLDLIBRARY='-L. -lpython$(VERSION)'
4185 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4186 case $ac_sys_system in
4187 FreeBSD*)
4188 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4189 ;;
4190 esac
4191 INSTSONAME="$LDLIBRARY".$SOVERSION
4192 ;;
4193 hp*|HP*)
4194 case `uname -m` in
4195 ia64)
4196 LDLIBRARY='libpython$(VERSION).so'
4197 ;;
4198 *)
4199 LDLIBRARY='libpython$(VERSION).sl'
4200 ;;
4201 esac
4202 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4203 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4204 ;;
4205 OSF*)
4206 LDLIBRARY='libpython$(VERSION).so'
4207 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4208 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4209 ;;
4210 atheos*)
4211 LDLIBRARY='libpython$(VERSION).so'
4212 BLDLIBRARY='-L. -lpython$(VERSION)'
4213 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4214 ;;
4215 Darwin*)
4216 LDLIBRARY='libpython$(VERSION).dylib'
4217 BLDLIBRARY='-L. -lpython$(VERSION)'
4218 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4219 ;;
4220
4221 esac
4222else # shared is disabled
4223 case $ac_sys_system in
4224 CYGWIN*)
4225 BLDLIBRARY='$(LIBRARY)'
4226 LDLIBRARY='libpython$(VERSION).dll.a'
4227 ;;
4228 esac
4229fi
4230
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004231{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4232echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004233
4234if test -n "$ac_tool_prefix"; then
4235 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4236set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004237{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004239if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004240 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004241else
4242 if test -n "$RANLIB"; then
4243 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4244else
4245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH
4247do
4248 IFS=$as_save_IFS
4249 test -z "$as_dir" && as_dir=.
4250 for ac_exec_ext in '' $ac_executable_extensions; do
4251 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4252 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004253 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004254 break 2
4255 fi
4256done
4257done
4258IFS=$as_save_IFS
4259
4260fi
4261fi
4262RANLIB=$ac_cv_prog_RANLIB
4263if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004264 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4265echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004267 { echo "$as_me:$LINENO: result: no" >&5
4268echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004269fi
4270
4271
4272fi
4273if test -z "$ac_cv_prog_RANLIB"; then
4274 ac_ct_RANLIB=$RANLIB
4275 # Extract the first word of "ranlib", so it can be a program name with args.
4276set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004279if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004280 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004281else
4282 if test -n "$ac_ct_RANLIB"; then
4283 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4284else
4285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286for as_dir in $PATH
4287do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_exec_ext in '' $ac_executable_extensions; do
4291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4292 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004294 break 2
4295 fi
4296done
4297done
4298IFS=$as_save_IFS
4299
4300fi
4301fi
4302ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4303if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004304 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4305echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004307 { echo "$as_me:$LINENO: result: no" >&5
4308echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004309fi
4310
4311 if test "x$ac_ct_RANLIB" = x; then
4312 RANLIB=":"
4313 else
4314 case $cross_compiling:$ac_tool_warned in
4315yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004316{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4317whose name does not start with the host triplet. If you think this
4318configuration is useful to you, please write to autoconf@gnu.org." >&5
4319echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4320whose name does not start with the host triplet. If you think this
4321configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004322ac_tool_warned=yes ;;
4323esac
4324 RANLIB=$ac_ct_RANLIB
4325 fi
4326else
4327 RANLIB="$ac_cv_prog_RANLIB"
4328fi
4329
4330
4331for ac_prog in ar aal
4332do
4333 # Extract the first word of "$ac_prog", so it can be a program name with args.
4334set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004337if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004338 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004339else
4340 if test -n "$AR"; then
4341 ac_cv_prog_AR="$AR" # Let the user override the test.
4342else
4343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4344for as_dir in $PATH
4345do
4346 IFS=$as_save_IFS
4347 test -z "$as_dir" && as_dir=.
4348 for ac_exec_ext in '' $ac_executable_extensions; do
4349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4350 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004352 break 2
4353 fi
4354done
4355done
4356IFS=$as_save_IFS
4357
4358fi
4359fi
4360AR=$ac_cv_prog_AR
4361if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004362 { echo "$as_me:$LINENO: result: $AR" >&5
4363echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004365 { echo "$as_me:$LINENO: result: no" >&5
4366echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004367fi
4368
4369
4370 test -n "$AR" && break
4371done
4372test -n "$AR" || AR="ar"
4373
4374
4375# tweak ARFLAGS only if the user didn't set it on the command line
4376
4377if test -z "$ARFLAGS"
4378then
4379 ARFLAGS="rc"
4380fi
4381
4382
4383# Extract the first word of "svnversion", so it can be a program name with args.
4384set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004385{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004387if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004388 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004389else
4390 if test -n "$SVNVERSION"; then
4391 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4392else
4393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4394for as_dir in $PATH
4395do
4396 IFS=$as_save_IFS
4397 test -z "$as_dir" && as_dir=.
4398 for ac_exec_ext in '' $ac_executable_extensions; do
4399 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4400 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004402 break 2
4403 fi
4404done
4405done
4406IFS=$as_save_IFS
4407
4408 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4409fi
4410fi
4411SVNVERSION=$ac_cv_prog_SVNVERSION
4412if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004413 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4414echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004416 { echo "$as_me:$LINENO: result: no" >&5
4417echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004418fi
4419
4420
4421if test $SVNVERSION = found
4422then
4423 SVNVERSION="svnversion \$(srcdir)"
4424else
4425 SVNVERSION="echo Unversioned directory"
4426fi
4427
4428case $MACHDEP in
4429bsdos*|hp*|HP*)
4430 # install -d does not work on BSDI or HP-UX
4431 if test -z "$INSTALL"
4432 then
4433 INSTALL="${srcdir}/install-sh -c"
4434 fi
4435esac
4436ac_aux_dir=
4437for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4438 if test -f "$ac_dir/install-sh"; then
4439 ac_aux_dir=$ac_dir
4440 ac_install_sh="$ac_aux_dir/install-sh -c"
4441 break
4442 elif test -f "$ac_dir/install.sh"; then
4443 ac_aux_dir=$ac_dir
4444 ac_install_sh="$ac_aux_dir/install.sh -c"
4445 break
4446 elif test -f "$ac_dir/shtool"; then
4447 ac_aux_dir=$ac_dir
4448 ac_install_sh="$ac_aux_dir/shtool install -c"
4449 break
4450 fi
4451done
4452if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004453 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4454echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004455 { (exit 1); exit 1; }; }
4456fi
4457
4458# These three variables are undocumented and unsupported,
4459# and are intended to be withdrawn in a future Autoconf release.
4460# They can cause serious problems if a builder's source tree is in a directory
4461# whose full name contains unusual characters.
4462ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4463ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4464ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4465
4466
4467# Find a good install program. We prefer a C program (faster),
4468# so one script is as good as another. But avoid the broken or
4469# incompatible versions:
4470# SysV /etc/install, /usr/sbin/install
4471# SunOS /usr/etc/install
4472# IRIX /sbin/install
4473# AIX /bin/install
4474# AmigaOS /C/install, which installs bootblocks on floppy discs
4475# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4476# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4477# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4478# OS/2's system install, which has a completely different semantic
4479# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004480{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4481echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482if test -z "$INSTALL"; then
4483if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004484 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004485else
4486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4487for as_dir in $PATH
4488do
4489 IFS=$as_save_IFS
4490 test -z "$as_dir" && as_dir=.
4491 # Account for people who put trailing slashes in PATH elements.
4492case $as_dir/ in
4493 ./ | .// | /cC/* | \
4494 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4495 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4496 /usr/ucb/* ) ;;
4497 *)
4498 # OSF1 and SCO ODT 3.0 have their own names for install.
4499 # Don't use installbsd from OSF since it installs stuff as root
4500 # by default.
4501 for ac_prog in ginstall scoinst install; do
4502 for ac_exec_ext in '' $ac_executable_extensions; do
4503 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4504 if test $ac_prog = install &&
4505 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4506 # AIX install. It has an incompatible calling convention.
4507 :
4508 elif test $ac_prog = install &&
4509 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4510 # program-specific install script used by HP pwplus--don't use.
4511 :
4512 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004513 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4514 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004515 fi
4516 fi
4517 done
4518 done
4519 ;;
4520esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004521done
4522IFS=$as_save_IFS
4523
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004524
4525fi
4526 if test "${ac_cv_path_install+set}" = set; then
4527 INSTALL=$ac_cv_path_install
4528 else
4529 # As a last resort, use the slow shell script. Don't cache a
4530 # value for INSTALL within a source directory, because that will
4531 # break other packages using the cache if that directory is
4532 # removed, or if the value is a relative name.
4533 INSTALL=$ac_install_sh
4534 fi
4535fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004536{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4537echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004538
4539# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4540# It thinks the first close brace ends the variable substitution.
4541test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4542
4543test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4544
4545test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4546
4547
4548# Not every filesystem supports hard links
4549
4550if test -z "$LN" ; then
4551 case $ac_sys_system in
4552 BeOS*) LN="ln -s";;
4553 CYGWIN*) LN="ln -s";;
4554 atheos*) LN="ln -s";;
4555 *) LN=ln;;
4556 esac
4557fi
4558
4559# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004560{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4561echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004562
4563# Check whether --with-pydebug was given.
4564if test "${with_pydebug+set}" = set; then
4565 withval=$with_pydebug;
4566if test "$withval" != no
4567then
4568
4569cat >>confdefs.h <<\_ACEOF
4570#define Py_DEBUG 1
4571_ACEOF
4572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004573 { echo "$as_me:$LINENO: result: yes" >&5
4574echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004575 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004576else { echo "$as_me:$LINENO: result: no" >&5
4577echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004578fi
4579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004580 { echo "$as_me:$LINENO: result: no" >&5
4581echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004582fi
4583
4584
4585# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4586# merged with this chunk of code?
4587
4588# Optimizer/debugger flags
4589# ------------------------
4590# (The following bit of code is complicated enough - please keep things
4591# indented properly. Just pretend you're editing Python code. ;-)
4592
4593# There are two parallel sets of case statements below, one that checks to
4594# see if OPT was set and one that does BASECFLAGS setting based upon
4595# compiler and platform. BASECFLAGS tweaks need to be made even if the
4596# user set OPT.
4597
4598# tweak OPT based on compiler and platform, only if the user didn't set
4599# it on the command line
4600
Benjamin Petersond4b721b2010-03-23 20:58:37 +00004601if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004602then
4603 case $GCC in
4604 yes)
4605 if test "$CC" != 'g++' ; then
4606 STRICT_PROTO="-Wstrict-prototypes"
4607 fi
4608 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4609 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4610 WRAP="-fwrapv"
4611 fi
4612 case $ac_cv_prog_cc_g in
4613 yes)
4614 if test "$Py_DEBUG" = 'true' ; then
4615 # Optimization messes up debuggers, so turn it off for
4616 # debug builds.
4617 OPT="-g -Wall $STRICT_PROTO"
4618 else
4619 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4620 fi
4621 ;;
4622 *)
4623 OPT="-O3 -Wall $STRICT_PROTO"
4624 ;;
4625 esac
4626 case $ac_sys_system in
4627 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4628 ;;
4629 esac
4630 ;;
4631
4632 *)
4633 OPT="-O"
4634 ;;
4635 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004636fi
4637
4638
4639
4640# The -arch flags for universal builds on OSX
4641UNIVERSAL_ARCH_FLAGS=
4642
4643
4644# tweak BASECFLAGS based on compiler and platform
4645case $GCC in
4646yes)
4647 # Python violates C99 rules, by casting between incompatible
4648 # pointer types. GCC may generate bad code as a result of that,
4649 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004650 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4651echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004652 ac_save_cc="$CC"
4653 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004654 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4655 echo $ECHO_N "(cached) $ECHO_C" >&6
4656else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004657 cat >conftest.$ac_ext <<_ACEOF
4658/* confdefs.h. */
4659_ACEOF
4660cat confdefs.h >>conftest.$ac_ext
4661cat >>conftest.$ac_ext <<_ACEOF
4662/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004663
4664int
4665main ()
4666{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004667int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004668 ;
4669 return 0;
4670}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004671_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004672rm -f conftest.$ac_objext
4673if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004674case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004679 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004680 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004681 grep -v '^ *+' conftest.er1 >conftest.err
4682 rm -f conftest.er1
4683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004685 (exit $ac_status); } && {
4686 test -z "$ac_c_werror_flag" ||
4687 test ! -s conftest.err
4688 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004689 ac_cv_no_strict_aliasing_ok=yes
4690else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004691 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692sed 's/^/| /' conftest.$ac_ext >&5
4693
Gregory P. Smith373469a2009-11-01 21:03:38 +00004694 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004695fi
4696
Gregory P. Smith373469a2009-11-01 21:03:38 +00004697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004698fi
4699
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004700 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004701 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4702echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703 if test $ac_cv_no_strict_aliasing_ok = yes
4704 then
4705 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4706 fi
4707
4708 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4709 # support. Without this, treatment of subnormals doesn't follow
4710 # the standard.
4711 case $ac_sys_machine in
4712 alpha*)
4713 BASECFLAGS="$BASECFLAGS -mieee"
4714 ;;
4715 esac
4716
4717 case $ac_sys_system in
4718 SCO_SV*)
4719 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4720 ;;
4721 # is there any other compiler on Darwin besides gcc?
4722 Darwin*)
4723 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4724 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004725 if test "${CC}" = gcc
4726 then
4727 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4728echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4729 case "${UNIVERSALSDK}" in
4730 */MacOSX10.4u.sdk)
4731 # Build using 10.4 SDK, force usage of gcc when the
4732 # compiler is gcc, otherwise the user will get very
4733 # confusing error messages when building on OSX 10.6
4734 CC=gcc-4.0
4735 CPP=cpp-4.0
4736 ;;
4737 esac
4738 { echo "$as_me:$LINENO: result: $CC" >&5
4739echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004740 fi
4741
4742 # Calculate the right deployment target for this build.
4743 #
4744 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4745 if test ${cur_target} '>' 10.2; then
4746 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004747 if test ${enable_universalsdk}; then
4748 if test "${UNIVERSAL_ARCHS}" = "all"; then
4749 # Ensure that the default platform for a
4750 # 4-way universal build is OSX 10.5,
4751 # that's the first OS release where
4752 # 4-way builds make sense.
4753 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004754
4755 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4756 cur_target='10.5'
4757
4758 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4759 cur_target='10.5'
4760
4761 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4762 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004763 fi
4764 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004765 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004766 # On Intel macs default to a deployment
4767 # target of 10.4, that's the first OSX
4768 # release with Intel support.
4769 cur_target="10.4"
4770 fi
4771 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004772 fi
4773 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4774
4775 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4776 # environment with a value that is the same as what we'll use
4777 # in the Makefile to ensure that we'll get the same compiler
4778 # environment during configure and build time.
4779 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4780 export MACOSX_DEPLOYMENT_TARGET
4781 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4782
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004783 if test "${enable_universalsdk}"; then
4784 UNIVERSAL_ARCH_FLAGS=""
4785 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4786 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4787 ARCH_RUN_32BIT=""
4788 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4789
4790
4791 # You have to use different flags on various versions of
4792 # OSX to extract PPC code from an universal binary, basically
4793 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4794 # newer.
4795 # Because '-arch pp7400' works on OSX 10.5 or higher this
4796 # test is only present in the '32-bit' branch, all other
4797 # branches require OSX 10.5 to compile.
4798
4799 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4800echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4801 FN="test.$$"
4802 cat >${FN}.c <<-EOF
4803 int main() { return 0; }
4804EOF
4805 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4806 if test $? != 0 ; then
4807 rm ${FN} ${FN}.c
4808 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4809echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4810 else
4811 lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
4812 if test $? != 0 ; then
4813 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4814 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4815echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4816 else
4817 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4818echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4819 fi
4820 rm -f ${FN} ${FN}.c ${FN}.out
4821 fi
4822
4823 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4824 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4825 LIPO_32BIT_FLAGS=""
4826 ARCH_RUN_32BIT="true"
4827
4828 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4829 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4830 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004831 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004832
4833 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4834 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4835 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004836 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004837
4838 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4839 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4840 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004841 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004842
4843 else
4844 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4845echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4846 { (exit 1); exit 1; }; }
4847
4848 fi
4849
4850
4851 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4852 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4853 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4854 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4855 CPPFLAGS="-isysroot ${UNIVERSALSDK}"
4856 fi
4857
4858 fi
4859
4860
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861 ;;
4862 OSF*)
4863 BASECFLAGS="$BASECFLAGS -mieee"
4864 ;;
4865 esac
4866 ;;
4867
4868*)
4869 case $ac_sys_system in
4870 OpenUNIX*|UnixWare*)
4871 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4872 ;;
4873 OSF*)
4874 BASECFLAGS="$BASECFLAGS -ieee -std"
4875 ;;
4876 SCO_SV*)
4877 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4878 ;;
4879 esac
4880 ;;
4881esac
4882
4883if test "$Py_DEBUG" = 'true'; then
4884 :
4885else
4886 OPT="-DNDEBUG $OPT"
4887fi
4888
4889if test "$ac_arch_flags"
4890then
4891 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4892fi
4893
4894# disable check for icc since it seems to pass, but generates a warning
4895if test "$CC" = icc
4896then
4897 ac_cv_opt_olimit_ok=no
4898fi
4899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004900{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4901echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004902if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004903 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004904else
4905 ac_save_cc="$CC"
4906CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004907cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004913
4914int
4915main ()
4916{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004918 ;
4919 return 0;
4920}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004922rm -f conftest.$ac_objext
4923if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924case "(($ac_try" in
4925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4926 *) ac_try_echo=$ac_try;;
4927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004929 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004930 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004931 grep -v '^ *+' conftest.er1 >conftest.err
4932 rm -f conftest.er1
4933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004935 (exit $ac_status); } && {
4936 test -z "$ac_c_werror_flag" ||
4937 test ! -s conftest.err
4938 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939 ac_cv_opt_olimit_ok=yes
4940else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004941 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004942sed 's/^/| /' conftest.$ac_ext >&5
4943
Gregory P. Smith373469a2009-11-01 21:03:38 +00004944 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004945fi
4946
Gregory P. Smith373469a2009-11-01 21:03:38 +00004947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004948CC="$ac_save_cc"
4949fi
4950
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004951{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4952echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004953if test $ac_cv_opt_olimit_ok = yes; then
4954 case $ac_sys_system in
4955 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4956 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4957 # environment?
4958 Darwin*)
4959 ;;
4960 *)
4961 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4962 ;;
4963 esac
4964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004965 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4966echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004967 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004968 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004969else
4970 ac_save_cc="$CC"
4971 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972 cat >conftest.$ac_ext <<_ACEOF
4973/* confdefs.h. */
4974_ACEOF
4975cat confdefs.h >>conftest.$ac_ext
4976cat >>conftest.$ac_ext <<_ACEOF
4977/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004978
4979int
4980main ()
4981{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004983 ;
4984 return 0;
4985}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004986_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004987rm -f conftest.$ac_objext
4988if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004989case "(($ac_try" in
4990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4991 *) ac_try_echo=$ac_try;;
4992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004994 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004995 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004996 grep -v '^ *+' conftest.er1 >conftest.err
4997 rm -f conftest.er1
4998 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00005000 (exit $ac_status); } && {
5001 test -z "$ac_c_werror_flag" ||
5002 test ! -s conftest.err
5003 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005004 ac_cv_olimit_ok=yes
5005else
Gregory P. Smith373469a2009-11-01 21:03:38 +00005006 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005007sed 's/^/| /' conftest.$ac_ext >&5
5008
Gregory P. Smith373469a2009-11-01 21:03:38 +00005009 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005010fi
5011
Gregory P. Smith373469a2009-11-01 21:03:38 +00005012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005013 CC="$ac_save_cc"
5014fi
5015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005016 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5017echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005018 if test $ac_cv_olimit_ok = yes; then
5019 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5020 fi
5021fi
5022
5023# Check whether GCC supports PyArg_ParseTuple format
5024if test "$GCC" = "yes"
5025then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005026 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5027echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005028 save_CFLAGS=$CFLAGS
5029 CFLAGS="$CFLAGS -Werror"
5030 cat >conftest.$ac_ext <<_ACEOF
5031/* confdefs.h. */
5032_ACEOF
5033cat confdefs.h >>conftest.$ac_ext
5034cat >>conftest.$ac_ext <<_ACEOF
5035/* end confdefs.h. */
5036
5037 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5038
5039int
5040main ()
5041{
5042
5043 ;
5044 return 0;
5045}
5046_ACEOF
5047rm -f conftest.$ac_objext
5048if { (ac_try="$ac_compile"
5049case "(($ac_try" in
5050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5051 *) ac_try_echo=$ac_try;;
5052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054 (eval "$ac_compile") 2>conftest.er1
5055 ac_status=$?
5056 grep -v '^ *+' conftest.er1 >conftest.err
5057 rm -f conftest.er1
5058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060 (exit $ac_status); } && {
5061 test -z "$ac_c_werror_flag" ||
5062 test ! -s conftest.err
5063 } && test -s conftest.$ac_objext; then
5064
5065cat >>confdefs.h <<\_ACEOF
5066#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5067_ACEOF
5068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005069 { echo "$as_me:$LINENO: result: yes" >&5
5070echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005072 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005073sed 's/^/| /' conftest.$ac_ext >&5
5074
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005075 { echo "$as_me:$LINENO: result: no" >&5
5076echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005077
5078fi
5079
5080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5081 CFLAGS=$save_CFLAGS
5082fi
5083
5084# On some compilers, pthreads are available without further options
5085# (e.g. MacOS X). On some of these systems, the compiler will not
5086# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5087# So we have to see first whether pthreads are available without
5088# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005089{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5090echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005091if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005092 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093else
5094 if test "$cross_compiling" = yes; then
5095 ac_cv_pthread_is_default=no
5096else
5097 cat >conftest.$ac_ext <<_ACEOF
5098/* confdefs.h. */
5099_ACEOF
5100cat confdefs.h >>conftest.$ac_ext
5101cat >>conftest.$ac_ext <<_ACEOF
5102/* end confdefs.h. */
5103
5104#include <pthread.h>
5105
5106void* routine(void* p){return NULL;}
5107
5108int main(){
5109 pthread_t p;
5110 if(pthread_create(&p,NULL,routine,NULL)!=0)
5111 return 1;
5112 (void)pthread_detach(p);
5113 return 0;
5114}
5115
5116_ACEOF
5117rm -f conftest$ac_exeext
5118if { (ac_try="$ac_link"
5119case "(($ac_try" in
5120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5121 *) ac_try_echo=$ac_try;;
5122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005124 (eval "$ac_link") 2>&5
5125 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5128 { (case "(($ac_try" in
5129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5130 *) ac_try_echo=$ac_try;;
5131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133 (eval "$ac_try") 2>&5
5134 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136 (exit $ac_status); }; }; then
5137
5138 ac_cv_pthread_is_default=yes
5139 ac_cv_kthread=no
5140 ac_cv_pthread=no
5141
5142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005143 echo "$as_me: program exited with status $ac_status" >&5
5144echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005145sed 's/^/| /' conftest.$ac_ext >&5
5146
5147( exit $ac_status )
5148ac_cv_pthread_is_default=no
5149fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5151fi
5152
5153
5154
5155fi
5156
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005157{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5158echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159
5160
5161if test $ac_cv_pthread_is_default = yes
5162then
5163 ac_cv_kpthread=no
5164else
5165# -Kpthread, if available, provides the right #defines
5166# and linker options to make pthread_create available
5167# Some compilers won't report that they do not support -Kpthread,
5168# so we need to run a program to see whether it really made the
5169# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005170{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5171echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005173 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005174else
5175 ac_save_cc="$CC"
5176CC="$CC -Kpthread"
5177if test "$cross_compiling" = yes; then
5178 ac_cv_kpthread=no
5179else
5180 cat >conftest.$ac_ext <<_ACEOF
5181/* confdefs.h. */
5182_ACEOF
5183cat confdefs.h >>conftest.$ac_ext
5184cat >>conftest.$ac_ext <<_ACEOF
5185/* end confdefs.h. */
5186
5187#include <pthread.h>
5188
5189void* routine(void* p){return NULL;}
5190
5191int main(){
5192 pthread_t p;
5193 if(pthread_create(&p,NULL,routine,NULL)!=0)
5194 return 1;
5195 (void)pthread_detach(p);
5196 return 0;
5197}
5198
5199_ACEOF
5200rm -f conftest$ac_exeext
5201if { (ac_try="$ac_link"
5202case "(($ac_try" in
5203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5204 *) ac_try_echo=$ac_try;;
5205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207 (eval "$ac_link") 2>&5
5208 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5211 { (case "(($ac_try" in
5212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5213 *) ac_try_echo=$ac_try;;
5214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216 (eval "$ac_try") 2>&5
5217 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005219 (exit $ac_status); }; }; then
5220 ac_cv_kpthread=yes
5221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005222 echo "$as_me: program exited with status $ac_status" >&5
5223echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224sed 's/^/| /' conftest.$ac_ext >&5
5225
5226( exit $ac_status )
5227ac_cv_kpthread=no
5228fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5230fi
5231
5232
5233CC="$ac_save_cc"
5234fi
5235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005236{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5237echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238fi
5239
5240if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5241then
5242# -Kthread, if available, provides the right #defines
5243# and linker options to make pthread_create available
5244# Some compilers won't report that they do not support -Kthread,
5245# so we need to run a program to see whether it really made the
5246# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005247{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5248echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005250 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251else
5252 ac_save_cc="$CC"
5253CC="$CC -Kthread"
5254if test "$cross_compiling" = yes; then
5255 ac_cv_kthread=no
5256else
5257 cat >conftest.$ac_ext <<_ACEOF
5258/* confdefs.h. */
5259_ACEOF
5260cat confdefs.h >>conftest.$ac_ext
5261cat >>conftest.$ac_ext <<_ACEOF
5262/* end confdefs.h. */
5263
5264#include <pthread.h>
5265
5266void* routine(void* p){return NULL;}
5267
5268int main(){
5269 pthread_t p;
5270 if(pthread_create(&p,NULL,routine,NULL)!=0)
5271 return 1;
5272 (void)pthread_detach(p);
5273 return 0;
5274}
5275
5276_ACEOF
5277rm -f conftest$ac_exeext
5278if { (ac_try="$ac_link"
5279case "(($ac_try" in
5280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5281 *) ac_try_echo=$ac_try;;
5282esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284 (eval "$ac_link") 2>&5
5285 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5288 { (case "(($ac_try" in
5289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5290 *) ac_try_echo=$ac_try;;
5291esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293 (eval "$ac_try") 2>&5
5294 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005296 (exit $ac_status); }; }; then
5297 ac_cv_kthread=yes
5298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005299 echo "$as_me: program exited with status $ac_status" >&5
5300echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301sed 's/^/| /' conftest.$ac_ext >&5
5302
5303( exit $ac_status )
5304ac_cv_kthread=no
5305fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5307fi
5308
5309
5310CC="$ac_save_cc"
5311fi
5312
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005313{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5314echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005315fi
5316
5317if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5318then
5319# -pthread, if available, provides the right #defines
5320# and linker options to make pthread_create available
5321# Some compilers won't report that they do not support -pthread,
5322# so we need to run a program to see whether it really made the
5323# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005324{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5325echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005327 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328else
5329 ac_save_cc="$CC"
5330CC="$CC -pthread"
5331if test "$cross_compiling" = yes; then
5332 ac_cv_pthread=no
5333else
5334 cat >conftest.$ac_ext <<_ACEOF
5335/* confdefs.h. */
5336_ACEOF
5337cat confdefs.h >>conftest.$ac_ext
5338cat >>conftest.$ac_ext <<_ACEOF
5339/* end confdefs.h. */
5340
5341#include <pthread.h>
5342
5343void* routine(void* p){return NULL;}
5344
5345int main(){
5346 pthread_t p;
5347 if(pthread_create(&p,NULL,routine,NULL)!=0)
5348 return 1;
5349 (void)pthread_detach(p);
5350 return 0;
5351}
5352
5353_ACEOF
5354rm -f conftest$ac_exeext
5355if { (ac_try="$ac_link"
5356case "(($ac_try" in
5357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5358 *) ac_try_echo=$ac_try;;
5359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361 (eval "$ac_link") 2>&5
5362 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005364 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5365 { (case "(($ac_try" in
5366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5367 *) ac_try_echo=$ac_try;;
5368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370 (eval "$ac_try") 2>&5
5371 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373 (exit $ac_status); }; }; then
5374 ac_cv_pthread=yes
5375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005376 echo "$as_me: program exited with status $ac_status" >&5
5377echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378sed 's/^/| /' conftest.$ac_ext >&5
5379
5380( exit $ac_status )
5381ac_cv_pthread=no
5382fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5384fi
5385
5386
5387CC="$ac_save_cc"
5388fi
5389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005390{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5391echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005392fi
5393
5394# If we have set a CC compiler flag for thread support then
5395# check if it works for CXX, too.
5396ac_cv_cxx_thread=no
5397if test ! -z "$CXX"
5398then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005399{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5400echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005401ac_save_cxx="$CXX"
5402
5403if test "$ac_cv_kpthread" = "yes"
5404then
5405 CXX="$CXX -Kpthread"
5406 ac_cv_cxx_thread=yes
5407elif test "$ac_cv_kthread" = "yes"
5408then
5409 CXX="$CXX -Kthread"
5410 ac_cv_cxx_thread=yes
5411elif test "$ac_cv_pthread" = "yes"
5412then
5413 CXX="$CXX -pthread"
5414 ac_cv_cxx_thread=yes
5415fi
5416
5417if test $ac_cv_cxx_thread = yes
5418then
5419 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5420 $CXX -c conftest.$ac_ext 2>&5
5421 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5422 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5423 then
5424 ac_cv_cxx_thread=yes
5425 else
5426 ac_cv_cxx_thread=no
5427 fi
5428 rm -fr conftest*
5429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005430{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5431echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432fi
5433CXX="$ac_save_cxx"
5434
5435
5436# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005437{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5438echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005440 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441else
5442 cat >conftest.$ac_ext <<_ACEOF
5443/* confdefs.h. */
5444_ACEOF
5445cat confdefs.h >>conftest.$ac_ext
5446cat >>conftest.$ac_ext <<_ACEOF
5447/* end confdefs.h. */
5448#include <stdlib.h>
5449#include <stdarg.h>
5450#include <string.h>
5451#include <float.h>
5452
5453int
5454main ()
5455{
5456
5457 ;
5458 return 0;
5459}
5460_ACEOF
5461rm -f conftest.$ac_objext
5462if { (ac_try="$ac_compile"
5463case "(($ac_try" in
5464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5465 *) ac_try_echo=$ac_try;;
5466esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005468 (eval "$ac_compile") 2>conftest.er1
5469 ac_status=$?
5470 grep -v '^ *+' conftest.er1 >conftest.err
5471 rm -f conftest.er1
5472 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 (exit $ac_status); } && {
5475 test -z "$ac_c_werror_flag" ||
5476 test ! -s conftest.err
5477 } && test -s conftest.$ac_objext; then
5478 ac_cv_header_stdc=yes
5479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005480 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481sed 's/^/| /' conftest.$ac_ext >&5
5482
5483 ac_cv_header_stdc=no
5484fi
5485
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5490 cat >conftest.$ac_ext <<_ACEOF
5491/* confdefs.h. */
5492_ACEOF
5493cat confdefs.h >>conftest.$ac_ext
5494cat >>conftest.$ac_ext <<_ACEOF
5495/* end confdefs.h. */
5496#include <string.h>
5497
5498_ACEOF
5499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5500 $EGREP "memchr" >/dev/null 2>&1; then
5501 :
5502else
5503 ac_cv_header_stdc=no
5504fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00005505rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506
5507fi
5508
5509if test $ac_cv_header_stdc = yes; then
5510 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5511 cat >conftest.$ac_ext <<_ACEOF
5512/* confdefs.h. */
5513_ACEOF
5514cat confdefs.h >>conftest.$ac_ext
5515cat >>conftest.$ac_ext <<_ACEOF
5516/* end confdefs.h. */
5517#include <stdlib.h>
5518
5519_ACEOF
5520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5521 $EGREP "free" >/dev/null 2>&1; then
5522 :
5523else
5524 ac_cv_header_stdc=no
5525fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00005526rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005527
5528fi
5529
5530if test $ac_cv_header_stdc = yes; then
5531 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5532 if test "$cross_compiling" = yes; then
5533 :
5534else
5535 cat >conftest.$ac_ext <<_ACEOF
5536/* confdefs.h. */
5537_ACEOF
5538cat confdefs.h >>conftest.$ac_ext
5539cat >>conftest.$ac_ext <<_ACEOF
5540/* end confdefs.h. */
5541#include <ctype.h>
5542#include <stdlib.h>
5543#if ((' ' & 0x0FF) == 0x020)
5544# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5545# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5546#else
5547# define ISLOWER(c) \
5548 (('a' <= (c) && (c) <= 'i') \
5549 || ('j' <= (c) && (c) <= 'r') \
5550 || ('s' <= (c) && (c) <= 'z'))
5551# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5552#endif
5553
5554#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5555int
5556main ()
5557{
5558 int i;
5559 for (i = 0; i < 256; i++)
5560 if (XOR (islower (i), ISLOWER (i))
5561 || toupper (i) != TOUPPER (i))
5562 return 2;
5563 return 0;
5564}
5565_ACEOF
5566rm -f conftest$ac_exeext
5567if { (ac_try="$ac_link"
5568case "(($ac_try" in
5569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5570 *) ac_try_echo=$ac_try;;
5571esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005573 (eval "$ac_link") 2>&5
5574 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5577 { (case "(($ac_try" in
5578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5579 *) ac_try_echo=$ac_try;;
5580esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005582 (eval "$ac_try") 2>&5
5583 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005585 (exit $ac_status); }; }; then
5586 :
5587else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005588 echo "$as_me: program exited with status $ac_status" >&5
5589echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590sed 's/^/| /' conftest.$ac_ext >&5
5591
5592( exit $ac_status )
5593ac_cv_header_stdc=no
5594fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5596fi
5597
5598
5599fi
5600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005601{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5602echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603if test $ac_cv_header_stdc = yes; then
5604
5605cat >>confdefs.h <<\_ACEOF
5606#define STDC_HEADERS 1
5607_ACEOF
5608
5609fi
5610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005611# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5622 inttypes.h stdint.h unistd.h
5623do
5624as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5625{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5626echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5627if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5628 echo $ECHO_N "(cached) $ECHO_C" >&6
5629else
5630 cat >conftest.$ac_ext <<_ACEOF
5631/* confdefs.h. */
5632_ACEOF
5633cat confdefs.h >>conftest.$ac_ext
5634cat >>conftest.$ac_ext <<_ACEOF
5635/* end confdefs.h. */
5636$ac_includes_default
5637
5638#include <$ac_header>
5639_ACEOF
5640rm -f conftest.$ac_objext
5641if { (ac_try="$ac_compile"
5642case "(($ac_try" in
5643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5644 *) ac_try_echo=$ac_try;;
5645esac
5646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5647 (eval "$ac_compile") 2>conftest.er1
5648 ac_status=$?
5649 grep -v '^ *+' conftest.er1 >conftest.err
5650 rm -f conftest.er1
5651 cat conftest.err >&5
5652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653 (exit $ac_status); } && {
5654 test -z "$ac_c_werror_flag" ||
5655 test ! -s conftest.err
5656 } && test -s conftest.$ac_objext; then
5657 eval "$as_ac_Header=yes"
5658else
5659 echo "$as_me: failed program was:" >&5
5660sed 's/^/| /' conftest.$ac_ext >&5
5661
5662 eval "$as_ac_Header=no"
5663fi
5664
5665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5666fi
5667ac_res=`eval echo '${'$as_ac_Header'}'`
5668 { echo "$as_me:$LINENO: result: $ac_res" >&5
5669echo "${ECHO_T}$ac_res" >&6; }
5670if test `eval echo '${'$as_ac_Header'}'` = yes; then
5671 cat >>confdefs.h <<_ACEOF
5672#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5673_ACEOF
5674
5675fi
5676
5677done
5678
5679
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680
Martin v. Löwis11437992002-04-12 09:54:03 +00005681
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
5714
5715
Anthony Baxter8a560de2004-10-13 15:30:56 +00005716
Martin v. Löwisc3001752005-01-23 09:27:24 +00005717
Martin v. Löwis11017b12006-01-14 18:12:57 +00005718
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005719
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005720
5721
5722
5723
5724
5725
5726
5727
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005728
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005729
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005730
5731
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005732
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005733
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005734
5735
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005736for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5737fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005738ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005739shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005740unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005741sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5742sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005743sys/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 +00005744sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005745sys/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 +00005746sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005747bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005748do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005749as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005750if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005751 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5752echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005753if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005754 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005755fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005756ac_res=`eval echo '${'$as_ac_Header'}'`
5757 { echo "$as_me:$LINENO: result: $ac_res" >&5
5758echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005759else
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005761{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5762echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005764/* confdefs.h. */
5765_ACEOF
5766cat confdefs.h >>conftest.$ac_ext
5767cat >>conftest.$ac_ext <<_ACEOF
5768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005769$ac_includes_default
5770#include <$ac_header>
5771_ACEOF
5772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005773if { (ac_try="$ac_compile"
5774case "(($ac_try" in
5775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5776 *) ac_try_echo=$ac_try;;
5777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005781 grep -v '^ *+' conftest.er1 >conftest.err
5782 rm -f conftest.er1
5783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005785 (exit $ac_status); } && {
5786 test -z "$ac_c_werror_flag" ||
5787 test ! -s conftest.err
5788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005792sed 's/^/| /' conftest.$ac_ext >&5
5793
Martin v. Löwiseba40652007-08-30 20:10:57 +00005794 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005796
5797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005798{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5799echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005800
5801# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005802{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5803echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005810#include <$ac_header>
5811_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005812if { (ac_try="$ac_cpp conftest.$ac_ext"
5813case "(($ac_try" in
5814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5815 *) ac_try_echo=$ac_try;;
5816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005818 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005819 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005820 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005821 rm -f conftest.er1
5822 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005824 (exit $ac_status); } >/dev/null && {
5825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5826 test ! -s conftest.err
5827 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005828 ac_header_preproc=yes
5829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005831sed 's/^/| /' conftest.$ac_ext >&5
5832
Martin v. Löwis11437992002-04-12 09:54:03 +00005833 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835
Martin v. Löwis11437992002-04-12 09:54:03 +00005836rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005837{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5838echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005839
5840# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5842 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005843 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5844echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5845 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5846echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005847 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005848 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5851echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5852 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5853echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5854 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5855echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5856 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5857echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5858 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5859echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5860 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5861echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005863## -------------------------------------- ##
5864## Report this to http://bugs.python.org/ ##
5865## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005866_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005868 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005870{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5871echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005873 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005874else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005875 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005877ac_res=`eval echo '${'$as_ac_Header'}'`
5878 { echo "$as_me:$LINENO: result: $ac_res" >&5
5879echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005880
5881fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005882if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005883 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005884#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005885_ACEOF
5886
5887fi
5888
Guido van Rossum627b2d71993-12-24 10:39:16 +00005889done
5890
Martin v. Löwis11437992002-04-12 09:54:03 +00005891
5892
5893
5894
5895
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005896ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005897for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005898 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5899{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5900echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005903else
Martin v. Löwis11437992002-04-12 09:54:03 +00005904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005905/* confdefs.h. */
5906_ACEOF
5907cat confdefs.h >>conftest.$ac_ext
5908cat >>conftest.$ac_ext <<_ACEOF
5909/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005910#include <sys/types.h>
5911#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005912
Martin v. Löwis11437992002-04-12 09:54:03 +00005913int
5914main ()
5915{
5916if ((DIR *) 0)
5917return 0;
5918 ;
5919 return 0;
5920}
5921_ACEOF
5922rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005923if { (ac_try="$ac_compile"
5924case "(($ac_try" in
5925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5926 *) ac_try_echo=$ac_try;;
5927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005931 grep -v '^ *+' conftest.er1 >conftest.err
5932 rm -f conftest.er1
5933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935 (exit $ac_status); } && {
5936 test -z "$ac_c_werror_flag" ||
5937 test ! -s conftest.err
5938 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005939 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005942sed 's/^/| /' conftest.$ac_ext >&5
5943
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946
5947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005948fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005949ac_res=`eval echo '${'$as_ac_Header'}'`
5950 { echo "$as_me:$LINENO: result: $ac_res" >&5
5951echo "${ECHO_T}$ac_res" >&6; }
5952if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005953 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005954#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005955_ACEOF
5956
5957ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005959
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960done
5961# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5962if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005963 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5964echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005965if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005967else
Martin v. Löwis11437992002-04-12 09:54:03 +00005968 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005970/* confdefs.h. */
5971_ACEOF
5972cat confdefs.h >>conftest.$ac_ext
5973cat >>conftest.$ac_ext <<_ACEOF
5974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005975
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976/* Override any GCC internal prototype to avoid an error.
5977 Use char because int might match the return type of a GCC
5978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005979#ifdef __cplusplus
5980extern "C"
5981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005982char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005983int
5984main ()
5985{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005986return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 ;
5988 return 0;
5989}
5990_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991for ac_lib in '' dir; do
5992 if test -z "$ac_lib"; then
5993 ac_res="none required"
5994 else
5995 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005996 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997 fi
5998 rm -f conftest.$ac_objext conftest$ac_exeext
5999if { (ac_try="$ac_link"
6000case "(($ac_try" in
6001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6002 *) ac_try_echo=$ac_try;;
6003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006005 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006006 ac_status=$?
6007 grep -v '^ *+' conftest.er1 >conftest.err
6008 rm -f conftest.er1
6009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006011 (exit $ac_status); } && {
6012 test -z "$ac_c_werror_flag" ||
6013 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006014 } && test -s conftest$ac_exeext &&
6015 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006017else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006018 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006019sed 's/^/| /' conftest.$ac_ext >&5
6020
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021
Brett Cannon19fab762007-06-02 03:02:29 +00006022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006023
6024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6025 conftest$ac_exeext
6026 if test "${ac_cv_search_opendir+set}" = set; then
6027 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006029done
6030if test "${ac_cv_search_opendir+set}" = set; then
6031 :
6032else
6033 ac_cv_search_opendir=no
6034fi
6035rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006036LIBS=$ac_func_search_save_LIBS
6037fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6039echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006040ac_res=$ac_cv_search_opendir
6041if test "$ac_res" != no; then
6042 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006045
Michael W. Hudson54241132001-12-07 15:38:26 +00006046else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006047 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6048echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006049if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006051else
6052 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006054/* confdefs.h. */
6055_ACEOF
6056cat confdefs.h >>conftest.$ac_ext
6057cat >>conftest.$ac_ext <<_ACEOF
6058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006059
Martin v. Löwiseba40652007-08-30 20:10:57 +00006060/* Override any GCC internal prototype to avoid an error.
6061 Use char because int might match the return type of a GCC
6062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006063#ifdef __cplusplus
6064extern "C"
6065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006066char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006067int
6068main ()
6069{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006070return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006071 ;
6072 return 0;
6073}
6074_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075for ac_lib in '' x; do
6076 if test -z "$ac_lib"; then
6077 ac_res="none required"
6078 else
6079 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006080 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006081 fi
6082 rm -f conftest.$ac_objext conftest$ac_exeext
6083if { (ac_try="$ac_link"
6084case "(($ac_try" in
6085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6086 *) ac_try_echo=$ac_try;;
6087esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006089 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006090 ac_status=$?
6091 grep -v '^ *+' conftest.er1 >conftest.err
6092 rm -f conftest.er1
6093 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006095 (exit $ac_status); } && {
6096 test -z "$ac_c_werror_flag" ||
6097 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006098 } && test -s conftest$ac_exeext &&
6099 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006100 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006101else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006102 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006103sed 's/^/| /' conftest.$ac_ext >&5
6104
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105
Brett Cannon19fab762007-06-02 03:02:29 +00006106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006107
6108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6109 conftest$ac_exeext
6110 if test "${ac_cv_search_opendir+set}" = set; then
6111 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113done
6114if test "${ac_cv_search_opendir+set}" = set; then
6115 :
6116else
6117 ac_cv_search_opendir=no
6118fi
6119rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006120LIBS=$ac_func_search_save_LIBS
6121fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006122{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6123echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124ac_res=$ac_cv_search_opendir
6125if test "$ac_res" != no; then
6126 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006128fi
6129
6130fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006132{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6133echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006135 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136else
6137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006138/* confdefs.h. */
6139_ACEOF
6140cat confdefs.h >>conftest.$ac_ext
6141cat >>conftest.$ac_ext <<_ACEOF
6142/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144int
6145main ()
6146{
6147return makedev(0, 0);
6148 ;
6149 return 0;
6150}
6151_ACEOF
6152rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153if { (ac_try="$ac_link"
6154case "(($ac_try" in
6155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6156 *) ac_try_echo=$ac_try;;
6157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006159 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006161 grep -v '^ *+' conftest.er1 >conftest.err
6162 rm -f conftest.er1
6163 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165 (exit $ac_status); } && {
6166 test -z "$ac_c_werror_flag" ||
6167 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006168 } && test -s conftest$ac_exeext &&
6169 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170 ac_cv_header_sys_types_h_makedev=yes
6171else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006173sed 's/^/| /' conftest.$ac_ext >&5
6174
Martin v. Löwiseba40652007-08-30 20:10:57 +00006175 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177
6178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180
6181fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6183echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184
6185if test $ac_cv_header_sys_types_h_makedev = no; then
6186if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006187 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6188echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006190 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006192{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6193echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194else
6195 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006196{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6197echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006199/* confdefs.h. */
6200_ACEOF
6201cat confdefs.h >>conftest.$ac_ext
6202cat >>conftest.$ac_ext <<_ACEOF
6203/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204$ac_includes_default
6205#include <sys/mkdev.h>
6206_ACEOF
6207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006208if { (ac_try="$ac_compile"
6209case "(($ac_try" in
6210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6211 *) ac_try_echo=$ac_try;;
6212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006216 grep -v '^ *+' conftest.er1 >conftest.err
6217 rm -f conftest.er1
6218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006220 (exit $ac_status); } && {
6221 test -z "$ac_c_werror_flag" ||
6222 test ! -s conftest.err
6223 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224 ac_header_compiler=yes
6225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006227sed 's/^/| /' conftest.$ac_ext >&5
6228
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006231
6232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006233{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6234echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235
6236# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6238echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006240/* confdefs.h. */
6241_ACEOF
6242cat confdefs.h >>conftest.$ac_ext
6243cat >>conftest.$ac_ext <<_ACEOF
6244/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245#include <sys/mkdev.h>
6246_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006247if { (ac_try="$ac_cpp conftest.$ac_ext"
6248case "(($ac_try" in
6249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6250 *) ac_try_echo=$ac_try;;
6251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006253 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006255 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256 rm -f conftest.er1
6257 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259 (exit $ac_status); } >/dev/null && {
6260 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6261 test ! -s conftest.err
6262 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263 ac_header_preproc=yes
6264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006266sed 's/^/| /' conftest.$ac_ext >&5
6267
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268 ac_header_preproc=no
6269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006272{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6273echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274
6275# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006276case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6277 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006278 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6279echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6280 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6281echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006282 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006283 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006284 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006285 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6286echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6287 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6288echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6289 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6290echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6291 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6292echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6293 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6294echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6295 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6296echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006297 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006298## -------------------------------------- ##
6299## Report this to http://bugs.python.org/ ##
6300## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006301_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006303 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006305{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6306echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006308 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309else
6310 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6311fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006312{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6313echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314
6315fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006316if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317
6318cat >>confdefs.h <<\_ACEOF
6319#define MAJOR_IN_MKDEV 1
6320_ACEOF
6321
6322fi
6323
6324
6325
6326 if test $ac_cv_header_sys_mkdev_h = no; then
6327 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006328 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6329echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006331 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006333{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6334echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335else
6336 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006337{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6338echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006340/* confdefs.h. */
6341_ACEOF
6342cat confdefs.h >>conftest.$ac_ext
6343cat >>conftest.$ac_ext <<_ACEOF
6344/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345$ac_includes_default
6346#include <sys/sysmacros.h>
6347_ACEOF
6348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006349if { (ac_try="$ac_compile"
6350case "(($ac_try" in
6351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6352 *) ac_try_echo=$ac_try;;
6353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006357 grep -v '^ *+' conftest.er1 >conftest.err
6358 rm -f conftest.er1
6359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006361 (exit $ac_status); } && {
6362 test -z "$ac_c_werror_flag" ||
6363 test ! -s conftest.err
6364 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006365 ac_header_compiler=yes
6366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006368sed 's/^/| /' conftest.$ac_ext >&5
6369
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372
6373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006374{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6375echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006376
6377# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006378{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6379echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006381/* confdefs.h. */
6382_ACEOF
6383cat confdefs.h >>conftest.$ac_ext
6384cat >>conftest.$ac_ext <<_ACEOF
6385/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006386#include <sys/sysmacros.h>
6387_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006388if { (ac_try="$ac_cpp conftest.$ac_ext"
6389case "(($ac_try" in
6390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6391 *) ac_try_echo=$ac_try;;
6392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006394 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006395 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006396 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006397 rm -f conftest.er1
6398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006400 (exit $ac_status); } >/dev/null && {
6401 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6402 test ! -s conftest.err
6403 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006404 ac_header_preproc=yes
6405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006407sed 's/^/| /' conftest.$ac_ext >&5
6408
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006409 ac_header_preproc=no
6410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006412rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006413{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6414echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006415
6416# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006417case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6418 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006419 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6420echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6421 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6422echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006423 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006424 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006425 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006426 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6427echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6428 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6429echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6430 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6431echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6432 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6433echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6434 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6435echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6436 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6437echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006438 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006439## -------------------------------------- ##
6440## Report this to http://bugs.python.org/ ##
6441## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006442_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006443 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006444 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006446{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6447echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006448if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006449 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006450else
6451 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006453{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6454echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006455
6456fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006457if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006458
6459cat >>confdefs.h <<\_ACEOF
6460#define MAJOR_IN_SYSMACROS 1
6461_ACEOF
6462
6463fi
6464
6465
6466 fi
6467fi
6468
Michael W. Hudson54241132001-12-07 15:38:26 +00006469
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006470# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006471
6472for ac_header in term.h
6473do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006474as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6475{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6476echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006477if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006478 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006479else
6480 cat >conftest.$ac_ext <<_ACEOF
6481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006486
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006487#ifdef HAVE_CURSES_H
6488#include <curses.h>
6489#endif
6490
6491
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006492#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006493_ACEOF
6494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006495if { (ac_try="$ac_compile"
6496case "(($ac_try" in
6497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6498 *) ac_try_echo=$ac_try;;
6499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006502 ac_status=$?
6503 grep -v '^ *+' conftest.er1 >conftest.err
6504 rm -f conftest.er1
6505 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006507 (exit $ac_status); } && {
6508 test -z "$ac_c_werror_flag" ||
6509 test ! -s conftest.err
6510 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006511 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006513 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006514sed 's/^/| /' conftest.$ac_ext >&5
6515
Martin v. Löwiseba40652007-08-30 20:10:57 +00006516 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518
6519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006520fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006521ac_res=`eval echo '${'$as_ac_Header'}'`
6522 { echo "$as_me:$LINENO: result: $ac_res" >&5
6523echo "${ECHO_T}$ac_res" >&6; }
6524if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006525 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006526#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006527_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006528
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006529fi
6530
6531done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006532
6533
Martin v. Löwis11017b12006-01-14 18:12:57 +00006534# On Linux, netlink.h requires asm/types.h
6535
6536for ac_header in linux/netlink.h
6537do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6539{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6540echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006541if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006543else
6544 cat >conftest.$ac_ext <<_ACEOF
6545/* confdefs.h. */
6546_ACEOF
6547cat confdefs.h >>conftest.$ac_ext
6548cat >>conftest.$ac_ext <<_ACEOF
6549/* end confdefs.h. */
6550
6551#ifdef HAVE_ASM_TYPES_H
6552#include <asm/types.h>
6553#endif
6554#ifdef HAVE_SYS_SOCKET_H
6555#include <sys/socket.h>
6556#endif
6557
6558
6559#include <$ac_header>
6560_ACEOF
6561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562if { (ac_try="$ac_compile"
6563case "(($ac_try" in
6564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6565 *) ac_try_echo=$ac_try;;
6566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006569 ac_status=$?
6570 grep -v '^ *+' conftest.er1 >conftest.err
6571 rm -f conftest.er1
6572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006574 (exit $ac_status); } && {
6575 test -z "$ac_c_werror_flag" ||
6576 test ! -s conftest.err
6577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006578 eval "$as_ac_Header=yes"
6579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006580 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006581sed 's/^/| /' conftest.$ac_ext >&5
6582
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006585
6586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006587fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006588ac_res=`eval echo '${'$as_ac_Header'}'`
6589 { echo "$as_me:$LINENO: result: $ac_res" >&5
6590echo "${ECHO_T}$ac_res" >&6; }
6591if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006592 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006593#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006594_ACEOF
6595
6596fi
6597
6598done
6599
6600
Guido van Rossum627b2d71993-12-24 10:39:16 +00006601# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006602was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006603{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6604echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006606/* confdefs.h. */
6607_ACEOF
6608cat confdefs.h >>conftest.$ac_ext
6609cat >>conftest.$ac_ext <<_ACEOF
6610/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006611#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006612
6613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006615 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006616 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006617else
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619
6620cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006622_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006623
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006624
Guido van Rossum627b2d71993-12-24 10:39:16 +00006625fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00006626rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006628{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6629echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006630
Neal Norwitz11690112002-07-30 01:08:28 +00006631# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006632{ echo "$as_me:$LINENO: checking for makedev" >&5
6633echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006635/* confdefs.h. */
6636_ACEOF
6637cat confdefs.h >>conftest.$ac_ext
6638cat >>conftest.$ac_ext <<_ACEOF
6639/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006640#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006641int
6642main ()
6643{
6644 makedev(0, 0)
6645 ;
6646 return 0;
6647}
6648_ACEOF
6649rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650if { (ac_try="$ac_link"
6651case "(($ac_try" in
6652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6653 *) ac_try_echo=$ac_try;;
6654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006656 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006658 grep -v '^ *+' conftest.er1 >conftest.err
6659 rm -f conftest.er1
6660 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006662 (exit $ac_status); } && {
6663 test -z "$ac_c_werror_flag" ||
6664 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006665 } && test -s conftest$ac_exeext &&
6666 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006667 ac_cv_has_makedev=yes
6668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006670sed 's/^/| /' conftest.$ac_ext >&5
6671
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674
6675rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006676 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006677if test "$ac_cv_has_makedev" = "no"; then
6678 # we didn't link, try if _OSF_SOURCE will allow us to link
6679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006680/* confdefs.h. */
6681_ACEOF
6682cat confdefs.h >>conftest.$ac_ext
6683cat >>conftest.$ac_ext <<_ACEOF
6684/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006685
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006686#define _OSF_SOURCE 1
6687#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006688
Neal Norwitz11690112002-07-30 01:08:28 +00006689int
6690main ()
6691{
6692 makedev(0, 0)
6693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006698if { (ac_try="$ac_link"
6699case "(($ac_try" in
6700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6701 *) ac_try_echo=$ac_try;;
6702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006706 grep -v '^ *+' conftest.er1 >conftest.err
6707 rm -f conftest.er1
6708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006710 (exit $ac_status); } && {
6711 test -z "$ac_c_werror_flag" ||
6712 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006713 } && test -s conftest$ac_exeext &&
6714 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006715 ac_cv_has_makedev=yes
6716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006718sed 's/^/| /' conftest.$ac_ext >&5
6719
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722
6723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006724 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006725 if test "$ac_cv_has_makedev" = "yes"; then
6726
6727cat >>confdefs.h <<\_ACEOF
6728#define _OSF_SOURCE 1
6729_ACEOF
6730
6731 fi
6732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006733{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6734echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006735if test "$ac_cv_has_makedev" = "yes"; then
6736
6737cat >>confdefs.h <<\_ACEOF
6738#define HAVE_MAKEDEV 1
6739_ACEOF
6740
6741fi
6742
Martin v. Löwis399a6892002-10-04 10:22:02 +00006743# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6744# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6745# defined, but the compiler does not support pragma redefine_extname,
6746# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6747# structures (such as rlimit64) without declaring them. As a
6748# work-around, disable LFS on such configurations
6749
6750use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006751{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6752echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006759
6760#define _LARGEFILE_SOURCE 1
6761#define _FILE_OFFSET_BITS 64
6762#include <sys/resource.h>
6763
Martin v. Löwis399a6892002-10-04 10:22:02 +00006764int
6765main ()
6766{
6767struct rlimit foo;
6768 ;
6769 return 0;
6770}
6771_ACEOF
6772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773if { (ac_try="$ac_compile"
6774case "(($ac_try" in
6775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6776 *) ac_try_echo=$ac_try;;
6777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006781 grep -v '^ *+' conftest.er1 >conftest.err
6782 rm -f conftest.er1
6783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785 (exit $ac_status); } && {
6786 test -z "$ac_c_werror_flag" ||
6787 test ! -s conftest.err
6788 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006789 sol_lfs_bug=no
6790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006792sed 's/^/| /' conftest.$ac_ext >&5
6793
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796
6797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006798{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6799echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006800if test "$sol_lfs_bug" = "yes"; then
6801 use_lfs=no
6802fi
6803
6804if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006805# Two defines needed to enable largefile support on various platforms
6806# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808cat >>confdefs.h <<\_ACEOF
6809#define _LARGEFILE_SOURCE 1
6810_ACEOF
6811
6812
6813cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006814#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006815_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006816
Martin v. Löwis399a6892002-10-04 10:22:02 +00006817fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006818
Guido van Rossum84e7b241996-08-19 21:59:00 +00006819# Add some code to confdefs.h so that the test for off_t works on SCO
6820cat >> confdefs.h <<\EOF
6821#if defined(SCO_DS)
6822#undef _OFF_T
6823#endif
6824EOF
6825
Guido van Rossumef2255b2000-03-10 22:30:29 +00006826# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006827{ echo "$as_me:$LINENO: checking for mode_t" >&5
6828echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006829if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006831else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006832 cat >conftest.$ac_ext <<_ACEOF
6833/* confdefs.h. */
6834_ACEOF
6835cat confdefs.h >>conftest.$ac_ext
6836cat >>conftest.$ac_ext <<_ACEOF
6837/* end confdefs.h. */
6838$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006840int
6841main ()
6842{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006843if ((ac__type_new_ *) 0)
6844 return 0;
6845if (sizeof (ac__type_new_))
6846 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006847 ;
6848 return 0;
6849}
6850_ACEOF
6851rm -f conftest.$ac_objext
6852if { (ac_try="$ac_compile"
6853case "(($ac_try" in
6854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6855 *) ac_try_echo=$ac_try;;
6856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006858 (eval "$ac_compile") 2>conftest.er1
6859 ac_status=$?
6860 grep -v '^ *+' conftest.er1 >conftest.err
6861 rm -f conftest.er1
6862 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864 (exit $ac_status); } && {
6865 test -z "$ac_c_werror_flag" ||
6866 test ! -s conftest.err
6867 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006868 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006869else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006871sed 's/^/| /' conftest.$ac_ext >&5
6872
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006873 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875
6876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006877fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6879echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6880if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006882else
Martin v. Löwis11437992002-04-12 09:54:03 +00006883
6884cat >>confdefs.h <<_ACEOF
6885#define mode_t int
6886_ACEOF
6887
6888fi
6889
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006890{ echo "$as_me:$LINENO: checking for off_t" >&5
6891echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006892if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006894else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006895 cat >conftest.$ac_ext <<_ACEOF
6896/* confdefs.h. */
6897_ACEOF
6898cat confdefs.h >>conftest.$ac_ext
6899cat >>conftest.$ac_ext <<_ACEOF
6900/* end confdefs.h. */
6901$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006903int
6904main ()
6905{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006906if ((ac__type_new_ *) 0)
6907 return 0;
6908if (sizeof (ac__type_new_))
6909 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006910 ;
6911 return 0;
6912}
6913_ACEOF
6914rm -f conftest.$ac_objext
6915if { (ac_try="$ac_compile"
6916case "(($ac_try" in
6917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6918 *) ac_try_echo=$ac_try;;
6919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006921 (eval "$ac_compile") 2>conftest.er1
6922 ac_status=$?
6923 grep -v '^ *+' conftest.er1 >conftest.err
6924 rm -f conftest.er1
6925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006927 (exit $ac_status); } && {
6928 test -z "$ac_c_werror_flag" ||
6929 test ! -s conftest.err
6930 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006931 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006934sed 's/^/| /' conftest.$ac_ext >&5
6935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006936 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938
6939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006940fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006941{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6942echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6943if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945else
Martin v. Löwis11437992002-04-12 09:54:03 +00006946
6947cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006949_ACEOF
6950
6951fi
6952
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006953{ echo "$as_me:$LINENO: checking for pid_t" >&5
6954echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006955if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006957else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006958 cat >conftest.$ac_ext <<_ACEOF
6959/* confdefs.h. */
6960_ACEOF
6961cat confdefs.h >>conftest.$ac_ext
6962cat >>conftest.$ac_ext <<_ACEOF
6963/* end confdefs.h. */
6964$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006965typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006966int
6967main ()
6968{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006969if ((ac__type_new_ *) 0)
6970 return 0;
6971if (sizeof (ac__type_new_))
6972 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006973 ;
6974 return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext
6978if { (ac_try="$ac_compile"
6979case "(($ac_try" in
6980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6981 *) ac_try_echo=$ac_try;;
6982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006984 (eval "$ac_compile") 2>conftest.er1
6985 ac_status=$?
6986 grep -v '^ *+' conftest.er1 >conftest.err
6987 rm -f conftest.er1
6988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006990 (exit $ac_status); } && {
6991 test -z "$ac_c_werror_flag" ||
6992 test ! -s conftest.err
6993 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006994 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006997sed 's/^/| /' conftest.$ac_ext >&5
6998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006999 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007001
7002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007003fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007004{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7005echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
7006if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008else
Martin v. Löwis11437992002-04-12 09:54:03 +00007009
7010cat >>confdefs.h <<_ACEOF
7011#define pid_t int
7012_ACEOF
7013
7014fi
7015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007016{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7017echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007018if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007020else
7021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007022/* confdefs.h. */
7023_ACEOF
7024cat confdefs.h >>conftest.$ac_ext
7025cat >>conftest.$ac_ext <<_ACEOF
7026/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007027#include <sys/types.h>
7028#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007029
Martin v. Löwis11437992002-04-12 09:54:03 +00007030int
7031main ()
7032{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007034 ;
7035 return 0;
7036}
7037_ACEOF
7038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039if { (ac_try="$ac_compile"
7040case "(($ac_try" in
7041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7042 *) ac_try_echo=$ac_try;;
7043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007047 grep -v '^ *+' conftest.er1 >conftest.err
7048 rm -f conftest.er1
7049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007051 (exit $ac_status); } && {
7052 test -z "$ac_c_werror_flag" ||
7053 test ! -s conftest.err
7054 } && test -s conftest.$ac_objext; then
7055 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007056else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007058sed 's/^/| /' conftest.$ac_ext >&5
7059
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062
7063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007065{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7066echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007067
Martin v. Löwis11437992002-04-12 09:54:03 +00007068cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007069#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007070_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007071
Michael W. Hudson54241132001-12-07 15:38:26 +00007072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007073{ echo "$as_me:$LINENO: checking for size_t" >&5
7074echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007075if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007078 cat >conftest.$ac_ext <<_ACEOF
7079/* confdefs.h. */
7080_ACEOF
7081cat confdefs.h >>conftest.$ac_ext
7082cat >>conftest.$ac_ext <<_ACEOF
7083/* end confdefs.h. */
7084$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007086int
7087main ()
7088{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007089if ((ac__type_new_ *) 0)
7090 return 0;
7091if (sizeof (ac__type_new_))
7092 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
7098if { (ac_try="$ac_compile"
7099case "(($ac_try" in
7100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7101 *) ac_try_echo=$ac_try;;
7102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007104 (eval "$ac_compile") 2>conftest.er1
7105 ac_status=$?
7106 grep -v '^ *+' conftest.er1 >conftest.err
7107 rm -f conftest.er1
7108 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007110 (exit $ac_status); } && {
7111 test -z "$ac_c_werror_flag" ||
7112 test ! -s conftest.err
7113 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007114 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007115else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007117sed 's/^/| /' conftest.$ac_ext >&5
7118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007119 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007121
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007124{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7125echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7126if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007127 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128else
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
7130cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007131#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007132_ACEOF
7133
7134fi
7135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007136{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7137echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007138if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007139 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007140else
7141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007142/* confdefs.h. */
7143_ACEOF
7144cat confdefs.h >>conftest.$ac_ext
7145cat >>conftest.$ac_ext <<_ACEOF
7146/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007148
7149_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007151 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152 ac_cv_type_uid_t=yes
7153else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007154 ac_cv_type_uid_t=no
7155fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00007156rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007158fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007159{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7160echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007161if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162
Martin v. Löwis11437992002-04-12 09:54:03 +00007163cat >>confdefs.h <<\_ACEOF
7164#define uid_t int
7165_ACEOF
7166
7167
7168cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007169#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007170_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007171
7172fi
7173
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007174
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007175 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7176echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007177if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007178 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007179else
7180 ac_cv_c_uint32_t=no
7181 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7182 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7183 cat >conftest.$ac_ext <<_ACEOF
7184/* confdefs.h. */
7185_ACEOF
7186cat confdefs.h >>conftest.$ac_ext
7187cat >>conftest.$ac_ext <<_ACEOF
7188/* end confdefs.h. */
7189$ac_includes_default
7190int
7191main ()
7192{
7193static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7194test_array [0] = 0
7195
7196 ;
7197 return 0;
7198}
7199_ACEOF
7200rm -f conftest.$ac_objext
7201if { (ac_try="$ac_compile"
7202case "(($ac_try" in
7203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7204 *) ac_try_echo=$ac_try;;
7205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007207 (eval "$ac_compile") 2>conftest.er1
7208 ac_status=$?
7209 grep -v '^ *+' conftest.er1 >conftest.err
7210 rm -f conftest.er1
7211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007213 (exit $ac_status); } && {
7214 test -z "$ac_c_werror_flag" ||
7215 test ! -s conftest.err
7216 } && test -s conftest.$ac_objext; then
7217 case $ac_type in
7218 uint32_t) ac_cv_c_uint32_t=yes ;;
7219 *) ac_cv_c_uint32_t=$ac_type ;;
7220esac
7221
7222else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007223 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007224sed 's/^/| /' conftest.$ac_ext >&5
7225
7226
7227fi
7228
7229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7230 test "$ac_cv_c_uint32_t" != no && break
7231 done
7232fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007233{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7234echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007235 case $ac_cv_c_uint32_t in #(
7236 no|yes) ;; #(
7237 *)
7238
7239cat >>confdefs.h <<\_ACEOF
7240#define _UINT32_T 1
7241_ACEOF
7242
7243
7244cat >>confdefs.h <<_ACEOF
7245#define uint32_t $ac_cv_c_uint32_t
7246_ACEOF
7247;;
7248 esac
7249
7250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007251 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7252echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007253if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007254 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007255else
7256 ac_cv_c_uint64_t=no
7257 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7258 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7259 cat >conftest.$ac_ext <<_ACEOF
7260/* confdefs.h. */
7261_ACEOF
7262cat confdefs.h >>conftest.$ac_ext
7263cat >>conftest.$ac_ext <<_ACEOF
7264/* end confdefs.h. */
7265$ac_includes_default
7266int
7267main ()
7268{
7269static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7270test_array [0] = 0
7271
7272 ;
7273 return 0;
7274}
7275_ACEOF
7276rm -f conftest.$ac_objext
7277if { (ac_try="$ac_compile"
7278case "(($ac_try" in
7279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7280 *) ac_try_echo=$ac_try;;
7281esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007283 (eval "$ac_compile") 2>conftest.er1
7284 ac_status=$?
7285 grep -v '^ *+' conftest.er1 >conftest.err
7286 rm -f conftest.er1
7287 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007289 (exit $ac_status); } && {
7290 test -z "$ac_c_werror_flag" ||
7291 test ! -s conftest.err
7292 } && test -s conftest.$ac_objext; then
7293 case $ac_type in
7294 uint64_t) ac_cv_c_uint64_t=yes ;;
7295 *) ac_cv_c_uint64_t=$ac_type ;;
7296esac
7297
7298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007299 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
7302
7303fi
7304
7305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7306 test "$ac_cv_c_uint64_t" != no && break
7307 done
7308fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007309{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7310echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007311 case $ac_cv_c_uint64_t in #(
7312 no|yes) ;; #(
7313 *)
7314
7315cat >>confdefs.h <<\_ACEOF
7316#define _UINT64_T 1
7317_ACEOF
7318
7319
7320cat >>confdefs.h <<_ACEOF
7321#define uint64_t $ac_cv_c_uint64_t
7322_ACEOF
7323;;
7324 esac
7325
7326
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007327 { echo "$as_me:$LINENO: checking for int32_t" >&5
7328echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007329if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007330 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007331else
7332 ac_cv_c_int32_t=no
7333 for ac_type in 'int32_t' 'int' 'long int' \
7334 'long long int' 'short int' 'signed char'; do
7335 cat >conftest.$ac_ext <<_ACEOF
7336/* confdefs.h. */
7337_ACEOF
7338cat confdefs.h >>conftest.$ac_ext
7339cat >>conftest.$ac_ext <<_ACEOF
7340/* end confdefs.h. */
7341$ac_includes_default
7342int
7343main ()
7344{
7345static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7346test_array [0] = 0
7347
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
7353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007359 (eval "$ac_compile") 2>conftest.er1
7360 ac_status=$?
7361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007365 (exit $ac_status); } && {
7366 test -z "$ac_c_werror_flag" ||
7367 test ! -s conftest.err
7368 } && test -s conftest.$ac_objext; then
7369 cat >conftest.$ac_ext <<_ACEOF
7370/* confdefs.h. */
7371_ACEOF
7372cat confdefs.h >>conftest.$ac_ext
7373cat >>conftest.$ac_ext <<_ACEOF
7374/* end confdefs.h. */
7375$ac_includes_default
7376int
7377main ()
7378{
7379static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007380 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007381test_array [0] = 0
7382
7383 ;
7384 return 0;
7385}
7386_ACEOF
7387rm -f conftest.$ac_objext
7388if { (ac_try="$ac_compile"
7389case "(($ac_try" in
7390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7391 *) ac_try_echo=$ac_try;;
7392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007394 (eval "$ac_compile") 2>conftest.er1
7395 ac_status=$?
7396 grep -v '^ *+' conftest.er1 >conftest.err
7397 rm -f conftest.er1
7398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007400 (exit $ac_status); } && {
7401 test -z "$ac_c_werror_flag" ||
7402 test ! -s conftest.err
7403 } && test -s conftest.$ac_objext; then
7404 :
7405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007406 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007407sed 's/^/| /' conftest.$ac_ext >&5
7408
7409 case $ac_type in
7410 int32_t) ac_cv_c_int32_t=yes ;;
7411 *) ac_cv_c_int32_t=$ac_type ;;
7412esac
7413
7414fi
7415
7416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007418 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007419sed 's/^/| /' conftest.$ac_ext >&5
7420
7421
7422fi
7423
7424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7425 test "$ac_cv_c_int32_t" != no && break
7426 done
7427fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007428{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7429echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007430 case $ac_cv_c_int32_t in #(
7431 no|yes) ;; #(
7432 *)
7433
7434cat >>confdefs.h <<_ACEOF
7435#define int32_t $ac_cv_c_int32_t
7436_ACEOF
7437;;
7438 esac
7439
7440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007441 { echo "$as_me:$LINENO: checking for int64_t" >&5
7442echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007443if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007444 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007445else
7446 ac_cv_c_int64_t=no
7447 for ac_type in 'int64_t' 'int' 'long int' \
7448 'long long int' 'short int' 'signed char'; do
7449 cat >conftest.$ac_ext <<_ACEOF
7450/* confdefs.h. */
7451_ACEOF
7452cat confdefs.h >>conftest.$ac_ext
7453cat >>conftest.$ac_ext <<_ACEOF
7454/* end confdefs.h. */
7455$ac_includes_default
7456int
7457main ()
7458{
7459static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7460test_array [0] = 0
7461
7462 ;
7463 return 0;
7464}
7465_ACEOF
7466rm -f conftest.$ac_objext
7467if { (ac_try="$ac_compile"
7468case "(($ac_try" in
7469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7470 *) ac_try_echo=$ac_try;;
7471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007473 (eval "$ac_compile") 2>conftest.er1
7474 ac_status=$?
7475 grep -v '^ *+' conftest.er1 >conftest.err
7476 rm -f conftest.er1
7477 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007479 (exit $ac_status); } && {
7480 test -z "$ac_c_werror_flag" ||
7481 test ! -s conftest.err
7482 } && test -s conftest.$ac_objext; then
7483 cat >conftest.$ac_ext <<_ACEOF
7484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
7489$ac_includes_default
7490int
7491main ()
7492{
7493static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007494 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (ac_try="$ac_compile"
7503case "(($ac_try" in
7504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7505 *) ac_try_echo=$ac_try;;
7506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007508 (eval "$ac_compile") 2>conftest.er1
7509 ac_status=$?
7510 grep -v '^ *+' conftest.er1 >conftest.err
7511 rm -f conftest.er1
7512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007514 (exit $ac_status); } && {
7515 test -z "$ac_c_werror_flag" ||
7516 test ! -s conftest.err
7517 } && test -s conftest.$ac_objext; then
7518 :
7519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007520 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007521sed 's/^/| /' conftest.$ac_ext >&5
7522
7523 case $ac_type in
7524 int64_t) ac_cv_c_int64_t=yes ;;
7525 *) ac_cv_c_int64_t=$ac_type ;;
7526esac
7527
7528fi
7529
7530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007532 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007533sed 's/^/| /' conftest.$ac_ext >&5
7534
7535
7536fi
7537
7538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7539 test "$ac_cv_c_int64_t" != no && break
7540 done
7541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007542{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7543echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007544 case $ac_cv_c_int64_t in #(
7545 no|yes) ;; #(
7546 *)
7547
7548cat >>confdefs.h <<_ACEOF
7549#define int64_t $ac_cv_c_int64_t
7550_ACEOF
7551;;
7552 esac
7553
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007554{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7555echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007556if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007558else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007559 cat >conftest.$ac_ext <<_ACEOF
7560/* confdefs.h. */
7561_ACEOF
7562cat confdefs.h >>conftest.$ac_ext
7563cat >>conftest.$ac_ext <<_ACEOF
7564/* end confdefs.h. */
7565$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007566typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007567int
7568main ()
7569{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007570if ((ac__type_new_ *) 0)
7571 return 0;
7572if (sizeof (ac__type_new_))
7573 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007574 ;
7575 return 0;
7576}
7577_ACEOF
7578rm -f conftest.$ac_objext
7579if { (ac_try="$ac_compile"
7580case "(($ac_try" in
7581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7582 *) ac_try_echo=$ac_try;;
7583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007585 (eval "$ac_compile") 2>conftest.er1
7586 ac_status=$?
7587 grep -v '^ *+' conftest.er1 >conftest.err
7588 rm -f conftest.er1
7589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007591 (exit $ac_status); } && {
7592 test -z "$ac_c_werror_flag" ||
7593 test ! -s conftest.err
7594 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007595 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007597 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007598sed 's/^/| /' conftest.$ac_ext >&5
7599
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007600 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007602
7603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007604fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007605{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7606echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7607if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007608
7609cat >>confdefs.h <<\_ACEOF
7610#define HAVE_SSIZE_T 1
7611_ACEOF
7612
7613fi
7614
Jack Jansendd19cf82001-12-06 22:36:17 +00007615
Michael W. Hudson54241132001-12-07 15:38:26 +00007616# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007617# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007618{ echo "$as_me:$LINENO: checking for int" >&5
7619echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7620if test "${ac_cv_type_int+set}" = set; then
7621 echo $ECHO_N "(cached) $ECHO_C" >&6
7622else
7623 cat >conftest.$ac_ext <<_ACEOF
7624/* confdefs.h. */
7625_ACEOF
7626cat confdefs.h >>conftest.$ac_ext
7627cat >>conftest.$ac_ext <<_ACEOF
7628/* end confdefs.h. */
7629$ac_includes_default
7630typedef int ac__type_new_;
7631int
7632main ()
7633{
7634if ((ac__type_new_ *) 0)
7635 return 0;
7636if (sizeof (ac__type_new_))
7637 return 0;
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
7643if { (ac_try="$ac_compile"
7644case "(($ac_try" in
7645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7646 *) ac_try_echo=$ac_try;;
7647esac
7648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7649 (eval "$ac_compile") 2>conftest.er1
7650 ac_status=$?
7651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); } && {
7656 test -z "$ac_c_werror_flag" ||
7657 test ! -s conftest.err
7658 } && test -s conftest.$ac_objext; then
7659 ac_cv_type_int=yes
7660else
7661 echo "$as_me: failed program was:" >&5
7662sed 's/^/| /' conftest.$ac_ext >&5
7663
7664 ac_cv_type_int=no
7665fi
7666
7667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7668fi
7669{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7670echo "${ECHO_T}$ac_cv_type_int" >&6; }
7671
Martin v. Löwiseba40652007-08-30 20:10:57 +00007672# The cast to long int works around a bug in the HP C Compiler
7673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7675# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007676{ echo "$as_me:$LINENO: checking size of int" >&5
7677echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007678if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007679 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007680else
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 if test "$cross_compiling" = yes; then
7682 # Depending upon the size, compute the lo and hi bounds.
7683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007690 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702if { (ac_try="$ac_compile"
7703case "(($ac_try" in
7704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7705 *) ac_try_echo=$ac_try;;
7706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007710 grep -v '^ *+' conftest.er1 >conftest.err
7711 rm -f conftest.er1
7712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 (exit $ac_status); } && {
7715 test -z "$ac_c_werror_flag" ||
7716 test ! -s conftest.err
7717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_lo=0 ac_mid=0
7719 while :; do
7720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007721/* confdefs.h. */
7722_ACEOF
7723cat confdefs.h >>conftest.$ac_ext
7724cat >>conftest.$ac_ext <<_ACEOF
7725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007727 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007728int
7729main ()
7730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007732test_array [0] = 0
7733
7734 ;
7735 return 0;
7736}
7737_ACEOF
7738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739if { (ac_try="$ac_compile"
7740case "(($ac_try" in
7741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7742 *) ac_try_echo=$ac_try;;
7743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007747 grep -v '^ *+' conftest.er1 >conftest.err
7748 rm -f conftest.er1
7749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751 (exit $ac_status); } && {
7752 test -z "$ac_c_werror_flag" ||
7753 test ! -s conftest.err
7754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_hi=$ac_mid; break
7756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 ac_lo=`expr $ac_mid + 1`
7761 if test $ac_lo -le $ac_mid; then
7762 ac_lo= ac_hi=
7763 break
7764 fi
7765 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007767
7768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 done
7770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007772sed 's/^/| /' conftest.$ac_ext >&5
7773
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007775/* confdefs.h. */
7776_ACEOF
7777cat confdefs.h >>conftest.$ac_ext
7778cat >>conftest.$ac_ext <<_ACEOF
7779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007780$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007781 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007782int
7783main ()
7784{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007786test_array [0] = 0
7787
7788 ;
7789 return 0;
7790}
7791_ACEOF
7792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793if { (ac_try="$ac_compile"
7794case "(($ac_try" in
7795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7796 *) ac_try_echo=$ac_try;;
7797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007801 grep -v '^ *+' conftest.er1 >conftest.err
7802 rm -f conftest.er1
7803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 (exit $ac_status); } && {
7806 test -z "$ac_c_werror_flag" ||
7807 test ! -s conftest.err
7808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 ac_hi=-1 ac_mid=-1
7810 while :; do
7811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007812/* confdefs.h. */
7813_ACEOF
7814cat confdefs.h >>conftest.$ac_ext
7815cat >>conftest.$ac_ext <<_ACEOF
7816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007817$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007818 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007819int
7820main ()
7821{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007823test_array [0] = 0
7824
7825 ;
7826 return 0;
7827}
7828_ACEOF
7829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007830if { (ac_try="$ac_compile"
7831case "(($ac_try" in
7832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7833 *) ac_try_echo=$ac_try;;
7834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007838 grep -v '^ *+' conftest.er1 >conftest.err
7839 rm -f conftest.er1
7840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842 (exit $ac_status); } && {
7843 test -z "$ac_c_werror_flag" ||
7844 test ! -s conftest.err
7845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ac_lo=$ac_mid; break
7847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007849sed 's/^/| /' conftest.$ac_ext >&5
7850
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 ac_hi=`expr '(' $ac_mid ')' - 1`
7852 if test $ac_mid -le $ac_hi; then
7853 ac_lo= ac_hi=
7854 break
7855 fi
7856 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858
7859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 done
7861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007863sed 's/^/| /' conftest.$ac_ext >&5
7864
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867
7868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870
7871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007872# Binary search between lo and hi bounds.
7873while test "x$ac_lo" != "x$ac_hi"; do
7874 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007876/* confdefs.h. */
7877_ACEOF
7878cat confdefs.h >>conftest.$ac_ext
7879cat >>conftest.$ac_ext <<_ACEOF
7880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007881$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007882 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007886static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007894if { (ac_try="$ac_compile"
7895case "(($ac_try" in
7896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7897 *) ac_try_echo=$ac_try;;
7898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007902 grep -v '^ *+' conftest.er1 >conftest.err
7903 rm -f conftest.er1
7904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007906 (exit $ac_status); } && {
7907 test -z "$ac_c_werror_flag" ||
7908 test ! -s conftest.err
7909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 ac_hi=$ac_mid
7911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007913sed 's/^/| /' conftest.$ac_ext >&5
7914
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917
7918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007919done
7920case $ac_lo in
7921?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007922'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007924See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007925echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007926See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007927 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 else
7929 ac_cv_sizeof_int=0
7930 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007931esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007932else
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007934/* confdefs.h. */
7935_ACEOF
7936cat confdefs.h >>conftest.$ac_ext
7937cat >>conftest.$ac_ext <<_ACEOF
7938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007939$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007940 typedef int ac__type_sizeof_;
7941static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7942static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007944#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007947{
Martin v. Löwis11437992002-04-12 09:54:03 +00007948
7949 FILE *f = fopen ("conftest.val", "w");
7950 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007952 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007955 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007957 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 }
7959 else
7960 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007963 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007964 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007966 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
7968 ;
7969 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007970}
Martin v. Löwis11437992002-04-12 09:54:03 +00007971_ACEOF
7972rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973if { (ac_try="$ac_link"
7974case "(($ac_try" in
7975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7976 *) ac_try_echo=$ac_try;;
7977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983 { (case "(($ac_try" in
7984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7985 *) ac_try_echo=$ac_try;;
7986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 (exit $ac_status); }; }; then
7992 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007994 echo "$as_me: program exited with status $ac_status" >&5
7995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Martin v. Löwis11437992002-04-12 09:54:03 +00007998( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007999if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008000 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008001See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008002echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008003See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008004 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005 else
8006 ac_cv_sizeof_int=0
8007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009rm -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 +00008010fi
8011rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008013{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8014echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015
8016
8017
Martin v. Löwis11437992002-04-12 09:54:03 +00008018cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008019#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008020_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008021
8022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008023{ echo "$as_me:$LINENO: checking for long" >&5
8024echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8025if test "${ac_cv_type_long+set}" = set; then
8026 echo $ECHO_N "(cached) $ECHO_C" >&6
8027else
8028 cat >conftest.$ac_ext <<_ACEOF
8029/* confdefs.h. */
8030_ACEOF
8031cat confdefs.h >>conftest.$ac_ext
8032cat >>conftest.$ac_ext <<_ACEOF
8033/* end confdefs.h. */
8034$ac_includes_default
8035typedef long ac__type_new_;
8036int
8037main ()
8038{
8039if ((ac__type_new_ *) 0)
8040 return 0;
8041if (sizeof (ac__type_new_))
8042 return 0;
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
8048if { (ac_try="$ac_compile"
8049case "(($ac_try" in
8050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8051 *) ac_try_echo=$ac_try;;
8052esac
8053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8054 (eval "$ac_compile") 2>conftest.er1
8055 ac_status=$?
8056 grep -v '^ *+' conftest.er1 >conftest.err
8057 rm -f conftest.er1
8058 cat conftest.err >&5
8059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060 (exit $ac_status); } && {
8061 test -z "$ac_c_werror_flag" ||
8062 test ! -s conftest.err
8063 } && test -s conftest.$ac_objext; then
8064 ac_cv_type_long=yes
8065else
8066 echo "$as_me: failed program was:" >&5
8067sed 's/^/| /' conftest.$ac_ext >&5
8068
8069 ac_cv_type_long=no
8070fi
8071
8072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8073fi
8074{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8075echo "${ECHO_T}$ac_cv_type_long" >&6; }
8076
Martin v. Löwiseba40652007-08-30 20:10:57 +00008077# The cast to long int works around a bug in the HP C Compiler
8078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8080# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008081{ echo "$as_me:$LINENO: checking size of long" >&5
8082echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008083if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008084 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008085else
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 if test "$cross_compiling" = yes; then
8087 # Depending upon the size, compute the lo and hi bounds.
8088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008095 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096int
8097main ()
8098{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008099static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008100test_array [0] = 0
8101
8102 ;
8103 return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107if { (ac_try="$ac_compile"
8108case "(($ac_try" in
8109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8110 *) ac_try_echo=$ac_try;;
8111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 (exit $ac_status); } && {
8120 test -z "$ac_c_werror_flag" ||
8121 test ! -s conftest.err
8122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_lo=0 ac_mid=0
8124 while :; do
8125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008132 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008133int
8134main ()
8135{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008137test_array [0] = 0
8138
8139 ;
8140 return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144if { (ac_try="$ac_compile"
8145case "(($ac_try" in
8146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8147 *) ac_try_echo=$ac_try;;
8148esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008152 grep -v '^ *+' conftest.er1 >conftest.err
8153 rm -f conftest.er1
8154 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156 (exit $ac_status); } && {
8157 test -z "$ac_c_werror_flag" ||
8158 test ! -s conftest.err
8159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_hi=$ac_mid; break
8161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 ac_lo=`expr $ac_mid + 1`
8166 if test $ac_lo -le $ac_mid; then
8167 ac_lo= ac_hi=
8168 break
8169 fi
8170 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 done
8175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008180/* confdefs.h. */
8181_ACEOF
8182cat confdefs.h >>conftest.$ac_ext
8183cat >>conftest.$ac_ext <<_ACEOF
8184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008185$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008186 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008187int
8188main ()
8189{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008191test_array [0] = 0
8192
8193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198if { (ac_try="$ac_compile"
8199case "(($ac_try" in
8200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8201 *) ac_try_echo=$ac_try;;
8202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008206 grep -v '^ *+' conftest.er1 >conftest.err
8207 rm -f conftest.er1
8208 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 (exit $ac_status); } && {
8211 test -z "$ac_c_werror_flag" ||
8212 test ! -s conftest.err
8213 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_hi=-1 ac_mid=-1
8215 while :; do
8216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* confdefs.h. */
8218_ACEOF
8219cat confdefs.h >>conftest.$ac_ext
8220cat >>conftest.$ac_ext <<_ACEOF
8221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008222$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008223 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008224int
8225main ()
8226{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008228test_array [0] = 0
8229
8230 ;
8231 return 0;
8232}
8233_ACEOF
8234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235if { (ac_try="$ac_compile"
8236case "(($ac_try" in
8237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8238 *) ac_try_echo=$ac_try;;
8239esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008243 grep -v '^ *+' conftest.er1 >conftest.err
8244 rm -f conftest.er1
8245 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008247 (exit $ac_status); } && {
8248 test -z "$ac_c_werror_flag" ||
8249 test ! -s conftest.err
8250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 ac_lo=$ac_mid; break
8252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008254sed 's/^/| /' conftest.$ac_ext >&5
8255
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256 ac_hi=`expr '(' $ac_mid ')' - 1`
8257 if test $ac_mid -le $ac_hi; then
8258 ac_lo= ac_hi=
8259 break
8260 fi
8261 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263
8264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 done
8266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008268sed 's/^/| /' conftest.$ac_ext >&5
8269
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272
8273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275
8276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008277# Binary search between lo and hi bounds.
8278while test "x$ac_lo" != "x$ac_hi"; do
8279 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* confdefs.h. */
8282_ACEOF
8283cat confdefs.h >>conftest.$ac_ext
8284cat >>conftest.$ac_ext <<_ACEOF
8285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008286$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008287 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008288int
8289main ()
8290{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008292test_array [0] = 0
8293
8294 ;
8295 return 0;
8296}
8297_ACEOF
8298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008299if { (ac_try="$ac_compile"
8300case "(($ac_try" in
8301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8302 *) ac_try_echo=$ac_try;;
8303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008307 grep -v '^ *+' conftest.er1 >conftest.err
8308 rm -f conftest.er1
8309 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008311 (exit $ac_status); } && {
8312 test -z "$ac_c_werror_flag" ||
8313 test ! -s conftest.err
8314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 ac_hi=$ac_mid
8316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008318sed 's/^/| /' conftest.$ac_ext >&5
8319
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008322
8323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008324done
8325case $ac_lo in
8326?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008327'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008328 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008329See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008330echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008331See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008332 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 else
8334 ac_cv_sizeof_long=0
8335 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008336esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008337else
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008339/* confdefs.h. */
8340_ACEOF
8341cat confdefs.h >>conftest.$ac_ext
8342cat >>conftest.$ac_ext <<_ACEOF
8343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008344$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008345 typedef long ac__type_sizeof_;
8346static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8347static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008348#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008349#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008350int
8351main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008352{
Martin v. Löwis11437992002-04-12 09:54:03 +00008353
8354 FILE *f = fopen ("conftest.val", "w");
8355 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008357 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008359 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008360 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008361 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008362 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 }
8364 else
8365 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008367 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008369 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008371 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
8373 ;
8374 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008375}
Martin v. Löwis11437992002-04-12 09:54:03 +00008376_ACEOF
8377rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378if { (ac_try="$ac_link"
8379case "(($ac_try" in
8380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8381 *) ac_try_echo=$ac_try;;
8382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008384 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388 { (case "(($ac_try" in
8389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8390 *) ac_try_echo=$ac_try;;
8391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008394 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 (exit $ac_status); }; }; then
8397 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008399 echo "$as_me: program exited with status $ac_status" >&5
8400echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008401sed 's/^/| /' conftest.$ac_ext >&5
8402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008404if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008405 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008406See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008407echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008408See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008409 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410 else
8411 ac_cv_sizeof_long=0
8412 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008414rm -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 +00008415fi
8416rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008417fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008418{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8419echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420
8421
8422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008424#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008425_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008426
8427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008428{ echo "$as_me:$LINENO: checking for void *" >&5
8429echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8430if test "${ac_cv_type_void_p+set}" = set; then
8431 echo $ECHO_N "(cached) $ECHO_C" >&6
8432else
8433 cat >conftest.$ac_ext <<_ACEOF
8434/* confdefs.h. */
8435_ACEOF
8436cat confdefs.h >>conftest.$ac_ext
8437cat >>conftest.$ac_ext <<_ACEOF
8438/* end confdefs.h. */
8439$ac_includes_default
8440typedef void * ac__type_new_;
8441int
8442main ()
8443{
8444if ((ac__type_new_ *) 0)
8445 return 0;
8446if (sizeof (ac__type_new_))
8447 return 0;
8448 ;
8449 return 0;
8450}
8451_ACEOF
8452rm -f conftest.$ac_objext
8453if { (ac_try="$ac_compile"
8454case "(($ac_try" in
8455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456 *) ac_try_echo=$ac_try;;
8457esac
8458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8459 (eval "$ac_compile") 2>conftest.er1
8460 ac_status=$?
8461 grep -v '^ *+' conftest.er1 >conftest.err
8462 rm -f conftest.er1
8463 cat conftest.err >&5
8464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465 (exit $ac_status); } && {
8466 test -z "$ac_c_werror_flag" ||
8467 test ! -s conftest.err
8468 } && test -s conftest.$ac_objext; then
8469 ac_cv_type_void_p=yes
8470else
8471 echo "$as_me: failed program was:" >&5
8472sed 's/^/| /' conftest.$ac_ext >&5
8473
8474 ac_cv_type_void_p=no
8475fi
8476
8477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8478fi
8479{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8480echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8481
Martin v. Löwiseba40652007-08-30 20:10:57 +00008482# The cast to long int works around a bug in the HP C Compiler
8483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8485# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008486{ echo "$as_me:$LINENO: checking size of void *" >&5
8487echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008488if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008489 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008490else
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 if test "$cross_compiling" = yes; then
8492 # Depending upon the size, compute the lo and hi bounds.
8493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008494/* confdefs.h. */
8495_ACEOF
8496cat confdefs.h >>conftest.$ac_ext
8497cat >>conftest.$ac_ext <<_ACEOF
8498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008500 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008501int
8502main ()
8503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008505test_array [0] = 0
8506
8507 ;
8508 return 0;
8509}
8510_ACEOF
8511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512if { (ac_try="$ac_compile"
8513case "(($ac_try" in
8514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8515 *) ac_try_echo=$ac_try;;
8516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008520 grep -v '^ *+' conftest.er1 >conftest.err
8521 rm -f conftest.er1
8522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 (exit $ac_status); } && {
8525 test -z "$ac_c_werror_flag" ||
8526 test ! -s conftest.err
8527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_lo=0 ac_mid=0
8529 while :; do
8530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008531/* confdefs.h. */
8532_ACEOF
8533cat confdefs.h >>conftest.$ac_ext
8534cat >>conftest.$ac_ext <<_ACEOF
8535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008536$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008537 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008541static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008542test_array [0] = 0
8543
8544 ;
8545 return 0;
8546}
8547_ACEOF
8548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549if { (ac_try="$ac_compile"
8550case "(($ac_try" in
8551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8552 *) ac_try_echo=$ac_try;;
8553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008557 grep -v '^ *+' conftest.er1 >conftest.err
8558 rm -f conftest.er1
8559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561 (exit $ac_status); } && {
8562 test -z "$ac_c_werror_flag" ||
8563 test ! -s conftest.err
8564 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_hi=$ac_mid; break
8566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008568sed 's/^/| /' conftest.$ac_ext >&5
8569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 ac_lo=`expr $ac_mid + 1`
8571 if test $ac_lo -le $ac_mid; then
8572 ac_lo= ac_hi=
8573 break
8574 fi
8575 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577
8578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 done
8580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008582sed 's/^/| /' conftest.$ac_ext >&5
8583
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008585/* confdefs.h. */
8586_ACEOF
8587cat confdefs.h >>conftest.$ac_ext
8588cat >>conftest.$ac_ext <<_ACEOF
8589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008590$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008591 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008592int
8593main ()
8594{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008595static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008596test_array [0] = 0
8597
8598 ;
8599 return 0;
8600}
8601_ACEOF
8602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603if { (ac_try="$ac_compile"
8604case "(($ac_try" in
8605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8606 *) ac_try_echo=$ac_try;;
8607esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008611 grep -v '^ *+' conftest.er1 >conftest.err
8612 rm -f conftest.er1
8613 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 (exit $ac_status); } && {
8616 test -z "$ac_c_werror_flag" ||
8617 test ! -s conftest.err
8618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_hi=-1 ac_mid=-1
8620 while :; do
8621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008622/* confdefs.h. */
8623_ACEOF
8624cat confdefs.h >>conftest.$ac_ext
8625cat >>conftest.$ac_ext <<_ACEOF
8626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008628 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008629int
8630main ()
8631{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008633test_array [0] = 0
8634
8635 ;
8636 return 0;
8637}
8638_ACEOF
8639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640if { (ac_try="$ac_compile"
8641case "(($ac_try" in
8642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8643 *) ac_try_echo=$ac_try;;
8644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008648 grep -v '^ *+' conftest.er1 >conftest.err
8649 rm -f conftest.er1
8650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652 (exit $ac_status); } && {
8653 test -z "$ac_c_werror_flag" ||
8654 test ! -s conftest.err
8655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ac_lo=$ac_mid; break
8657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008659sed 's/^/| /' conftest.$ac_ext >&5
8660
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661 ac_hi=`expr '(' $ac_mid ')' - 1`
8662 if test $ac_mid -le $ac_hi; then
8663 ac_lo= ac_hi=
8664 break
8665 fi
8666 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668
8669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 done
8671else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008673sed 's/^/| /' conftest.$ac_ext >&5
8674
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677
8678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680
8681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008682# Binary search between lo and hi bounds.
8683while test "x$ac_lo" != "x$ac_hi"; do
8684 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008686/* confdefs.h. */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008691$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008692 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008693int
8694main ()
8695{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008697test_array [0] = 0
8698
8699 ;
8700 return 0;
8701}
8702_ACEOF
8703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008704if { (ac_try="$ac_compile"
8705case "(($ac_try" in
8706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8707 *) ac_try_echo=$ac_try;;
8708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008712 grep -v '^ *+' conftest.er1 >conftest.err
8713 rm -f conftest.er1
8714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008716 (exit $ac_status); } && {
8717 test -z "$ac_c_werror_flag" ||
8718 test ! -s conftest.err
8719 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_hi=$ac_mid
8721else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008723sed 's/^/| /' conftest.$ac_ext >&5
8724
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727
8728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008729done
8730case $ac_lo in
8731?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008732'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008733 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008734See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008735echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008736See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008737 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 else
8739 ac_cv_sizeof_void_p=0
8740 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008741esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008742else
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008744/* confdefs.h. */
8745_ACEOF
8746cat confdefs.h >>conftest.$ac_ext
8747cat >>conftest.$ac_ext <<_ACEOF
8748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008749$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008750 typedef void * ac__type_sizeof_;
8751static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8752static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008753#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008754#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008755int
8756main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008757{
Martin v. Löwis11437992002-04-12 09:54:03 +00008758
8759 FILE *f = fopen ("conftest.val", "w");
8760 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008762 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008765 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008766 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008767 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 }
8769 else
8770 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008772 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008774 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008776 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008777
8778 ;
8779 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008780}
Martin v. Löwis11437992002-04-12 09:54:03 +00008781_ACEOF
8782rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783if { (ac_try="$ac_link"
8784case "(($ac_try" in
8785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8786 *) ac_try_echo=$ac_try;;
8787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793 { (case "(($ac_try" in
8794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8795 *) ac_try_echo=$ac_try;;
8796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 (exit $ac_status); }; }; then
8802 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008803else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008804 echo "$as_me: program exited with status $ac_status" >&5
8805echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Martin v. Löwis11437992002-04-12 09:54:03 +00008808( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008809if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008810 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008811See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008812echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008813See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008814 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815 else
8816 ac_cv_sizeof_void_p=0
8817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008819rm -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 +00008820fi
8821rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008822fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008823{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8824echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825
8826
8827
Martin v. Löwis11437992002-04-12 09:54:03 +00008828cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008829#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008830_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008831
8832
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008833{ echo "$as_me:$LINENO: checking for short" >&5
8834echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8835if test "${ac_cv_type_short+set}" = set; then
8836 echo $ECHO_N "(cached) $ECHO_C" >&6
8837else
8838 cat >conftest.$ac_ext <<_ACEOF
8839/* confdefs.h. */
8840_ACEOF
8841cat confdefs.h >>conftest.$ac_ext
8842cat >>conftest.$ac_ext <<_ACEOF
8843/* end confdefs.h. */
8844$ac_includes_default
8845typedef short ac__type_new_;
8846int
8847main ()
8848{
8849if ((ac__type_new_ *) 0)
8850 return 0;
8851if (sizeof (ac__type_new_))
8852 return 0;
8853 ;
8854 return 0;
8855}
8856_ACEOF
8857rm -f conftest.$ac_objext
8858if { (ac_try="$ac_compile"
8859case "(($ac_try" in
8860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8861 *) ac_try_echo=$ac_try;;
8862esac
8863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8864 (eval "$ac_compile") 2>conftest.er1
8865 ac_status=$?
8866 grep -v '^ *+' conftest.er1 >conftest.err
8867 rm -f conftest.er1
8868 cat conftest.err >&5
8869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870 (exit $ac_status); } && {
8871 test -z "$ac_c_werror_flag" ||
8872 test ! -s conftest.err
8873 } && test -s conftest.$ac_objext; then
8874 ac_cv_type_short=yes
8875else
8876 echo "$as_me: failed program was:" >&5
8877sed 's/^/| /' conftest.$ac_ext >&5
8878
8879 ac_cv_type_short=no
8880fi
8881
8882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8883fi
8884{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8885echo "${ECHO_T}$ac_cv_type_short" >&6; }
8886
Martin v. Löwiseba40652007-08-30 20:10:57 +00008887# The cast to long int works around a bug in the HP C Compiler
8888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8890# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008891{ echo "$as_me:$LINENO: checking size of short" >&5
8892echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008893if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008894 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008895else
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 if test "$cross_compiling" = yes; then
8897 # Depending upon the size, compute the lo and hi bounds.
8898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008899/* confdefs.h. */
8900_ACEOF
8901cat confdefs.h >>conftest.$ac_ext
8902cat >>conftest.$ac_ext <<_ACEOF
8903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008905 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008910test_array [0] = 0
8911
8912 ;
8913 return 0;
8914}
8915_ACEOF
8916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917if { (ac_try="$ac_compile"
8918case "(($ac_try" in
8919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920 *) ac_try_echo=$ac_try;;
8921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008925 grep -v '^ *+' conftest.er1 >conftest.err
8926 rm -f conftest.er1
8927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 (exit $ac_status); } && {
8930 test -z "$ac_c_werror_flag" ||
8931 test ! -s conftest.err
8932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_lo=0 ac_mid=0
8934 while :; do
8935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* confdefs.h. */
8937_ACEOF
8938cat confdefs.h >>conftest.$ac_ext
8939cat >>conftest.$ac_ext <<_ACEOF
8940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008942 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008947test_array [0] = 0
8948
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954if { (ac_try="$ac_compile"
8955case "(($ac_try" in
8956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957 *) ac_try_echo=$ac_try;;
8958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008962 grep -v '^ *+' conftest.er1 >conftest.err
8963 rm -f conftest.er1
8964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966 (exit $ac_status); } && {
8967 test -z "$ac_c_werror_flag" ||
8968 test ! -s conftest.err
8969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_hi=$ac_mid; break
8971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 ac_lo=`expr $ac_mid + 1`
8976 if test $ac_lo -le $ac_mid; then
8977 ac_lo= ac_hi=
8978 break
8979 fi
8980 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 done
8985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008987sed 's/^/| /' conftest.$ac_ext >&5
8988
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008990/* confdefs.h. */
8991_ACEOF
8992cat confdefs.h >>conftest.$ac_ext
8993cat >>conftest.$ac_ext <<_ACEOF
8994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008995$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008996 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008997int
8998main ()
8999{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009001test_array [0] = 0
9002
9003 ;
9004 return 0;
9005}
9006_ACEOF
9007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008if { (ac_try="$ac_compile"
9009case "(($ac_try" in
9010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9011 *) ac_try_echo=$ac_try;;
9012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009016 grep -v '^ *+' conftest.er1 >conftest.err
9017 rm -f conftest.er1
9018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 (exit $ac_status); } && {
9021 test -z "$ac_c_werror_flag" ||
9022 test ! -s conftest.err
9023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ac_hi=-1 ac_mid=-1
9025 while :; do
9026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* confdefs.h. */
9028_ACEOF
9029cat confdefs.h >>conftest.$ac_ext
9030cat >>conftest.$ac_ext <<_ACEOF
9031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009032$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009033 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009034int
9035main ()
9036{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009037static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009038test_array [0] = 0
9039
9040 ;
9041 return 0;
9042}
9043_ACEOF
9044rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045if { (ac_try="$ac_compile"
9046case "(($ac_try" in
9047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9048 *) ac_try_echo=$ac_try;;
9049esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009053 grep -v '^ *+' conftest.er1 >conftest.err
9054 rm -f conftest.er1
9055 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009057 (exit $ac_status); } && {
9058 test -z "$ac_c_werror_flag" ||
9059 test ! -s conftest.err
9060 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 ac_lo=$ac_mid; break
9062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009064sed 's/^/| /' conftest.$ac_ext >&5
9065
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 ac_hi=`expr '(' $ac_mid ')' - 1`
9067 if test $ac_mid -le $ac_hi; then
9068 ac_lo= ac_hi=
9069 break
9070 fi
9071 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073
9074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 done
9076else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009078sed 's/^/| /' conftest.$ac_ext >&5
9079
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082
9083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085
9086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009087# Binary search between lo and hi bounds.
9088while test "x$ac_lo" != "x$ac_hi"; do
9089 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009091/* confdefs.h. */
9092_ACEOF
9093cat confdefs.h >>conftest.$ac_ext
9094cat >>conftest.$ac_ext <<_ACEOF
9095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009096$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009097 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009098int
9099main ()
9100{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009101static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009102test_array [0] = 0
9103
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109if { (ac_try="$ac_compile"
9110case "(($ac_try" in
9111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9112 *) ac_try_echo=$ac_try;;
9113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009117 grep -v '^ *+' conftest.er1 >conftest.err
9118 rm -f conftest.er1
9119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121 (exit $ac_status); } && {
9122 test -z "$ac_c_werror_flag" ||
9123 test ! -s conftest.err
9124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 ac_hi=$ac_mid
9126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009128sed 's/^/| /' conftest.$ac_ext >&5
9129
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009132
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009134done
9135case $ac_lo in
9136?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009137'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009138 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009139See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009140echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009141See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009142 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 else
9144 ac_cv_sizeof_short=0
9145 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009146esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009147else
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* confdefs.h. */
9150_ACEOF
9151cat confdefs.h >>conftest.$ac_ext
9152cat >>conftest.$ac_ext <<_ACEOF
9153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009154$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009155 typedef short ac__type_sizeof_;
9156static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9157static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009158#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009159#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009160int
9161main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009162{
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
9164 FILE *f = fopen ("conftest.val", "w");
9165 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009167 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009169 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009170 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009171 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009172 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 }
9174 else
9175 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009177 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009179 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009181 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009182
9183 ;
9184 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009185}
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
9187rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188if { (ac_try="$ac_link"
9189case "(($ac_try" in
9190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9191 *) ac_try_echo=$ac_try;;
9192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009194 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198 { (case "(($ac_try" in
9199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9200 *) ac_try_echo=$ac_try;;
9201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 (exit $ac_status); }; }; then
9207 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009209 echo "$as_me: program exited with status $ac_status" >&5
9210echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009211sed 's/^/| /' conftest.$ac_ext >&5
9212
Martin v. Löwis11437992002-04-12 09:54:03 +00009213( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009214if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009215 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009216See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009217echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009218See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009219 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220 else
9221 ac_cv_sizeof_short=0
9222 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224rm -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 +00009225fi
9226rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009228{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9229echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009230
9231
9232
Martin v. Löwis11437992002-04-12 09:54:03 +00009233cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009234#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009235_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009236
9237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009238{ echo "$as_me:$LINENO: checking for float" >&5
9239echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9240if test "${ac_cv_type_float+set}" = set; then
9241 echo $ECHO_N "(cached) $ECHO_C" >&6
9242else
9243 cat >conftest.$ac_ext <<_ACEOF
9244/* confdefs.h. */
9245_ACEOF
9246cat confdefs.h >>conftest.$ac_ext
9247cat >>conftest.$ac_ext <<_ACEOF
9248/* end confdefs.h. */
9249$ac_includes_default
9250typedef float ac__type_new_;
9251int
9252main ()
9253{
9254if ((ac__type_new_ *) 0)
9255 return 0;
9256if (sizeof (ac__type_new_))
9257 return 0;
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262rm -f conftest.$ac_objext
9263if { (ac_try="$ac_compile"
9264case "(($ac_try" in
9265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9266 *) ac_try_echo=$ac_try;;
9267esac
9268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9269 (eval "$ac_compile") 2>conftest.er1
9270 ac_status=$?
9271 grep -v '^ *+' conftest.er1 >conftest.err
9272 rm -f conftest.er1
9273 cat conftest.err >&5
9274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9275 (exit $ac_status); } && {
9276 test -z "$ac_c_werror_flag" ||
9277 test ! -s conftest.err
9278 } && test -s conftest.$ac_objext; then
9279 ac_cv_type_float=yes
9280else
9281 echo "$as_me: failed program was:" >&5
9282sed 's/^/| /' conftest.$ac_ext >&5
9283
9284 ac_cv_type_float=no
9285fi
9286
9287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9288fi
9289{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9290echo "${ECHO_T}$ac_cv_type_float" >&6; }
9291
Martin v. Löwiseba40652007-08-30 20:10:57 +00009292# The cast to long int works around a bug in the HP C Compiler
9293# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9294# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9295# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009296{ echo "$as_me:$LINENO: checking size of float" >&5
9297echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009298if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009300else
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 if test "$cross_compiling" = yes; then
9302 # Depending upon the size, compute the lo and hi bounds.
9303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009310 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009311int
9312main ()
9313{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009315test_array [0] = 0
9316
9317 ;
9318 return 0;
9319}
9320_ACEOF
9321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322if { (ac_try="$ac_compile"
9323case "(($ac_try" in
9324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9325 *) ac_try_echo=$ac_try;;
9326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009330 grep -v '^ *+' conftest.er1 >conftest.err
9331 rm -f conftest.er1
9332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 (exit $ac_status); } && {
9335 test -z "$ac_c_werror_flag" ||
9336 test ! -s conftest.err
9337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_lo=0 ac_mid=0
9339 while :; do
9340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* confdefs.h. */
9342_ACEOF
9343cat confdefs.h >>conftest.$ac_ext
9344cat >>conftest.$ac_ext <<_ACEOF
9345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009346$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009347 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009348int
9349main ()
9350{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009352test_array [0] = 0
9353
9354 ;
9355 return 0;
9356}
9357_ACEOF
9358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359if { (ac_try="$ac_compile"
9360case "(($ac_try" in
9361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9362 *) ac_try_echo=$ac_try;;
9363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009367 grep -v '^ *+' conftest.er1 >conftest.err
9368 rm -f conftest.er1
9369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371 (exit $ac_status); } && {
9372 test -z "$ac_c_werror_flag" ||
9373 test ! -s conftest.err
9374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_hi=$ac_mid; break
9376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009378sed 's/^/| /' conftest.$ac_ext >&5
9379
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 ac_lo=`expr $ac_mid + 1`
9381 if test $ac_lo -le $ac_mid; then
9382 ac_lo= ac_hi=
9383 break
9384 fi
9385 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387
9388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 done
9390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009392sed 's/^/| /' conftest.$ac_ext >&5
9393
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009395/* confdefs.h. */
9396_ACEOF
9397cat confdefs.h >>conftest.$ac_ext
9398cat >>conftest.$ac_ext <<_ACEOF
9399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009400$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009401 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009402int
9403main ()
9404{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009406test_array [0] = 0
9407
9408 ;
9409 return 0;
9410}
9411_ACEOF
9412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413if { (ac_try="$ac_compile"
9414case "(($ac_try" in
9415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9416 *) ac_try_echo=$ac_try;;
9417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009421 grep -v '^ *+' conftest.er1 >conftest.err
9422 rm -f conftest.er1
9423 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 (exit $ac_status); } && {
9426 test -z "$ac_c_werror_flag" ||
9427 test ! -s conftest.err
9428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 ac_hi=-1 ac_mid=-1
9430 while :; do
9431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009432/* confdefs.h. */
9433_ACEOF
9434cat confdefs.h >>conftest.$ac_ext
9435cat >>conftest.$ac_ext <<_ACEOF
9436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009438 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009439int
9440main ()
9441{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009443test_array [0] = 0
9444
9445 ;
9446 return 0;
9447}
9448_ACEOF
9449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450if { (ac_try="$ac_compile"
9451case "(($ac_try" in
9452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9453 *) ac_try_echo=$ac_try;;
9454esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009458 grep -v '^ *+' conftest.er1 >conftest.err
9459 rm -f conftest.er1
9460 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462 (exit $ac_status); } && {
9463 test -z "$ac_c_werror_flag" ||
9464 test ! -s conftest.err
9465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ac_lo=$ac_mid; break
9467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009469sed 's/^/| /' conftest.$ac_ext >&5
9470
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 ac_hi=`expr '(' $ac_mid ')' - 1`
9472 if test $ac_mid -le $ac_hi; then
9473 ac_lo= ac_hi=
9474 break
9475 fi
9476 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478
9479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 done
9481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009483sed 's/^/| /' conftest.$ac_ext >&5
9484
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487
9488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490
9491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009492# Binary search between lo and hi bounds.
9493while test "x$ac_lo" != "x$ac_hi"; do
9494 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* confdefs.h. */
9497_ACEOF
9498cat confdefs.h >>conftest.$ac_ext
9499cat >>conftest.$ac_ext <<_ACEOF
9500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009502 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009503int
9504main ()
9505{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009507test_array [0] = 0
9508
9509 ;
9510 return 0;
9511}
9512_ACEOF
9513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009514if { (ac_try="$ac_compile"
9515case "(($ac_try" in
9516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9517 *) ac_try_echo=$ac_try;;
9518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009522 grep -v '^ *+' conftest.er1 >conftest.err
9523 rm -f conftest.er1
9524 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009526 (exit $ac_status); } && {
9527 test -z "$ac_c_werror_flag" ||
9528 test ! -s conftest.err
9529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 ac_hi=$ac_mid
9531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009533sed 's/^/| /' conftest.$ac_ext >&5
9534
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009537
9538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009539done
9540case $ac_lo in
9541?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009542'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009543 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009544See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009545echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009546See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009547 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 else
9549 ac_cv_sizeof_float=0
9550 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009551esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009552else
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009554/* confdefs.h. */
9555_ACEOF
9556cat confdefs.h >>conftest.$ac_ext
9557cat >>conftest.$ac_ext <<_ACEOF
9558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009559$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009560 typedef float ac__type_sizeof_;
9561static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9562static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009563#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009564#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009565int
9566main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009567{
Martin v. Löwis11437992002-04-12 09:54:03 +00009568
9569 FILE *f = fopen ("conftest.val", "w");
9570 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009572 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009574 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009575 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009577 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 }
9579 else
9580 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009582 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009584 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009586 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587
9588 ;
9589 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009590}
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
9592rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593if { (ac_try="$ac_link"
9594case "(($ac_try" in
9595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9596 *) ac_try_echo=$ac_try;;
9597esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009599 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603 { (case "(($ac_try" in
9604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9605 *) ac_try_echo=$ac_try;;
9606esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 (exit $ac_status); }; }; then
9612 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009613else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009614 echo "$as_me: program exited with status $ac_status" >&5
9615echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009616sed 's/^/| /' conftest.$ac_ext >&5
9617
Martin v. Löwis11437992002-04-12 09:54:03 +00009618( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009619if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009620 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009621See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009622echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009623See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009624 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625 else
9626 ac_cv_sizeof_float=0
9627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009629rm -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 +00009630fi
9631rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009633{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9634echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009635
9636
9637
Martin v. Löwis11437992002-04-12 09:54:03 +00009638cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009639#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009640_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009641
9642
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009643{ echo "$as_me:$LINENO: checking for double" >&5
9644echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9645if test "${ac_cv_type_double+set}" = set; then
9646 echo $ECHO_N "(cached) $ECHO_C" >&6
9647else
9648 cat >conftest.$ac_ext <<_ACEOF
9649/* confdefs.h. */
9650_ACEOF
9651cat confdefs.h >>conftest.$ac_ext
9652cat >>conftest.$ac_ext <<_ACEOF
9653/* end confdefs.h. */
9654$ac_includes_default
9655typedef double ac__type_new_;
9656int
9657main ()
9658{
9659if ((ac__type_new_ *) 0)
9660 return 0;
9661if (sizeof (ac__type_new_))
9662 return 0;
9663 ;
9664 return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
9668if { (ac_try="$ac_compile"
9669case "(($ac_try" in
9670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671 *) ac_try_echo=$ac_try;;
9672esac
9673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9674 (eval "$ac_compile") 2>conftest.er1
9675 ac_status=$?
9676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680 (exit $ac_status); } && {
9681 test -z "$ac_c_werror_flag" ||
9682 test ! -s conftest.err
9683 } && test -s conftest.$ac_objext; then
9684 ac_cv_type_double=yes
9685else
9686 echo "$as_me: failed program was:" >&5
9687sed 's/^/| /' conftest.$ac_ext >&5
9688
9689 ac_cv_type_double=no
9690fi
9691
9692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9693fi
9694{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9695echo "${ECHO_T}$ac_cv_type_double" >&6; }
9696
Martin v. Löwiseba40652007-08-30 20:10:57 +00009697# The cast to long int works around a bug in the HP C Compiler
9698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9700# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009701{ echo "$as_me:$LINENO: checking size of double" >&5
9702echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009703if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009704 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009705else
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 if test "$cross_compiling" = yes; then
9707 # Depending upon the size, compute the lo and hi bounds.
9708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009715 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009720test_array [0] = 0
9721
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727if { (ac_try="$ac_compile"
9728case "(($ac_try" in
9729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9730 *) ac_try_echo=$ac_try;;
9731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735 grep -v '^ *+' conftest.er1 >conftest.err
9736 rm -f conftest.er1
9737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 (exit $ac_status); } && {
9740 test -z "$ac_c_werror_flag" ||
9741 test ! -s conftest.err
9742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_lo=0 ac_mid=0
9744 while :; do
9745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* confdefs.h. */
9747_ACEOF
9748cat confdefs.h >>conftest.$ac_ext
9749cat >>conftest.$ac_ext <<_ACEOF
9750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009751$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009752 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753int
9754main ()
9755{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009757test_array [0] = 0
9758
9759 ;
9760 return 0;
9761}
9762_ACEOF
9763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764if { (ac_try="$ac_compile"
9765case "(($ac_try" in
9766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9767 *) ac_try_echo=$ac_try;;
9768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009772 grep -v '^ *+' conftest.er1 >conftest.err
9773 rm -f conftest.er1
9774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009776 (exit $ac_status); } && {
9777 test -z "$ac_c_werror_flag" ||
9778 test ! -s conftest.err
9779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_hi=$ac_mid; break
9781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 ac_lo=`expr $ac_mid + 1`
9786 if test $ac_lo -le $ac_mid; then
9787 ac_lo= ac_hi=
9788 break
9789 fi
9790 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 done
9795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009797sed 's/^/| /' conftest.$ac_ext >&5
9798
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* confdefs.h. */
9801_ACEOF
9802cat confdefs.h >>conftest.$ac_ext
9803cat >>conftest.$ac_ext <<_ACEOF
9804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009805$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009806 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009807int
9808main ()
9809{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009811test_array [0] = 0
9812
9813 ;
9814 return 0;
9815}
9816_ACEOF
9817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818if { (ac_try="$ac_compile"
9819case "(($ac_try" in
9820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9821 *) ac_try_echo=$ac_try;;
9822esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009826 grep -v '^ *+' conftest.er1 >conftest.err
9827 rm -f conftest.er1
9828 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 (exit $ac_status); } && {
9831 test -z "$ac_c_werror_flag" ||
9832 test ! -s conftest.err
9833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_hi=-1 ac_mid=-1
9835 while :; do
9836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* confdefs.h. */
9838_ACEOF
9839cat confdefs.h >>conftest.$ac_ext
9840cat >>conftest.$ac_ext <<_ACEOF
9841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009843 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009844int
9845main ()
9846{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009847static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009848test_array [0] = 0
9849
9850 ;
9851 return 0;
9852}
9853_ACEOF
9854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855if { (ac_try="$ac_compile"
9856case "(($ac_try" in
9857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9858 *) ac_try_echo=$ac_try;;
9859esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009863 grep -v '^ *+' conftest.er1 >conftest.err
9864 rm -f conftest.er1
9865 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867 (exit $ac_status); } && {
9868 test -z "$ac_c_werror_flag" ||
9869 test ! -s conftest.err
9870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_lo=$ac_mid; break
9872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009874sed 's/^/| /' conftest.$ac_ext >&5
9875
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876 ac_hi=`expr '(' $ac_mid ')' - 1`
9877 if test $ac_mid -le $ac_hi; then
9878 ac_lo= ac_hi=
9879 break
9880 fi
9881 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883
9884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 done
9886else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009888sed 's/^/| /' conftest.$ac_ext >&5
9889
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892
9893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895
9896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009897# Binary search between lo and hi bounds.
9898while test "x$ac_lo" != "x$ac_hi"; do
9899 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009901/* confdefs.h. */
9902_ACEOF
9903cat confdefs.h >>conftest.$ac_ext
9904cat >>conftest.$ac_ext <<_ACEOF
9905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009906$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009907 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009908int
9909main ()
9910{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009912test_array [0] = 0
9913
9914 ;
9915 return 0;
9916}
9917_ACEOF
9918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009919if { (ac_try="$ac_compile"
9920case "(($ac_try" in
9921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9922 *) ac_try_echo=$ac_try;;
9923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009927 grep -v '^ *+' conftest.er1 >conftest.err
9928 rm -f conftest.er1
9929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009931 (exit $ac_status); } && {
9932 test -z "$ac_c_werror_flag" ||
9933 test ! -s conftest.err
9934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 ac_hi=$ac_mid
9936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009938sed 's/^/| /' conftest.$ac_ext >&5
9939
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009942
9943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009944done
9945case $ac_lo in
9946?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009947'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009948 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009949See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009950echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009951See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009952 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 else
9954 ac_cv_sizeof_double=0
9955 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009956esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009957else
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* confdefs.h. */
9960_ACEOF
9961cat confdefs.h >>conftest.$ac_ext
9962cat >>conftest.$ac_ext <<_ACEOF
9963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009964$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009965 typedef double ac__type_sizeof_;
9966static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9967static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009968#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009969#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009970int
9971main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009972{
Martin v. Löwis11437992002-04-12 09:54:03 +00009973
9974 FILE *f = fopen ("conftest.val", "w");
9975 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009977 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009980 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009982 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 }
9984 else
9985 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009987 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009988 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009989 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009991 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009992
9993 ;
9994 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009995}
Martin v. Löwis11437992002-04-12 09:54:03 +00009996_ACEOF
9997rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998if { (ac_try="$ac_link"
9999case "(($ac_try" in
10000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10001 *) ac_try_echo=$ac_try;;
10002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010004 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008 { (case "(($ac_try" in
10009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10010 *) ac_try_echo=$ac_try;;
10011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 (exit $ac_status); }; }; then
10017 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010019 echo "$as_me: program exited with status $ac_status" >&5
10020echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010021sed 's/^/| /' conftest.$ac_ext >&5
10022
Martin v. Löwis11437992002-04-12 09:54:03 +000010023( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010024if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010025 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010026See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010027echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010028See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010029 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030 else
10031 ac_cv_sizeof_double=0
10032 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010034rm -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 +000010035fi
10036rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010037fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010038{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10039echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010040
10041
10042
Martin v. Löwis11437992002-04-12 09:54:03 +000010043cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010044#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010045_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010046
10047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010048{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10049echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10050if test "${ac_cv_type_fpos_t+set}" = set; then
10051 echo $ECHO_N "(cached) $ECHO_C" >&6
10052else
10053 cat >conftest.$ac_ext <<_ACEOF
10054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
10059$ac_includes_default
10060typedef fpos_t ac__type_new_;
10061int
10062main ()
10063{
10064if ((ac__type_new_ *) 0)
10065 return 0;
10066if (sizeof (ac__type_new_))
10067 return 0;
10068 ;
10069 return 0;
10070}
10071_ACEOF
10072rm -f conftest.$ac_objext
10073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
10078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10079 (eval "$ac_compile") 2>conftest.er1
10080 ac_status=$?
10081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
10084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10085 (exit $ac_status); } && {
10086 test -z "$ac_c_werror_flag" ||
10087 test ! -s conftest.err
10088 } && test -s conftest.$ac_objext; then
10089 ac_cv_type_fpos_t=yes
10090else
10091 echo "$as_me: failed program was:" >&5
10092sed 's/^/| /' conftest.$ac_ext >&5
10093
10094 ac_cv_type_fpos_t=no
10095fi
10096
10097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10098fi
10099{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10100echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10101
Martin v. Löwiseba40652007-08-30 20:10:57 +000010102# The cast to long int works around a bug in the HP C Compiler
10103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10105# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010106{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10107echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010108if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010109 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010110else
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 if test "$cross_compiling" = yes; then
10112 # Depending upon the size, compute the lo and hi bounds.
10113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010114/* confdefs.h. */
10115_ACEOF
10116cat confdefs.h >>conftest.$ac_ext
10117cat >>conftest.$ac_ext <<_ACEOF
10118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010119$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010120 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010125test_array [0] = 0
10126
10127 ;
10128 return 0;
10129}
10130_ACEOF
10131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132if { (ac_try="$ac_compile"
10133case "(($ac_try" in
10134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10135 *) ac_try_echo=$ac_try;;
10136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 grep -v '^ *+' conftest.er1 >conftest.err
10141 rm -f conftest.er1
10142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 (exit $ac_status); } && {
10145 test -z "$ac_c_werror_flag" ||
10146 test ! -s conftest.err
10147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_lo=0 ac_mid=0
10149 while :; do
10150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* confdefs.h. */
10152_ACEOF
10153cat confdefs.h >>conftest.$ac_ext
10154cat >>conftest.$ac_ext <<_ACEOF
10155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010157 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010162test_array [0] = 0
10163
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010177 grep -v '^ *+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010181 (exit $ac_status); } && {
10182 test -z "$ac_c_werror_flag" ||
10183 test ! -s conftest.err
10184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_hi=$ac_mid; break
10186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 ac_lo=`expr $ac_mid + 1`
10191 if test $ac_lo -le $ac_mid; then
10192 ac_lo= ac_hi=
10193 break
10194 fi
10195 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197
10198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 done
10200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010202sed 's/^/| /' conftest.$ac_ext >&5
10203
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010205/* confdefs.h. */
10206_ACEOF
10207cat confdefs.h >>conftest.$ac_ext
10208cat >>conftest.$ac_ext <<_ACEOF
10209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010210$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010211 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010215static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010216test_array [0] = 0
10217
10218 ;
10219 return 0;
10220}
10221_ACEOF
10222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223if { (ac_try="$ac_compile"
10224case "(($ac_try" in
10225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10226 *) ac_try_echo=$ac_try;;
10227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010231 grep -v '^ *+' conftest.er1 >conftest.err
10232 rm -f conftest.er1
10233 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235 (exit $ac_status); } && {
10236 test -z "$ac_c_werror_flag" ||
10237 test ! -s conftest.err
10238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 ac_hi=-1 ac_mid=-1
10240 while :; do
10241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010242/* confdefs.h. */
10243_ACEOF
10244cat confdefs.h >>conftest.$ac_ext
10245cat >>conftest.$ac_ext <<_ACEOF
10246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010247$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010248 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010249int
10250main ()
10251{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010252static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010253test_array [0] = 0
10254
10255 ;
10256 return 0;
10257}
10258_ACEOF
10259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260if { (ac_try="$ac_compile"
10261case "(($ac_try" in
10262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10263 *) ac_try_echo=$ac_try;;
10264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010268 grep -v '^ *+' conftest.er1 >conftest.err
10269 rm -f conftest.er1
10270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010272 (exit $ac_status); } && {
10273 test -z "$ac_c_werror_flag" ||
10274 test ! -s conftest.err
10275 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ac_lo=$ac_mid; break
10277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010279sed 's/^/| /' conftest.$ac_ext >&5
10280
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 ac_hi=`expr '(' $ac_mid ')' - 1`
10282 if test $ac_mid -le $ac_hi; then
10283 ac_lo= ac_hi=
10284 break
10285 fi
10286 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288
10289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 done
10291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010293sed 's/^/| /' conftest.$ac_ext >&5
10294
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297
10298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300
10301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010302# Binary search between lo and hi bounds.
10303while test "x$ac_lo" != "x$ac_hi"; do
10304 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010306/* confdefs.h. */
10307_ACEOF
10308cat confdefs.h >>conftest.$ac_ext
10309cat >>conftest.$ac_ext <<_ACEOF
10310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010311$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010312 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010313int
10314main ()
10315{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010317test_array [0] = 0
10318
10319 ;
10320 return 0;
10321}
10322_ACEOF
10323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010324if { (ac_try="$ac_compile"
10325case "(($ac_try" in
10326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10327 *) ac_try_echo=$ac_try;;
10328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010332 grep -v '^ *+' conftest.er1 >conftest.err
10333 rm -f conftest.er1
10334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010336 (exit $ac_status); } && {
10337 test -z "$ac_c_werror_flag" ||
10338 test ! -s conftest.err
10339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 ac_hi=$ac_mid
10341else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010343sed 's/^/| /' conftest.$ac_ext >&5
10344
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347
10348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010349done
10350case $ac_lo in
10351?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010352'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010353 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010354See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010355echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010356See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010357 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358 else
10359 ac_cv_sizeof_fpos_t=0
10360 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010361esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* confdefs.h. */
10365_ACEOF
10366cat confdefs.h >>conftest.$ac_ext
10367cat >>conftest.$ac_ext <<_ACEOF
10368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010369$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010370 typedef fpos_t ac__type_sizeof_;
10371static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10372static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010373#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010374#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010375int
10376main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010377{
Martin v. Löwis11437992002-04-12 09:54:03 +000010378
10379 FILE *f = fopen ("conftest.val", "w");
10380 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010381 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010382 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010384 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010385 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010386 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010387 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 }
10389 else
10390 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010391 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010392 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010394 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010396 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
10398 ;
10399 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010400}
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
10402rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010403if { (ac_try="$ac_link"
10404case "(($ac_try" in
10405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10406 *) ac_try_echo=$ac_try;;
10407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010409 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010413 { (case "(($ac_try" in
10414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10415 *) ac_try_echo=$ac_try;;
10416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 (exit $ac_status); }; }; then
10422 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010423else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010424 echo "$as_me: program exited with status $ac_status" >&5
10425echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010426sed 's/^/| /' conftest.$ac_ext >&5
10427
Martin v. Löwis11437992002-04-12 09:54:03 +000010428( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010429if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010430 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010431See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010432echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010433See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010434 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010435 else
10436 ac_cv_sizeof_fpos_t=0
10437 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010439rm -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 +000010440fi
10441rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010443{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10444echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010445
10446
10447
Martin v. Löwis11437992002-04-12 09:54:03 +000010448cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010449#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010450_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010451
Michael W. Hudson54241132001-12-07 15:38:26 +000010452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010453{ echo "$as_me:$LINENO: checking for size_t" >&5
10454echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10455if test "${ac_cv_type_size_t+set}" = set; then
10456 echo $ECHO_N "(cached) $ECHO_C" >&6
10457else
10458 cat >conftest.$ac_ext <<_ACEOF
10459/* confdefs.h. */
10460_ACEOF
10461cat confdefs.h >>conftest.$ac_ext
10462cat >>conftest.$ac_ext <<_ACEOF
10463/* end confdefs.h. */
10464$ac_includes_default
10465typedef size_t ac__type_new_;
10466int
10467main ()
10468{
10469if ((ac__type_new_ *) 0)
10470 return 0;
10471if (sizeof (ac__type_new_))
10472 return 0;
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext
10478if { (ac_try="$ac_compile"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
10483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10484 (eval "$ac_compile") 2>conftest.er1
10485 ac_status=$?
10486 grep -v '^ *+' conftest.er1 >conftest.err
10487 rm -f conftest.er1
10488 cat conftest.err >&5
10489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10490 (exit $ac_status); } && {
10491 test -z "$ac_c_werror_flag" ||
10492 test ! -s conftest.err
10493 } && test -s conftest.$ac_objext; then
10494 ac_cv_type_size_t=yes
10495else
10496 echo "$as_me: failed program was:" >&5
10497sed 's/^/| /' conftest.$ac_ext >&5
10498
10499 ac_cv_type_size_t=no
10500fi
10501
10502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10503fi
10504{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10505echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10506
Martin v. Löwiseba40652007-08-30 20:10:57 +000010507# The cast to long int works around a bug in the HP C Compiler
10508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10510# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010511{ echo "$as_me:$LINENO: checking size of size_t" >&5
10512echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516 if test "$cross_compiling" = yes; then
10517 # Depending upon the size, compute the lo and hi bounds.
10518cat >conftest.$ac_ext <<_ACEOF
10519/* confdefs.h. */
10520_ACEOF
10521cat confdefs.h >>conftest.$ac_ext
10522cat >>conftest.$ac_ext <<_ACEOF
10523/* end confdefs.h. */
10524$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010525 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526int
10527main ()
10528{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530test_array [0] = 0
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
10536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537if { (ac_try="$ac_compile"
10538case "(($ac_try" in
10539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10540 *) ac_try_echo=$ac_try;;
10541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544 ac_status=$?
10545 grep -v '^ *+' conftest.er1 >conftest.err
10546 rm -f conftest.er1
10547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549 (exit $ac_status); } && {
10550 test -z "$ac_c_werror_flag" ||
10551 test ! -s conftest.err
10552 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_lo=0 ac_mid=0
10554 while :; do
10555 cat >conftest.$ac_ext <<_ACEOF
10556/* confdefs.h. */
10557_ACEOF
10558cat confdefs.h >>conftest.$ac_ext
10559cat >>conftest.$ac_ext <<_ACEOF
10560/* end confdefs.h. */
10561$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010562 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563int
10564main ()
10565{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567test_array [0] = 0
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574if { (ac_try="$ac_compile"
10575case "(($ac_try" in
10576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10577 *) ac_try_echo=$ac_try;;
10578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581 ac_status=$?
10582 grep -v '^ *+' conftest.er1 >conftest.err
10583 rm -f conftest.er1
10584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010586 (exit $ac_status); } && {
10587 test -z "$ac_c_werror_flag" ||
10588 test ! -s conftest.err
10589 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 ac_hi=$ac_mid; break
10591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 ac_lo=`expr $ac_mid + 1`
10596 if test $ac_lo -le $ac_mid; then
10597 ac_lo= ac_hi=
10598 break
10599 fi
10600 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602
10603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604 done
10605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010606 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607sed 's/^/| /' conftest.$ac_ext >&5
10608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610/* confdefs.h. */
10611_ACEOF
10612cat confdefs.h >>conftest.$ac_ext
10613cat >>conftest.$ac_ext <<_ACEOF
10614/* end confdefs.h. */
10615$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010616 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617int
10618main ()
10619{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621test_array [0] = 0
10622
10623 ;
10624 return 0;
10625}
10626_ACEOF
10627rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010628if { (ac_try="$ac_compile"
10629case "(($ac_try" in
10630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10631 *) ac_try_echo=$ac_try;;
10632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 ac_status=$?
10636 grep -v '^ *+' conftest.er1 >conftest.err
10637 rm -f conftest.er1
10638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010640 (exit $ac_status); } && {
10641 test -z "$ac_c_werror_flag" ||
10642 test ! -s conftest.err
10643 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 ac_hi=-1 ac_mid=-1
10645 while :; do
10646 cat >conftest.$ac_ext <<_ACEOF
10647/* confdefs.h. */
10648_ACEOF
10649cat confdefs.h >>conftest.$ac_ext
10650cat >>conftest.$ac_ext <<_ACEOF
10651/* end confdefs.h. */
10652$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010653 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654int
10655main ()
10656{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658test_array [0] = 0
10659
10660 ;
10661 return 0;
10662}
10663_ACEOF
10664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010665if { (ac_try="$ac_compile"
10666case "(($ac_try" in
10667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10668 *) ac_try_echo=$ac_try;;
10669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 ac_status=$?
10673 grep -v '^ *+' conftest.er1 >conftest.err
10674 rm -f conftest.er1
10675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010677 (exit $ac_status); } && {
10678 test -z "$ac_c_werror_flag" ||
10679 test ! -s conftest.err
10680 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681 ac_lo=$ac_mid; break
10682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010683 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684sed 's/^/| /' conftest.$ac_ext >&5
10685
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686 ac_hi=`expr '(' $ac_mid ')' - 1`
10687 if test $ac_mid -le $ac_hi; then
10688 ac_lo= ac_hi=
10689 break
10690 fi
10691 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693
10694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695 done
10696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010697 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698sed 's/^/| /' conftest.$ac_ext >&5
10699
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702
10703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705
10706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707# Binary search between lo and hi bounds.
10708while test "x$ac_lo" != "x$ac_hi"; do
10709 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10710 cat >conftest.$ac_ext <<_ACEOF
10711/* confdefs.h. */
10712_ACEOF
10713cat confdefs.h >>conftest.$ac_ext
10714cat >>conftest.$ac_ext <<_ACEOF
10715/* end confdefs.h. */
10716$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010717 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010718int
10719main ()
10720{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010722test_array [0] = 0
10723
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010729if { (ac_try="$ac_compile"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736 ac_status=$?
10737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010741 (exit $ac_status); } && {
10742 test -z "$ac_c_werror_flag" ||
10743 test ! -s conftest.err
10744 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745 ac_hi=$ac_mid
10746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010747 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010748sed 's/^/| /' conftest.$ac_ext >&5
10749
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752
10753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754done
10755case $ac_lo in
10756?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010757'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010758 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010759See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010760echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010762 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010763 else
10764 ac_cv_sizeof_size_t=0
10765 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010766esac
10767else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010768 cat >conftest.$ac_ext <<_ACEOF
10769/* confdefs.h. */
10770_ACEOF
10771cat confdefs.h >>conftest.$ac_ext
10772cat >>conftest.$ac_ext <<_ACEOF
10773/* end confdefs.h. */
10774$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010775 typedef size_t ac__type_sizeof_;
10776static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10777static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010778#include <stdio.h>
10779#include <stdlib.h>
10780int
10781main ()
10782{
10783
10784 FILE *f = fopen ("conftest.val", "w");
10785 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010786 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010787 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010788 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010790 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010792 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793 }
10794 else
10795 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010796 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010797 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010798 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010799 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010800 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010801 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010802
10803 ;
10804 return 0;
10805}
10806_ACEOF
10807rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010808if { (ac_try="$ac_link"
10809case "(($ac_try" in
10810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10811 *) ac_try_echo=$ac_try;;
10812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010814 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010815 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818 { (case "(($ac_try" in
10819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10820 *) ac_try_echo=$ac_try;;
10821esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010823 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010824 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010826 (exit $ac_status); }; }; then
10827 ac_cv_sizeof_size_t=`cat conftest.val`
10828else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010829 echo "$as_me: program exited with status $ac_status" >&5
10830echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010831sed 's/^/| /' conftest.$ac_ext >&5
10832
10833( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010834if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010835 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010836See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010837echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010838See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010839 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010840 else
10841 ac_cv_sizeof_size_t=0
10842 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010844rm -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 +000010845fi
10846rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010847fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010848{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10849echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850
10851
10852
Martin v. Löwis18e16552006-02-15 17:27:45 +000010853cat >>confdefs.h <<_ACEOF
10854#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10855_ACEOF
10856
10857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010858{ echo "$as_me:$LINENO: checking for pid_t" >&5
10859echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10860if test "${ac_cv_type_pid_t+set}" = set; then
10861 echo $ECHO_N "(cached) $ECHO_C" >&6
10862else
10863 cat >conftest.$ac_ext <<_ACEOF
10864/* confdefs.h. */
10865_ACEOF
10866cat confdefs.h >>conftest.$ac_ext
10867cat >>conftest.$ac_ext <<_ACEOF
10868/* end confdefs.h. */
10869$ac_includes_default
10870typedef pid_t ac__type_new_;
10871int
10872main ()
10873{
10874if ((ac__type_new_ *) 0)
10875 return 0;
10876if (sizeof (ac__type_new_))
10877 return 0;
10878 ;
10879 return 0;
10880}
10881_ACEOF
10882rm -f conftest.$ac_objext
10883if { (ac_try="$ac_compile"
10884case "(($ac_try" in
10885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10886 *) ac_try_echo=$ac_try;;
10887esac
10888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10889 (eval "$ac_compile") 2>conftest.er1
10890 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1
10893 cat conftest.err >&5
10894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err
10898 } && test -s conftest.$ac_objext; then
10899 ac_cv_type_pid_t=yes
10900else
10901 echo "$as_me: failed program was:" >&5
10902sed 's/^/| /' conftest.$ac_ext >&5
10903
10904 ac_cv_type_pid_t=no
10905fi
10906
10907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10908fi
10909{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10910echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10911
Christian Heimes951cc0f2008-01-31 23:08:23 +000010912# The cast to long int works around a bug in the HP C Compiler
10913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10915# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010916{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10917echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010918if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010919 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010920else
10921 if test "$cross_compiling" = yes; then
10922 # Depending upon the size, compute the lo and hi bounds.
10923cat >conftest.$ac_ext <<_ACEOF
10924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
10929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010930 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010931int
10932main ()
10933{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010935test_array [0] = 0
10936
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext
10942if { (ac_try="$ac_compile"
10943case "(($ac_try" in
10944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10945 *) ac_try_echo=$ac_try;;
10946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010948 (eval "$ac_compile") 2>conftest.er1
10949 ac_status=$?
10950 grep -v '^ *+' conftest.er1 >conftest.err
10951 rm -f conftest.er1
10952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954 (exit $ac_status); } && {
10955 test -z "$ac_c_werror_flag" ||
10956 test ! -s conftest.err
10957 } && test -s conftest.$ac_objext; then
10958 ac_lo=0 ac_mid=0
10959 while :; do
10960 cat >conftest.$ac_ext <<_ACEOF
10961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
10966$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010968int
10969main ()
10970{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010972test_array [0] = 0
10973
10974 ;
10975 return 0;
10976}
10977_ACEOF
10978rm -f conftest.$ac_objext
10979if { (ac_try="$ac_compile"
10980case "(($ac_try" in
10981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10982 *) ac_try_echo=$ac_try;;
10983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010985 (eval "$ac_compile") 2>conftest.er1
10986 ac_status=$?
10987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991 (exit $ac_status); } && {
10992 test -z "$ac_c_werror_flag" ||
10993 test ! -s conftest.err
10994 } && test -s conftest.$ac_objext; then
10995 ac_hi=$ac_mid; break
10996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998sed 's/^/| /' conftest.$ac_ext >&5
10999
11000 ac_lo=`expr $ac_mid + 1`
11001 if test $ac_lo -le $ac_mid; then
11002 ac_lo= ac_hi=
11003 break
11004 fi
11005 ac_mid=`expr 2 '*' $ac_mid + 1`
11006fi
11007
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009 done
11010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011011 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011012sed 's/^/| /' conftest.$ac_ext >&5
11013
11014 cat >conftest.$ac_ext <<_ACEOF
11015/* confdefs.h. */
11016_ACEOF
11017cat confdefs.h >>conftest.$ac_ext
11018cat >>conftest.$ac_ext <<_ACEOF
11019/* end confdefs.h. */
11020$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011021 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011022int
11023main ()
11024{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011026test_array [0] = 0
11027
11028 ;
11029 return 0;
11030}
11031_ACEOF
11032rm -f conftest.$ac_objext
11033if { (ac_try="$ac_compile"
11034case "(($ac_try" in
11035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11036 *) ac_try_echo=$ac_try;;
11037esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011039 (eval "$ac_compile") 2>conftest.er1
11040 ac_status=$?
11041 grep -v '^ *+' conftest.er1 >conftest.err
11042 rm -f conftest.er1
11043 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011045 (exit $ac_status); } && {
11046 test -z "$ac_c_werror_flag" ||
11047 test ! -s conftest.err
11048 } && test -s conftest.$ac_objext; then
11049 ac_hi=-1 ac_mid=-1
11050 while :; do
11051 cat >conftest.$ac_ext <<_ACEOF
11052/* confdefs.h. */
11053_ACEOF
11054cat confdefs.h >>conftest.$ac_ext
11055cat >>conftest.$ac_ext <<_ACEOF
11056/* end confdefs.h. */
11057$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011058 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011059int
11060main ()
11061{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011063test_array [0] = 0
11064
11065 ;
11066 return 0;
11067}
11068_ACEOF
11069rm -f conftest.$ac_objext
11070if { (ac_try="$ac_compile"
11071case "(($ac_try" in
11072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11073 *) ac_try_echo=$ac_try;;
11074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011076 (eval "$ac_compile") 2>conftest.er1
11077 ac_status=$?
11078 grep -v '^ *+' conftest.er1 >conftest.err
11079 rm -f conftest.er1
11080 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011082 (exit $ac_status); } && {
11083 test -z "$ac_c_werror_flag" ||
11084 test ! -s conftest.err
11085 } && test -s conftest.$ac_objext; then
11086 ac_lo=$ac_mid; break
11087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011088 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011089sed 's/^/| /' conftest.$ac_ext >&5
11090
11091 ac_hi=`expr '(' $ac_mid ')' - 1`
11092 if test $ac_mid -le $ac_hi; then
11093 ac_lo= ac_hi=
11094 break
11095 fi
11096 ac_mid=`expr 2 '*' $ac_mid`
11097fi
11098
11099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11100 done
11101else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011102 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011103sed 's/^/| /' conftest.$ac_ext >&5
11104
11105 ac_lo= ac_hi=
11106fi
11107
11108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11109fi
11110
11111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11112# Binary search between lo and hi bounds.
11113while test "x$ac_lo" != "x$ac_hi"; do
11114 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11115 cat >conftest.$ac_ext <<_ACEOF
11116/* confdefs.h. */
11117_ACEOF
11118cat confdefs.h >>conftest.$ac_ext
11119cat >>conftest.$ac_ext <<_ACEOF
11120/* end confdefs.h. */
11121$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011122 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123int
11124main ()
11125{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011127test_array [0] = 0
11128
11129 ;
11130 return 0;
11131}
11132_ACEOF
11133rm -f conftest.$ac_objext
11134if { (ac_try="$ac_compile"
11135case "(($ac_try" in
11136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11137 *) ac_try_echo=$ac_try;;
11138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 (eval "$ac_compile") 2>conftest.er1
11141 ac_status=$?
11142 grep -v '^ *+' conftest.er1 >conftest.err
11143 rm -f conftest.er1
11144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011146 (exit $ac_status); } && {
11147 test -z "$ac_c_werror_flag" ||
11148 test ! -s conftest.err
11149 } && test -s conftest.$ac_objext; then
11150 ac_hi=$ac_mid
11151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011152 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011153sed 's/^/| /' conftest.$ac_ext >&5
11154
11155 ac_lo=`expr '(' $ac_mid ')' + 1`
11156fi
11157
11158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11159done
11160case $ac_lo in
11161?*) ac_cv_sizeof_pid_t=$ac_lo;;
11162'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011165echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011166See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011167 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011168 else
11169 ac_cv_sizeof_pid_t=0
11170 fi ;;
11171esac
11172else
11173 cat >conftest.$ac_ext <<_ACEOF
11174/* confdefs.h. */
11175_ACEOF
11176cat confdefs.h >>conftest.$ac_ext
11177cat >>conftest.$ac_ext <<_ACEOF
11178/* end confdefs.h. */
11179$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011180 typedef pid_t ac__type_sizeof_;
11181static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11182static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011183#include <stdio.h>
11184#include <stdlib.h>
11185int
11186main ()
11187{
11188
11189 FILE *f = fopen ("conftest.val", "w");
11190 if (! f)
11191 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011192 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011193 {
11194 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011196 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011197 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011198 }
11199 else
11200 {
11201 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011203 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011204 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011205 }
11206 return ferror (f) || fclose (f) != 0;
11207
11208 ;
11209 return 0;
11210}
11211_ACEOF
11212rm -f conftest$ac_exeext
11213if { (ac_try="$ac_link"
11214case "(($ac_try" in
11215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11216 *) ac_try_echo=$ac_try;;
11217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011219 (eval "$ac_link") 2>&5
11220 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11223 { (case "(($ac_try" in
11224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11225 *) ac_try_echo=$ac_try;;
11226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011228 (eval "$ac_try") 2>&5
11229 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011231 (exit $ac_status); }; }; then
11232 ac_cv_sizeof_pid_t=`cat conftest.val`
11233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011234 echo "$as_me: program exited with status $ac_status" >&5
11235echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011236sed 's/^/| /' conftest.$ac_ext >&5
11237
11238( exit $ac_status )
11239if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011240 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011241See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011242echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011243See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011244 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011245 else
11246 ac_cv_sizeof_pid_t=0
11247 fi
11248fi
11249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11250fi
11251rm -f conftest.val
11252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011253{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11254echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011255
11256
11257
11258cat >>confdefs.h <<_ACEOF
11259#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11260_ACEOF
11261
11262
Michael W. Hudson54241132001-12-07 15:38:26 +000011263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011264{ echo "$as_me:$LINENO: checking for long long support" >&5
11265echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011266have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* confdefs.h. */
11269_ACEOF
11270cat confdefs.h >>conftest.$ac_ext
11271cat >>conftest.$ac_ext <<_ACEOF
11272/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011273
Martin v. Löwis11437992002-04-12 09:54:03 +000011274int
11275main ()
11276{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011277long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 ;
11279 return 0;
11280}
11281_ACEOF
11282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283if { (ac_try="$ac_compile"
11284case "(($ac_try" in
11285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11286 *) ac_try_echo=$ac_try;;
11287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011291 grep -v '^ *+' conftest.er1 >conftest.err
11292 rm -f conftest.er1
11293 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295 (exit $ac_status); } && {
11296 test -z "$ac_c_werror_flag" ||
11297 test ! -s conftest.err
11298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
11300
11301cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011302#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
11304
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011305 have_long_long=yes
11306
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011309sed 's/^/| /' conftest.$ac_ext >&5
11310
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011313
11314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011315{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11316echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011317if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011318{ echo "$as_me:$LINENO: checking for long long" >&5
11319echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11320if test "${ac_cv_type_long_long+set}" = set; then
11321 echo $ECHO_N "(cached) $ECHO_C" >&6
11322else
11323 cat >conftest.$ac_ext <<_ACEOF
11324/* confdefs.h. */
11325_ACEOF
11326cat confdefs.h >>conftest.$ac_ext
11327cat >>conftest.$ac_ext <<_ACEOF
11328/* end confdefs.h. */
11329$ac_includes_default
11330typedef long long ac__type_new_;
11331int
11332main ()
11333{
11334if ((ac__type_new_ *) 0)
11335 return 0;
11336if (sizeof (ac__type_new_))
11337 return 0;
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342rm -f conftest.$ac_objext
11343if { (ac_try="$ac_compile"
11344case "(($ac_try" in
11345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11346 *) ac_try_echo=$ac_try;;
11347esac
11348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11349 (eval "$ac_compile") 2>conftest.er1
11350 ac_status=$?
11351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
11354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355 (exit $ac_status); } && {
11356 test -z "$ac_c_werror_flag" ||
11357 test ! -s conftest.err
11358 } && test -s conftest.$ac_objext; then
11359 ac_cv_type_long_long=yes
11360else
11361 echo "$as_me: failed program was:" >&5
11362sed 's/^/| /' conftest.$ac_ext >&5
11363
11364 ac_cv_type_long_long=no
11365fi
11366
11367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11368fi
11369{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11370echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11371
Martin v. Löwiseba40652007-08-30 20:10:57 +000011372# The cast to long int works around a bug in the HP C Compiler
11373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11375# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011376{ echo "$as_me:$LINENO: checking size of long long" >&5
11377echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011378if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011380else
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 if test "$cross_compiling" = yes; then
11382 # Depending upon the size, compute the lo and hi bounds.
11383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011390 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011391int
11392main ()
11393{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011395test_array [0] = 0
11396
11397 ;
11398 return 0;
11399}
11400_ACEOF
11401rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402if { (ac_try="$ac_compile"
11403case "(($ac_try" in
11404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11405 *) ac_try_echo=$ac_try;;
11406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011410 grep -v '^ *+' conftest.er1 >conftest.err
11411 rm -f conftest.er1
11412 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 (exit $ac_status); } && {
11415 test -z "$ac_c_werror_flag" ||
11416 test ! -s conftest.err
11417 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_lo=0 ac_mid=0
11419 while :; do
11420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* confdefs.h. */
11422_ACEOF
11423cat confdefs.h >>conftest.$ac_ext
11424cat >>conftest.$ac_ext <<_ACEOF
11425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011426$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011427 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011432test_array [0] = 0
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439if { (ac_try="$ac_compile"
11440case "(($ac_try" in
11441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11442 *) ac_try_echo=$ac_try;;
11443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011447 grep -v '^ *+' conftest.er1 >conftest.err
11448 rm -f conftest.er1
11449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 (exit $ac_status); } && {
11452 test -z "$ac_c_werror_flag" ||
11453 test ! -s conftest.err
11454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_hi=$ac_mid; break
11456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011458sed 's/^/| /' conftest.$ac_ext >&5
11459
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 ac_lo=`expr $ac_mid + 1`
11461 if test $ac_lo -le $ac_mid; then
11462 ac_lo= ac_hi=
11463 break
11464 fi
11465 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467
11468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 done
11470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011472sed 's/^/| /' conftest.$ac_ext >&5
11473
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011475/* confdefs.h. */
11476_ACEOF
11477cat confdefs.h >>conftest.$ac_ext
11478cat >>conftest.$ac_ext <<_ACEOF
11479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011480$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011481 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
11483main ()
11484{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011485static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011486test_array [0] = 0
11487
11488 ;
11489 return 0;
11490}
11491_ACEOF
11492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011493if { (ac_try="$ac_compile"
11494case "(($ac_try" in
11495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11496 *) ac_try_echo=$ac_try;;
11497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011501 grep -v '^ *+' conftest.er1 >conftest.err
11502 rm -f conftest.er1
11503 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505 (exit $ac_status); } && {
11506 test -z "$ac_c_werror_flag" ||
11507 test ! -s conftest.err
11508 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 ac_hi=-1 ac_mid=-1
11510 while :; do
11511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011512/* confdefs.h. */
11513_ACEOF
11514cat confdefs.h >>conftest.$ac_ext
11515cat >>conftest.$ac_ext <<_ACEOF
11516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011517$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011518 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011519int
11520main ()
11521{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011522static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011523test_array [0] = 0
11524
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530if { (ac_try="$ac_compile"
11531case "(($ac_try" in
11532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11533 *) ac_try_echo=$ac_try;;
11534esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011538 grep -v '^ *+' conftest.er1 >conftest.err
11539 rm -f conftest.er1
11540 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542 (exit $ac_status); } && {
11543 test -z "$ac_c_werror_flag" ||
11544 test ! -s conftest.err
11545 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ac_lo=$ac_mid; break
11547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011549sed 's/^/| /' conftest.$ac_ext >&5
11550
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551 ac_hi=`expr '(' $ac_mid ')' - 1`
11552 if test $ac_mid -le $ac_hi; then
11553 ac_lo= ac_hi=
11554 break
11555 fi
11556 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558
11559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 done
11561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011563sed 's/^/| /' conftest.$ac_ext >&5
11564
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011567
11568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570
11571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011572# Binary search between lo and hi bounds.
11573while test "x$ac_lo" != "x$ac_hi"; do
11574 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011576/* confdefs.h. */
11577_ACEOF
11578cat confdefs.h >>conftest.$ac_ext
11579cat >>conftest.$ac_ext <<_ACEOF
11580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011581$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011582 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011583int
11584main ()
11585{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011586static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011587test_array [0] = 0
11588
11589 ;
11590 return 0;
11591}
11592_ACEOF
11593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594if { (ac_try="$ac_compile"
11595case "(($ac_try" in
11596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11597 *) ac_try_echo=$ac_try;;
11598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011602 grep -v '^ *+' conftest.er1 >conftest.err
11603 rm -f conftest.er1
11604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011606 (exit $ac_status); } && {
11607 test -z "$ac_c_werror_flag" ||
11608 test ! -s conftest.err
11609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 ac_hi=$ac_mid
11611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011613sed 's/^/| /' conftest.$ac_ext >&5
11614
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011617
11618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011619done
11620case $ac_lo in
11621?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011622'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011623 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011624See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011625echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011626See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011627 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011628 else
11629 ac_cv_sizeof_long_long=0
11630 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011631esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011632else
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011634/* confdefs.h. */
11635_ACEOF
11636cat confdefs.h >>conftest.$ac_ext
11637cat >>conftest.$ac_ext <<_ACEOF
11638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011639$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011640 typedef long long ac__type_sizeof_;
11641static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11642static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011643#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011644#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011645int
11646main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011647{
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
11649 FILE *f = fopen ("conftest.val", "w");
11650 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011651 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011652 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011654 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011655 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011656 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011657 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 }
11659 else
11660 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011661 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011662 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011663 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011664 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
11668 ;
11669 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011670}
Martin v. Löwis11437992002-04-12 09:54:03 +000011671_ACEOF
11672rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011673if { (ac_try="$ac_link"
11674case "(($ac_try" in
11675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11676 *) ac_try_echo=$ac_try;;
11677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011683 { (case "(($ac_try" in
11684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11685 *) ac_try_echo=$ac_try;;
11686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 (exit $ac_status); }; }; then
11692 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011694 echo "$as_me: program exited with status $ac_status" >&5
11695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011696sed 's/^/| /' conftest.$ac_ext >&5
11697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011700 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011701See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011702echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011703See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011704 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705 else
11706 ac_cv_sizeof_long_long=0
11707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011709rm -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 +000011710fi
11711rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011712fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011713{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11714echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011715
11716
11717
Martin v. Löwis11437992002-04-12 09:54:03 +000011718cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011719#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011720_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011721
Michael W. Hudson54241132001-12-07 15:38:26 +000011722
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011723fi
11724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011725{ echo "$as_me:$LINENO: checking for long double support" >&5
11726echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011727have_long_double=no
11728cat >conftest.$ac_ext <<_ACEOF
11729/* confdefs.h. */
11730_ACEOF
11731cat confdefs.h >>conftest.$ac_ext
11732cat >>conftest.$ac_ext <<_ACEOF
11733/* end confdefs.h. */
11734
11735int
11736main ()
11737{
11738long double x; x = (long double)0.;
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743rm -f conftest.$ac_objext
11744if { (ac_try="$ac_compile"
11745case "(($ac_try" in
11746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11747 *) ac_try_echo=$ac_try;;
11748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011750 (eval "$ac_compile") 2>conftest.er1
11751 ac_status=$?
11752 grep -v '^ *+' conftest.er1 >conftest.err
11753 rm -f conftest.er1
11754 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011756 (exit $ac_status); } && {
11757 test -z "$ac_c_werror_flag" ||
11758 test ! -s conftest.err
11759 } && test -s conftest.$ac_objext; then
11760
11761
11762cat >>confdefs.h <<\_ACEOF
11763#define HAVE_LONG_DOUBLE 1
11764_ACEOF
11765
11766 have_long_double=yes
11767
11768else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011769 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011770sed 's/^/| /' conftest.$ac_ext >&5
11771
11772
11773fi
11774
11775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011776{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11777echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011778if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011779{ echo "$as_me:$LINENO: checking for long double" >&5
11780echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11781if test "${ac_cv_type_long_double+set}" = set; then
11782 echo $ECHO_N "(cached) $ECHO_C" >&6
11783else
11784 cat >conftest.$ac_ext <<_ACEOF
11785/* confdefs.h. */
11786_ACEOF
11787cat confdefs.h >>conftest.$ac_ext
11788cat >>conftest.$ac_ext <<_ACEOF
11789/* end confdefs.h. */
11790$ac_includes_default
11791typedef long double ac__type_new_;
11792int
11793main ()
11794{
11795if ((ac__type_new_ *) 0)
11796 return 0;
11797if (sizeof (ac__type_new_))
11798 return 0;
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803rm -f conftest.$ac_objext
11804if { (ac_try="$ac_compile"
11805case "(($ac_try" in
11806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11807 *) ac_try_echo=$ac_try;;
11808esac
11809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11810 (eval "$ac_compile") 2>conftest.er1
11811 ac_status=$?
11812 grep -v '^ *+' conftest.er1 >conftest.err
11813 rm -f conftest.er1
11814 cat conftest.err >&5
11815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816 (exit $ac_status); } && {
11817 test -z "$ac_c_werror_flag" ||
11818 test ! -s conftest.err
11819 } && test -s conftest.$ac_objext; then
11820 ac_cv_type_long_double=yes
11821else
11822 echo "$as_me: failed program was:" >&5
11823sed 's/^/| /' conftest.$ac_ext >&5
11824
11825 ac_cv_type_long_double=no
11826fi
11827
11828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11829fi
11830{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11831echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11832
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011833# The cast to long int works around a bug in the HP C Compiler
11834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11836# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011837{ echo "$as_me:$LINENO: checking size of long double" >&5
11838echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011839if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011840 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011841else
11842 if test "$cross_compiling" = yes; then
11843 # Depending upon the size, compute the lo and hi bounds.
11844cat >conftest.$ac_ext <<_ACEOF
11845/* confdefs.h. */
11846_ACEOF
11847cat confdefs.h >>conftest.$ac_ext
11848cat >>conftest.$ac_ext <<_ACEOF
11849/* end confdefs.h. */
11850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011851 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011852int
11853main ()
11854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011856test_array [0] = 0
11857
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862rm -f conftest.$ac_objext
11863if { (ac_try="$ac_compile"
11864case "(($ac_try" in
11865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11866 *) ac_try_echo=$ac_try;;
11867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011869 (eval "$ac_compile") 2>conftest.er1
11870 ac_status=$?
11871 grep -v '^ *+' conftest.er1 >conftest.err
11872 rm -f conftest.er1
11873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875 (exit $ac_status); } && {
11876 test -z "$ac_c_werror_flag" ||
11877 test ! -s conftest.err
11878 } && test -s conftest.$ac_objext; then
11879 ac_lo=0 ac_mid=0
11880 while :; do
11881 cat >conftest.$ac_ext <<_ACEOF
11882/* confdefs.h. */
11883_ACEOF
11884cat confdefs.h >>conftest.$ac_ext
11885cat >>conftest.$ac_ext <<_ACEOF
11886/* end confdefs.h. */
11887$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011888 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011889int
11890main ()
11891{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011893test_array [0] = 0
11894
11895 ;
11896 return 0;
11897}
11898_ACEOF
11899rm -f conftest.$ac_objext
11900if { (ac_try="$ac_compile"
11901case "(($ac_try" in
11902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11903 *) ac_try_echo=$ac_try;;
11904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011906 (eval "$ac_compile") 2>conftest.er1
11907 ac_status=$?
11908 grep -v '^ *+' conftest.er1 >conftest.err
11909 rm -f conftest.er1
11910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011912 (exit $ac_status); } && {
11913 test -z "$ac_c_werror_flag" ||
11914 test ! -s conftest.err
11915 } && test -s conftest.$ac_objext; then
11916 ac_hi=$ac_mid; break
11917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919sed 's/^/| /' conftest.$ac_ext >&5
11920
11921 ac_lo=`expr $ac_mid + 1`
11922 if test $ac_lo -le $ac_mid; then
11923 ac_lo= ac_hi=
11924 break
11925 fi
11926 ac_mid=`expr 2 '*' $ac_mid + 1`
11927fi
11928
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930 done
11931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011932 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011933sed 's/^/| /' conftest.$ac_ext >&5
11934
11935 cat >conftest.$ac_ext <<_ACEOF
11936/* confdefs.h. */
11937_ACEOF
11938cat confdefs.h >>conftest.$ac_ext
11939cat >>conftest.$ac_ext <<_ACEOF
11940/* end confdefs.h. */
11941$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011942 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011943int
11944main ()
11945{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011947test_array [0] = 0
11948
11949 ;
11950 return 0;
11951}
11952_ACEOF
11953rm -f conftest.$ac_objext
11954if { (ac_try="$ac_compile"
11955case "(($ac_try" in
11956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11957 *) ac_try_echo=$ac_try;;
11958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011960 (eval "$ac_compile") 2>conftest.er1
11961 ac_status=$?
11962 grep -v '^ *+' conftest.er1 >conftest.err
11963 rm -f conftest.er1
11964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011966 (exit $ac_status); } && {
11967 test -z "$ac_c_werror_flag" ||
11968 test ! -s conftest.err
11969 } && test -s conftest.$ac_objext; then
11970 ac_hi=-1 ac_mid=-1
11971 while :; do
11972 cat >conftest.$ac_ext <<_ACEOF
11973/* confdefs.h. */
11974_ACEOF
11975cat confdefs.h >>conftest.$ac_ext
11976cat >>conftest.$ac_ext <<_ACEOF
11977/* end confdefs.h. */
11978$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011979 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011980int
11981main ()
11982{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011983static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011984test_array [0] = 0
11985
11986 ;
11987 return 0;
11988}
11989_ACEOF
11990rm -f conftest.$ac_objext
11991if { (ac_try="$ac_compile"
11992case "(($ac_try" in
11993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11994 *) ac_try_echo=$ac_try;;
11995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011997 (eval "$ac_compile") 2>conftest.er1
11998 ac_status=$?
11999 grep -v '^ *+' conftest.er1 >conftest.err
12000 rm -f conftest.er1
12001 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012003 (exit $ac_status); } && {
12004 test -z "$ac_c_werror_flag" ||
12005 test ! -s conftest.err
12006 } && test -s conftest.$ac_objext; then
12007 ac_lo=$ac_mid; break
12008else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012009 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012010sed 's/^/| /' conftest.$ac_ext >&5
12011
12012 ac_hi=`expr '(' $ac_mid ')' - 1`
12013 if test $ac_mid -le $ac_hi; then
12014 ac_lo= ac_hi=
12015 break
12016 fi
12017 ac_mid=`expr 2 '*' $ac_mid`
12018fi
12019
12020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12021 done
12022else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012023 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012024sed 's/^/| /' conftest.$ac_ext >&5
12025
12026 ac_lo= ac_hi=
12027fi
12028
12029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12030fi
12031
12032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12033# Binary search between lo and hi bounds.
12034while test "x$ac_lo" != "x$ac_hi"; do
12035 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12036 cat >conftest.$ac_ext <<_ACEOF
12037/* confdefs.h. */
12038_ACEOF
12039cat confdefs.h >>conftest.$ac_ext
12040cat >>conftest.$ac_ext <<_ACEOF
12041/* end confdefs.h. */
12042$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012043 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044int
12045main ()
12046{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012047static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012048test_array [0] = 0
12049
12050 ;
12051 return 0;
12052}
12053_ACEOF
12054rm -f conftest.$ac_objext
12055if { (ac_try="$ac_compile"
12056case "(($ac_try" in
12057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12058 *) ac_try_echo=$ac_try;;
12059esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061 (eval "$ac_compile") 2>conftest.er1
12062 ac_status=$?
12063 grep -v '^ *+' conftest.er1 >conftest.err
12064 rm -f conftest.er1
12065 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012067 (exit $ac_status); } && {
12068 test -z "$ac_c_werror_flag" ||
12069 test ! -s conftest.err
12070 } && test -s conftest.$ac_objext; then
12071 ac_hi=$ac_mid
12072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012074sed 's/^/| /' conftest.$ac_ext >&5
12075
12076 ac_lo=`expr '(' $ac_mid ')' + 1`
12077fi
12078
12079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12080done
12081case $ac_lo in
12082?*) ac_cv_sizeof_long_double=$ac_lo;;
12083'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012084 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012086echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012087See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012088 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012089 else
12090 ac_cv_sizeof_long_double=0
12091 fi ;;
12092esac
12093else
12094 cat >conftest.$ac_ext <<_ACEOF
12095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
12100$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012101 typedef long double ac__type_sizeof_;
12102static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12103static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012104#include <stdio.h>
12105#include <stdlib.h>
12106int
12107main ()
12108{
12109
12110 FILE *f = fopen ("conftest.val", "w");
12111 if (! f)
12112 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012113 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012114 {
12115 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012116 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012117 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012118 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012119 }
12120 else
12121 {
12122 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012123 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012124 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012125 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012126 }
12127 return ferror (f) || fclose (f) != 0;
12128
12129 ;
12130 return 0;
12131}
12132_ACEOF
12133rm -f conftest$ac_exeext
12134if { (ac_try="$ac_link"
12135case "(($ac_try" in
12136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12137 *) ac_try_echo=$ac_try;;
12138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012140 (eval "$ac_link") 2>&5
12141 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12144 { (case "(($ac_try" in
12145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12146 *) ac_try_echo=$ac_try;;
12147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012149 (eval "$ac_try") 2>&5
12150 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012152 (exit $ac_status); }; }; then
12153 ac_cv_sizeof_long_double=`cat conftest.val`
12154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012155 echo "$as_me: program exited with status $ac_status" >&5
12156echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012157sed 's/^/| /' conftest.$ac_ext >&5
12158
12159( exit $ac_status )
12160if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012162See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012163echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012164See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012165 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012166 else
12167 ac_cv_sizeof_long_double=0
12168 fi
12169fi
12170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12171fi
12172rm -f conftest.val
12173fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012174{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12175echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012176
12177
12178
12179cat >>confdefs.h <<_ACEOF
12180#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12181_ACEOF
12182
12183
12184fi
12185
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012186{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12187echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012188have_c99_bool=no
12189cat >conftest.$ac_ext <<_ACEOF
12190/* confdefs.h. */
12191_ACEOF
12192cat confdefs.h >>conftest.$ac_ext
12193cat >>conftest.$ac_ext <<_ACEOF
12194/* end confdefs.h. */
12195
12196int
12197main ()
12198{
12199_Bool x; x = (_Bool)0;
12200 ;
12201 return 0;
12202}
12203_ACEOF
12204rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205if { (ac_try="$ac_compile"
12206case "(($ac_try" in
12207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12208 *) ac_try_echo=$ac_try;;
12209esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212 ac_status=$?
12213 grep -v '^ *+' conftest.er1 >conftest.err
12214 rm -f conftest.er1
12215 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217 (exit $ac_status); } && {
12218 test -z "$ac_c_werror_flag" ||
12219 test ! -s conftest.err
12220 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012221
12222
12223cat >>confdefs.h <<\_ACEOF
12224#define HAVE_C99_BOOL 1
12225_ACEOF
12226
12227 have_c99_bool=yes
12228
12229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012230 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012231sed 's/^/| /' conftest.$ac_ext >&5
12232
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235
12236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012237{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12238echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012239if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012240{ echo "$as_me:$LINENO: checking for _Bool" >&5
12241echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12242if test "${ac_cv_type__Bool+set}" = set; then
12243 echo $ECHO_N "(cached) $ECHO_C" >&6
12244else
12245 cat >conftest.$ac_ext <<_ACEOF
12246/* confdefs.h. */
12247_ACEOF
12248cat confdefs.h >>conftest.$ac_ext
12249cat >>conftest.$ac_ext <<_ACEOF
12250/* end confdefs.h. */
12251$ac_includes_default
12252typedef _Bool ac__type_new_;
12253int
12254main ()
12255{
12256if ((ac__type_new_ *) 0)
12257 return 0;
12258if (sizeof (ac__type_new_))
12259 return 0;
12260 ;
12261 return 0;
12262}
12263_ACEOF
12264rm -f conftest.$ac_objext
12265if { (ac_try="$ac_compile"
12266case "(($ac_try" in
12267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12268 *) ac_try_echo=$ac_try;;
12269esac
12270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12271 (eval "$ac_compile") 2>conftest.er1
12272 ac_status=$?
12273 grep -v '^ *+' conftest.er1 >conftest.err
12274 rm -f conftest.er1
12275 cat conftest.err >&5
12276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12277 (exit $ac_status); } && {
12278 test -z "$ac_c_werror_flag" ||
12279 test ! -s conftest.err
12280 } && test -s conftest.$ac_objext; then
12281 ac_cv_type__Bool=yes
12282else
12283 echo "$as_me: failed program was:" >&5
12284sed 's/^/| /' conftest.$ac_ext >&5
12285
12286 ac_cv_type__Bool=no
12287fi
12288
12289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12290fi
12291{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12292echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12293
Martin v. Löwiseba40652007-08-30 20:10:57 +000012294# The cast to long int works around a bug in the HP C Compiler
12295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12297# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012298{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12299echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012301 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012302else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303 if test "$cross_compiling" = yes; then
12304 # Depending upon the size, compute the lo and hi bounds.
12305cat >conftest.$ac_ext <<_ACEOF
12306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
12311$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012312 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012313int
12314main ()
12315{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317test_array [0] = 0
12318
12319 ;
12320 return 0;
12321}
12322_ACEOF
12323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324if { (ac_try="$ac_compile"
12325case "(($ac_try" in
12326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12327 *) ac_try_echo=$ac_try;;
12328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012331 ac_status=$?
12332 grep -v '^ *+' conftest.er1 >conftest.err
12333 rm -f conftest.er1
12334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 (exit $ac_status); } && {
12337 test -z "$ac_c_werror_flag" ||
12338 test ! -s conftest.err
12339 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340 ac_lo=0 ac_mid=0
12341 while :; do
12342 cat >conftest.$ac_ext <<_ACEOF
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
12348$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012349 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350int
12351main ()
12352{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354test_array [0] = 0
12355
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361if { (ac_try="$ac_compile"
12362case "(($ac_try" in
12363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12364 *) ac_try_echo=$ac_try;;
12365esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012368 ac_status=$?
12369 grep -v '^ *+' conftest.er1 >conftest.err
12370 rm -f conftest.er1
12371 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012373 (exit $ac_status); } && {
12374 test -z "$ac_c_werror_flag" ||
12375 test ! -s conftest.err
12376 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 ac_hi=$ac_mid; break
12378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 ac_lo=`expr $ac_mid + 1`
12383 if test $ac_lo -le $ac_mid; then
12384 ac_lo= ac_hi=
12385 break
12386 fi
12387 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389
12390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391 done
12392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012393 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394sed 's/^/| /' conftest.$ac_ext >&5
12395
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397/* confdefs.h. */
12398_ACEOF
12399cat confdefs.h >>conftest.$ac_ext
12400cat >>conftest.$ac_ext <<_ACEOF
12401/* end confdefs.h. */
12402$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012403 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404int
12405main ()
12406{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012408test_array [0] = 0
12409
12410 ;
12411 return 0;
12412}
12413_ACEOF
12414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415if { (ac_try="$ac_compile"
12416case "(($ac_try" in
12417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12418 *) ac_try_echo=$ac_try;;
12419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012422 ac_status=$?
12423 grep -v '^ *+' conftest.er1 >conftest.err
12424 rm -f conftest.er1
12425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012427 (exit $ac_status); } && {
12428 test -z "$ac_c_werror_flag" ||
12429 test ! -s conftest.err
12430 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012431 ac_hi=-1 ac_mid=-1
12432 while :; do
12433 cat >conftest.$ac_ext <<_ACEOF
12434/* confdefs.h. */
12435_ACEOF
12436cat confdefs.h >>conftest.$ac_ext
12437cat >>conftest.$ac_ext <<_ACEOF
12438/* end confdefs.h. */
12439$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012440 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441int
12442main ()
12443{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012444static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445test_array [0] = 0
12446
12447 ;
12448 return 0;
12449}
12450_ACEOF
12451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452if { (ac_try="$ac_compile"
12453case "(($ac_try" in
12454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12455 *) ac_try_echo=$ac_try;;
12456esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459 ac_status=$?
12460 grep -v '^ *+' conftest.er1 >conftest.err
12461 rm -f conftest.er1
12462 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012464 (exit $ac_status); } && {
12465 test -z "$ac_c_werror_flag" ||
12466 test ! -s conftest.err
12467 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012468 ac_lo=$ac_mid; break
12469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012470 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012471sed 's/^/| /' conftest.$ac_ext >&5
12472
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473 ac_hi=`expr '(' $ac_mid ')' - 1`
12474 if test $ac_mid -le $ac_hi; then
12475 ac_lo= ac_hi=
12476 break
12477 fi
12478 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480
12481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012482 done
12483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012484 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012485sed 's/^/| /' conftest.$ac_ext >&5
12486
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489
12490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492
12493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012494# Binary search between lo and hi bounds.
12495while test "x$ac_lo" != "x$ac_hi"; do
12496 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12497 cat >conftest.$ac_ext <<_ACEOF
12498/* confdefs.h. */
12499_ACEOF
12500cat confdefs.h >>conftest.$ac_ext
12501cat >>conftest.$ac_ext <<_ACEOF
12502/* end confdefs.h. */
12503$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012504 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012505int
12506main ()
12507{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012509test_array [0] = 0
12510
12511 ;
12512 return 0;
12513}
12514_ACEOF
12515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012516if { (ac_try="$ac_compile"
12517case "(($ac_try" in
12518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12519 *) ac_try_echo=$ac_try;;
12520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012523 ac_status=$?
12524 grep -v '^ *+' conftest.er1 >conftest.err
12525 rm -f conftest.er1
12526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012528 (exit $ac_status); } && {
12529 test -z "$ac_c_werror_flag" ||
12530 test ! -s conftest.err
12531 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012532 ac_hi=$ac_mid
12533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012535sed 's/^/| /' conftest.$ac_ext >&5
12536
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012539
12540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012541done
12542case $ac_lo in
12543?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012544'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012546See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012547echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012548See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012549 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012550 else
12551 ac_cv_sizeof__Bool=0
12552 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012553esac
12554else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012555 cat >conftest.$ac_ext <<_ACEOF
12556/* confdefs.h. */
12557_ACEOF
12558cat confdefs.h >>conftest.$ac_ext
12559cat >>conftest.$ac_ext <<_ACEOF
12560/* end confdefs.h. */
12561$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012562 typedef _Bool ac__type_sizeof_;
12563static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12564static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012565#include <stdio.h>
12566#include <stdlib.h>
12567int
12568main ()
12569{
12570
12571 FILE *f = fopen ("conftest.val", "w");
12572 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012573 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012574 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012575 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012576 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012577 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012578 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012579 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012580 }
12581 else
12582 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012584 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012586 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012587 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012588 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012589
12590 ;
12591 return 0;
12592}
12593_ACEOF
12594rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595if { (ac_try="$ac_link"
12596case "(($ac_try" in
12597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12598 *) ac_try_echo=$ac_try;;
12599esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012601 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012602 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012605 { (case "(($ac_try" in
12606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12607 *) ac_try_echo=$ac_try;;
12608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012611 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012613 (exit $ac_status); }; }; then
12614 ac_cv_sizeof__Bool=`cat conftest.val`
12615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012616 echo "$as_me: program exited with status $ac_status" >&5
12617echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012618sed 's/^/| /' conftest.$ac_ext >&5
12619
12620( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012622 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012623See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012624echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012625See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012626 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012627 else
12628 ac_cv_sizeof__Bool=0
12629 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012631rm -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 +000012632fi
12633rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012634fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012635{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12636echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012637
12638
12639
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012640cat >>confdefs.h <<_ACEOF
12641#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12642_ACEOF
12643
12644
12645fi
12646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012647{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12648echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012649if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012651else
12652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* confdefs.h. */
12654_ACEOF
12655cat confdefs.h >>conftest.$ac_ext
12656cat >>conftest.$ac_ext <<_ACEOF
12657/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012658#ifdef HAVE_STDINT_H
12659 #include <stdint.h>
12660 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012661
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012663int
12664main ()
12665{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012666if ((ac__type_new_ *) 0)
12667 return 0;
12668if (sizeof (ac__type_new_))
12669 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ;
12671 return 0;
12672}
12673_ACEOF
12674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012675if { (ac_try="$ac_compile"
12676case "(($ac_try" in
12677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12678 *) ac_try_echo=$ac_try;;
12679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012683 grep -v '^ *+' conftest.er1 >conftest.err
12684 rm -f conftest.er1
12685 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012687 (exit $ac_status); } && {
12688 test -z "$ac_c_werror_flag" ||
12689 test ! -s conftest.err
12690 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012691 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012692else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012694sed 's/^/| /' conftest.$ac_ext >&5
12695
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012696 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698
12699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012700fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012701{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12702echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12703if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012704
12705cat >>confdefs.h <<_ACEOF
12706#define HAVE_UINTPTR_T 1
12707_ACEOF
12708
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012709{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12710echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12711if test "${ac_cv_type_uintptr_t+set}" = set; then
12712 echo $ECHO_N "(cached) $ECHO_C" >&6
12713else
12714 cat >conftest.$ac_ext <<_ACEOF
12715/* confdefs.h. */
12716_ACEOF
12717cat confdefs.h >>conftest.$ac_ext
12718cat >>conftest.$ac_ext <<_ACEOF
12719/* end confdefs.h. */
12720$ac_includes_default
12721typedef uintptr_t ac__type_new_;
12722int
12723main ()
12724{
12725if ((ac__type_new_ *) 0)
12726 return 0;
12727if (sizeof (ac__type_new_))
12728 return 0;
12729 ;
12730 return 0;
12731}
12732_ACEOF
12733rm -f conftest.$ac_objext
12734if { (ac_try="$ac_compile"
12735case "(($ac_try" in
12736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12737 *) ac_try_echo=$ac_try;;
12738esac
12739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12740 (eval "$ac_compile") 2>conftest.er1
12741 ac_status=$?
12742 grep -v '^ *+' conftest.er1 >conftest.err
12743 rm -f conftest.er1
12744 cat conftest.err >&5
12745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12746 (exit $ac_status); } && {
12747 test -z "$ac_c_werror_flag" ||
12748 test ! -s conftest.err
12749 } && test -s conftest.$ac_objext; then
12750 ac_cv_type_uintptr_t=yes
12751else
12752 echo "$as_me: failed program was:" >&5
12753sed 's/^/| /' conftest.$ac_ext >&5
12754
12755 ac_cv_type_uintptr_t=no
12756fi
12757
12758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12759fi
12760{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12761echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12762
Martin v. Löwiseba40652007-08-30 20:10:57 +000012763# The cast to long int works around a bug in the HP C Compiler
12764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12766# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012767{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12768echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012769if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012770 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012771else
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 if test "$cross_compiling" = yes; then
12773 # Depending upon the size, compute the lo and hi bounds.
12774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* confdefs.h. */
12776_ACEOF
12777cat confdefs.h >>conftest.$ac_ext
12778cat >>conftest.$ac_ext <<_ACEOF
12779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012780$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012781 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012786test_array [0] = 0
12787
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793if { (ac_try="$ac_compile"
12794case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012801 grep -v '^ *+' conftest.er1 >conftest.err
12802 rm -f conftest.er1
12803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805 (exit $ac_status); } && {
12806 test -z "$ac_c_werror_flag" ||
12807 test ! -s conftest.err
12808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_lo=0 ac_mid=0
12810 while :; do
12811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* confdefs.h. */
12813_ACEOF
12814cat confdefs.h >>conftest.$ac_ext
12815cat >>conftest.$ac_ext <<_ACEOF
12816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012818 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012823test_array [0] = 0
12824
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830if { (ac_try="$ac_compile"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_hi=$ac_mid; break
12847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 ac_lo=`expr $ac_mid + 1`
12852 if test $ac_lo -le $ac_mid; then
12853 ac_lo= ac_hi=
12854 break
12855 fi
12856 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858
12859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 done
12861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012863sed 's/^/| /' conftest.$ac_ext >&5
12864
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012866/* confdefs.h. */
12867_ACEOF
12868cat confdefs.h >>conftest.$ac_ext
12869cat >>conftest.$ac_ext <<_ACEOF
12870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012871$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012872 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012877test_array [0] = 0
12878
12879 ;
12880 return 0;
12881}
12882_ACEOF
12883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012884if { (ac_try="$ac_compile"
12885case "(($ac_try" in
12886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12887 *) ac_try_echo=$ac_try;;
12888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012892 grep -v '^ *+' conftest.er1 >conftest.err
12893 rm -f conftest.er1
12894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896 (exit $ac_status); } && {
12897 test -z "$ac_c_werror_flag" ||
12898 test ! -s conftest.err
12899 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 ac_hi=-1 ac_mid=-1
12901 while :; do
12902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012903/* confdefs.h. */
12904_ACEOF
12905cat confdefs.h >>conftest.$ac_ext
12906cat >>conftest.$ac_ext <<_ACEOF
12907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012908$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012909 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012910int
12911main ()
12912{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012914test_array [0] = 0
12915
12916 ;
12917 return 0;
12918}
12919_ACEOF
12920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921if { (ac_try="$ac_compile"
12922case "(($ac_try" in
12923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12924 *) ac_try_echo=$ac_try;;
12925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012929 grep -v '^ *+' conftest.er1 >conftest.err
12930 rm -f conftest.er1
12931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012933 (exit $ac_status); } && {
12934 test -z "$ac_c_werror_flag" ||
12935 test ! -s conftest.err
12936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ac_lo=$ac_mid; break
12938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012940sed 's/^/| /' conftest.$ac_ext >&5
12941
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942 ac_hi=`expr '(' $ac_mid ')' - 1`
12943 if test $ac_mid -le $ac_hi; then
12944 ac_lo= ac_hi=
12945 break
12946 fi
12947 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949
12950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 done
12952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012954sed 's/^/| /' conftest.$ac_ext >&5
12955
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958
12959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961
12962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012963# Binary search between lo and hi bounds.
12964while test "x$ac_lo" != "x$ac_hi"; do
12965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012967/* confdefs.h. */
12968_ACEOF
12969cat confdefs.h >>conftest.$ac_ext
12970cat >>conftest.$ac_ext <<_ACEOF
12971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012972$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012973 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
12976{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012977static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012978test_array [0] = 0
12979
12980 ;
12981 return 0;
12982}
12983_ACEOF
12984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985if { (ac_try="$ac_compile"
12986case "(($ac_try" in
12987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12988 *) ac_try_echo=$ac_try;;
12989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012993 grep -v '^ *+' conftest.er1 >conftest.err
12994 rm -f conftest.er1
12995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012997 (exit $ac_status); } && {
12998 test -z "$ac_c_werror_flag" ||
12999 test ! -s conftest.err
13000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 ac_hi=$ac_mid
13002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013004sed 's/^/| /' conftest.$ac_ext >&5
13005
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008
13009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013010done
13011case $ac_lo in
13012?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013013'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013014 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013015See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013016echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013017See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013018 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013019 else
13020 ac_cv_sizeof_uintptr_t=0
13021 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013022esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013023else
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013025/* confdefs.h. */
13026_ACEOF
13027cat confdefs.h >>conftest.$ac_ext
13028cat >>conftest.$ac_ext <<_ACEOF
13029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013030$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013031 typedef uintptr_t ac__type_sizeof_;
13032static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13033static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013034#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013035#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013036int
13037main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013038{
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
13040 FILE *f = fopen ("conftest.val", "w");
13041 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013042 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013043 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013045 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013046 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013047 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013048 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 }
13050 else
13051 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013052 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013053 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013054 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013055 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013057 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013058
13059 ;
13060 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013061}
Martin v. Löwis11437992002-04-12 09:54:03 +000013062_ACEOF
13063rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013064if { (ac_try="$ac_link"
13065case "(($ac_try" in
13066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13067 *) ac_try_echo=$ac_try;;
13068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074 { (case "(($ac_try" in
13075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13076 *) ac_try_echo=$ac_try;;
13077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013079 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 (exit $ac_status); }; }; then
13083 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013085 echo "$as_me: program exited with status $ac_status" >&5
13086echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013087sed 's/^/| /' conftest.$ac_ext >&5
13088
Martin v. Löwis11437992002-04-12 09:54:03 +000013089( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013091 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013092See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013093echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013094See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013095 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096 else
13097 ac_cv_sizeof_uintptr_t=0
13098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013100rm -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 +000013101fi
13102rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013103fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013104{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13105echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013106
13107
13108
Martin v. Löwis11437992002-04-12 09:54:03 +000013109cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013110#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013111_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013112
Michael W. Hudson54241132001-12-07 15:38:26 +000013113
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013114fi
13115
Martin v. Löwisebe26702006-10-02 14:55:51 +000013116
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013117{ echo "$as_me:$LINENO: checking for off_t" >&5
13118echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13119if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013120 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013121else
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013123/* confdefs.h. */
13124_ACEOF
13125cat confdefs.h >>conftest.$ac_ext
13126cat >>conftest.$ac_ext <<_ACEOF
13127/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013128
13129#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013130#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013131#endif
13132
13133
13134typedef off_t ac__type_new_;
13135int
13136main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013137{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013138if ((ac__type_new_ *) 0)
13139 return 0;
13140if (sizeof (ac__type_new_))
13141 return 0;
13142 ;
13143 return 0;
13144}
13145_ACEOF
13146rm -f conftest.$ac_objext
13147if { (ac_try="$ac_compile"
13148case "(($ac_try" in
13149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13150 *) ac_try_echo=$ac_try;;
13151esac
13152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13153 (eval "$ac_compile") 2>conftest.er1
13154 ac_status=$?
13155 grep -v '^ *+' conftest.er1 >conftest.err
13156 rm -f conftest.er1
13157 cat conftest.err >&5
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); } && {
13160 test -z "$ac_c_werror_flag" ||
13161 test ! -s conftest.err
13162 } && test -s conftest.$ac_objext; then
13163 ac_cv_type_off_t=yes
13164else
13165 echo "$as_me: failed program was:" >&5
13166sed 's/^/| /' conftest.$ac_ext >&5
13167
13168 ac_cv_type_off_t=no
13169fi
13170
13171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13172fi
13173{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13174echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13175
13176# The cast to long int works around a bug in the HP C Compiler
13177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13179# This bug is HP SR number 8606223364.
13180{ echo "$as_me:$LINENO: checking size of off_t" >&5
13181echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13182if test "${ac_cv_sizeof_off_t+set}" = set; then
13183 echo $ECHO_N "(cached) $ECHO_C" >&6
13184else
13185 if test "$cross_compiling" = yes; then
13186 # Depending upon the size, compute the lo and hi bounds.
13187cat >conftest.$ac_ext <<_ACEOF
13188/* confdefs.h. */
13189_ACEOF
13190cat confdefs.h >>conftest.$ac_ext
13191cat >>conftest.$ac_ext <<_ACEOF
13192/* end confdefs.h. */
13193
13194#ifdef HAVE_SYS_TYPES_H
13195#include <sys/types.h>
13196#endif
13197
13198
13199 typedef off_t ac__type_sizeof_;
13200int
13201main ()
13202{
13203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13204test_array [0] = 0
13205
13206 ;
13207 return 0;
13208}
13209_ACEOF
13210rm -f conftest.$ac_objext
13211if { (ac_try="$ac_compile"
13212case "(($ac_try" in
13213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13214 *) ac_try_echo=$ac_try;;
13215esac
13216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13217 (eval "$ac_compile") 2>conftest.er1
13218 ac_status=$?
13219 grep -v '^ *+' conftest.er1 >conftest.err
13220 rm -f conftest.er1
13221 cat conftest.err >&5
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); } && {
13224 test -z "$ac_c_werror_flag" ||
13225 test ! -s conftest.err
13226 } && test -s conftest.$ac_objext; then
13227 ac_lo=0 ac_mid=0
13228 while :; do
13229 cat >conftest.$ac_ext <<_ACEOF
13230/* confdefs.h. */
13231_ACEOF
13232cat confdefs.h >>conftest.$ac_ext
13233cat >>conftest.$ac_ext <<_ACEOF
13234/* end confdefs.h. */
13235
13236#ifdef HAVE_SYS_TYPES_H
13237#include <sys/types.h>
13238#endif
13239
13240
13241 typedef off_t ac__type_sizeof_;
13242int
13243main ()
13244{
13245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13246test_array [0] = 0
13247
13248 ;
13249 return 0;
13250}
13251_ACEOF
13252rm -f conftest.$ac_objext
13253if { (ac_try="$ac_compile"
13254case "(($ac_try" in
13255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13256 *) ac_try_echo=$ac_try;;
13257esac
13258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13259 (eval "$ac_compile") 2>conftest.er1
13260 ac_status=$?
13261 grep -v '^ *+' conftest.er1 >conftest.err
13262 rm -f conftest.er1
13263 cat conftest.err >&5
13264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13265 (exit $ac_status); } && {
13266 test -z "$ac_c_werror_flag" ||
13267 test ! -s conftest.err
13268 } && test -s conftest.$ac_objext; then
13269 ac_hi=$ac_mid; break
13270else
13271 echo "$as_me: failed program was:" >&5
13272sed 's/^/| /' conftest.$ac_ext >&5
13273
13274 ac_lo=`expr $ac_mid + 1`
13275 if test $ac_lo -le $ac_mid; then
13276 ac_lo= ac_hi=
13277 break
13278 fi
13279 ac_mid=`expr 2 '*' $ac_mid + 1`
13280fi
13281
13282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283 done
13284else
13285 echo "$as_me: failed program was:" >&5
13286sed 's/^/| /' conftest.$ac_ext >&5
13287
13288 cat >conftest.$ac_ext <<_ACEOF
13289/* confdefs.h. */
13290_ACEOF
13291cat confdefs.h >>conftest.$ac_ext
13292cat >>conftest.$ac_ext <<_ACEOF
13293/* end confdefs.h. */
13294
13295#ifdef HAVE_SYS_TYPES_H
13296#include <sys/types.h>
13297#endif
13298
13299
13300 typedef off_t ac__type_sizeof_;
13301int
13302main ()
13303{
13304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13305test_array [0] = 0
13306
13307 ;
13308 return 0;
13309}
13310_ACEOF
13311rm -f conftest.$ac_objext
13312if { (ac_try="$ac_compile"
13313case "(($ac_try" in
13314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13315 *) ac_try_echo=$ac_try;;
13316esac
13317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13318 (eval "$ac_compile") 2>conftest.er1
13319 ac_status=$?
13320 grep -v '^ *+' conftest.er1 >conftest.err
13321 rm -f conftest.er1
13322 cat conftest.err >&5
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); } && {
13325 test -z "$ac_c_werror_flag" ||
13326 test ! -s conftest.err
13327 } && test -s conftest.$ac_objext; then
13328 ac_hi=-1 ac_mid=-1
13329 while :; do
13330 cat >conftest.$ac_ext <<_ACEOF
13331/* confdefs.h. */
13332_ACEOF
13333cat confdefs.h >>conftest.$ac_ext
13334cat >>conftest.$ac_ext <<_ACEOF
13335/* end confdefs.h. */
13336
13337#ifdef HAVE_SYS_TYPES_H
13338#include <sys/types.h>
13339#endif
13340
13341
13342 typedef off_t ac__type_sizeof_;
13343int
13344main ()
13345{
13346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13347test_array [0] = 0
13348
13349 ;
13350 return 0;
13351}
13352_ACEOF
13353rm -f conftest.$ac_objext
13354if { (ac_try="$ac_compile"
13355case "(($ac_try" in
13356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13357 *) ac_try_echo=$ac_try;;
13358esac
13359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13360 (eval "$ac_compile") 2>conftest.er1
13361 ac_status=$?
13362 grep -v '^ *+' conftest.er1 >conftest.err
13363 rm -f conftest.er1
13364 cat conftest.err >&5
13365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366 (exit $ac_status); } && {
13367 test -z "$ac_c_werror_flag" ||
13368 test ! -s conftest.err
13369 } && test -s conftest.$ac_objext; then
13370 ac_lo=$ac_mid; break
13371else
13372 echo "$as_me: failed program was:" >&5
13373sed 's/^/| /' conftest.$ac_ext >&5
13374
13375 ac_hi=`expr '(' $ac_mid ')' - 1`
13376 if test $ac_mid -le $ac_hi; then
13377 ac_lo= ac_hi=
13378 break
13379 fi
13380 ac_mid=`expr 2 '*' $ac_mid`
13381fi
13382
13383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13384 done
13385else
13386 echo "$as_me: failed program was:" >&5
13387sed 's/^/| /' conftest.$ac_ext >&5
13388
13389 ac_lo= ac_hi=
13390fi
13391
13392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13393fi
13394
13395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13396# Binary search between lo and hi bounds.
13397while test "x$ac_lo" != "x$ac_hi"; do
13398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13399 cat >conftest.$ac_ext <<_ACEOF
13400/* confdefs.h. */
13401_ACEOF
13402cat confdefs.h >>conftest.$ac_ext
13403cat >>conftest.$ac_ext <<_ACEOF
13404/* end confdefs.h. */
13405
13406#ifdef HAVE_SYS_TYPES_H
13407#include <sys/types.h>
13408#endif
13409
13410
13411 typedef off_t ac__type_sizeof_;
13412int
13413main ()
13414{
13415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13416test_array [0] = 0
13417
13418 ;
13419 return 0;
13420}
13421_ACEOF
13422rm -f conftest.$ac_objext
13423if { (ac_try="$ac_compile"
13424case "(($ac_try" in
13425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13426 *) ac_try_echo=$ac_try;;
13427esac
13428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13429 (eval "$ac_compile") 2>conftest.er1
13430 ac_status=$?
13431 grep -v '^ *+' conftest.er1 >conftest.err
13432 rm -f conftest.er1
13433 cat conftest.err >&5
13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435 (exit $ac_status); } && {
13436 test -z "$ac_c_werror_flag" ||
13437 test ! -s conftest.err
13438 } && test -s conftest.$ac_objext; then
13439 ac_hi=$ac_mid
13440else
13441 echo "$as_me: failed program was:" >&5
13442sed 's/^/| /' conftest.$ac_ext >&5
13443
13444 ac_lo=`expr '(' $ac_mid ')' + 1`
13445fi
13446
13447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13448done
13449case $ac_lo in
13450?*) ac_cv_sizeof_off_t=$ac_lo;;
13451'') if test "$ac_cv_type_off_t" = yes; then
13452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13453See \`config.log' for more details." >&5
13454echo "$as_me: error: cannot compute sizeof (off_t)
13455See \`config.log' for more details." >&2;}
13456 { (exit 77); exit 77; }; }
13457 else
13458 ac_cv_sizeof_off_t=0
13459 fi ;;
13460esac
13461else
13462 cat >conftest.$ac_ext <<_ACEOF
13463/* confdefs.h. */
13464_ACEOF
13465cat confdefs.h >>conftest.$ac_ext
13466cat >>conftest.$ac_ext <<_ACEOF
13467/* end confdefs.h. */
13468
13469#ifdef HAVE_SYS_TYPES_H
13470#include <sys/types.h>
13471#endif
13472
13473
13474 typedef off_t ac__type_sizeof_;
13475static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13476static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13477#include <stdio.h>
13478#include <stdlib.h>
13479int
13480main ()
13481{
13482
13483 FILE *f = fopen ("conftest.val", "w");
13484 if (! f)
13485 return 1;
13486 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13487 {
13488 long int i = longval ();
13489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13490 return 1;
13491 fprintf (f, "%ld\n", i);
13492 }
13493 else
13494 {
13495 unsigned long int i = ulongval ();
13496 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13497 return 1;
13498 fprintf (f, "%lu\n", i);
13499 }
13500 return ferror (f) || fclose (f) != 0;
13501
13502 ;
13503 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013504}
Martin v. Löwis11437992002-04-12 09:54:03 +000013505_ACEOF
13506rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013507if { (ac_try="$ac_link"
13508case "(($ac_try" in
13509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13510 *) ac_try_echo=$ac_try;;
13511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013513 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013517 { (case "(($ac_try" in
13518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13519 *) ac_try_echo=$ac_try;;
13520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013526 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013528 echo "$as_me: program exited with status $ac_status" >&5
13529echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013530sed 's/^/| /' conftest.$ac_ext >&5
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013533if test "$ac_cv_type_off_t" = yes; then
13534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13535See \`config.log' for more details." >&5
13536echo "$as_me: error: cannot compute sizeof (off_t)
13537See \`config.log' for more details." >&2;}
13538 { (exit 77); exit 77; }; }
13539 else
13540 ac_cv_sizeof_off_t=0
13541 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013543rm -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 +000013544fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013545rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013546fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013547{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13548echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013550
13551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013553#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013554_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013555
Michael W. Hudson54241132001-12-07 15:38:26 +000013556
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013557
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013558{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13559echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013560if test "$have_long_long" = yes
13561then
13562if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013563 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013564
Martin v. Löwis11437992002-04-12 09:54:03 +000013565cat >>confdefs.h <<\_ACEOF
13566#define HAVE_LARGEFILE_SUPPORT 1
13567_ACEOF
13568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013569 { echo "$as_me:$LINENO: result: yes" >&5
13570echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013572 { echo "$as_me:$LINENO: result: no" >&5
13573echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013574fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013575else
13576 { echo "$as_me:$LINENO: result: no" >&5
13577echo "${ECHO_T}no" >&6; }
13578fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013579
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013580{ echo "$as_me:$LINENO: checking for time_t" >&5
13581echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13582if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013584else
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013586/* confdefs.h. */
13587_ACEOF
13588cat confdefs.h >>conftest.$ac_ext
13589cat >>conftest.$ac_ext <<_ACEOF
13590/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013591
13592#ifdef HAVE_SYS_TYPES_H
13593#include <sys/types.h>
13594#endif
13595#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013596#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013597#endif
13598
13599
13600typedef time_t ac__type_new_;
13601int
13602main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013603{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013604if ((ac__type_new_ *) 0)
13605 return 0;
13606if (sizeof (ac__type_new_))
13607 return 0;
13608 ;
13609 return 0;
13610}
13611_ACEOF
13612rm -f conftest.$ac_objext
13613if { (ac_try="$ac_compile"
13614case "(($ac_try" in
13615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13616 *) ac_try_echo=$ac_try;;
13617esac
13618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13619 (eval "$ac_compile") 2>conftest.er1
13620 ac_status=$?
13621 grep -v '^ *+' conftest.er1 >conftest.err
13622 rm -f conftest.er1
13623 cat conftest.err >&5
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625 (exit $ac_status); } && {
13626 test -z "$ac_c_werror_flag" ||
13627 test ! -s conftest.err
13628 } && test -s conftest.$ac_objext; then
13629 ac_cv_type_time_t=yes
13630else
13631 echo "$as_me: failed program was:" >&5
13632sed 's/^/| /' conftest.$ac_ext >&5
13633
13634 ac_cv_type_time_t=no
13635fi
13636
13637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13638fi
13639{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13640echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13641
13642# The cast to long int works around a bug in the HP C Compiler
13643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13645# This bug is HP SR number 8606223364.
13646{ echo "$as_me:$LINENO: checking size of time_t" >&5
13647echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13648if test "${ac_cv_sizeof_time_t+set}" = set; then
13649 echo $ECHO_N "(cached) $ECHO_C" >&6
13650else
13651 if test "$cross_compiling" = yes; then
13652 # Depending upon the size, compute the lo and hi bounds.
13653cat >conftest.$ac_ext <<_ACEOF
13654/* confdefs.h. */
13655_ACEOF
13656cat confdefs.h >>conftest.$ac_ext
13657cat >>conftest.$ac_ext <<_ACEOF
13658/* end confdefs.h. */
13659
13660#ifdef HAVE_SYS_TYPES_H
13661#include <sys/types.h>
13662#endif
13663#ifdef HAVE_TIME_H
13664#include <time.h>
13665#endif
13666
13667
13668 typedef time_t ac__type_sizeof_;
13669int
13670main ()
13671{
13672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13673test_array [0] = 0
13674
13675 ;
13676 return 0;
13677}
13678_ACEOF
13679rm -f conftest.$ac_objext
13680if { (ac_try="$ac_compile"
13681case "(($ac_try" in
13682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13683 *) ac_try_echo=$ac_try;;
13684esac
13685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13686 (eval "$ac_compile") 2>conftest.er1
13687 ac_status=$?
13688 grep -v '^ *+' conftest.er1 >conftest.err
13689 rm -f conftest.er1
13690 cat conftest.err >&5
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); } && {
13693 test -z "$ac_c_werror_flag" ||
13694 test ! -s conftest.err
13695 } && test -s conftest.$ac_objext; then
13696 ac_lo=0 ac_mid=0
13697 while :; do
13698 cat >conftest.$ac_ext <<_ACEOF
13699/* confdefs.h. */
13700_ACEOF
13701cat confdefs.h >>conftest.$ac_ext
13702cat >>conftest.$ac_ext <<_ACEOF
13703/* end confdefs.h. */
13704
13705#ifdef HAVE_SYS_TYPES_H
13706#include <sys/types.h>
13707#endif
13708#ifdef HAVE_TIME_H
13709#include <time.h>
13710#endif
13711
13712
13713 typedef time_t ac__type_sizeof_;
13714int
13715main ()
13716{
13717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13718test_array [0] = 0
13719
13720 ;
13721 return 0;
13722}
13723_ACEOF
13724rm -f conftest.$ac_objext
13725if { (ac_try="$ac_compile"
13726case "(($ac_try" in
13727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13728 *) ac_try_echo=$ac_try;;
13729esac
13730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13731 (eval "$ac_compile") 2>conftest.er1
13732 ac_status=$?
13733 grep -v '^ *+' conftest.er1 >conftest.err
13734 rm -f conftest.er1
13735 cat conftest.err >&5
13736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13737 (exit $ac_status); } && {
13738 test -z "$ac_c_werror_flag" ||
13739 test ! -s conftest.err
13740 } && test -s conftest.$ac_objext; then
13741 ac_hi=$ac_mid; break
13742else
13743 echo "$as_me: failed program was:" >&5
13744sed 's/^/| /' conftest.$ac_ext >&5
13745
13746 ac_lo=`expr $ac_mid + 1`
13747 if test $ac_lo -le $ac_mid; then
13748 ac_lo= ac_hi=
13749 break
13750 fi
13751 ac_mid=`expr 2 '*' $ac_mid + 1`
13752fi
13753
13754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13755 done
13756else
13757 echo "$as_me: failed program was:" >&5
13758sed 's/^/| /' conftest.$ac_ext >&5
13759
13760 cat >conftest.$ac_ext <<_ACEOF
13761/* confdefs.h. */
13762_ACEOF
13763cat confdefs.h >>conftest.$ac_ext
13764cat >>conftest.$ac_ext <<_ACEOF
13765/* end confdefs.h. */
13766
13767#ifdef HAVE_SYS_TYPES_H
13768#include <sys/types.h>
13769#endif
13770#ifdef HAVE_TIME_H
13771#include <time.h>
13772#endif
13773
13774
13775 typedef time_t ac__type_sizeof_;
13776int
13777main ()
13778{
13779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13780test_array [0] = 0
13781
13782 ;
13783 return 0;
13784}
13785_ACEOF
13786rm -f conftest.$ac_objext
13787if { (ac_try="$ac_compile"
13788case "(($ac_try" in
13789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13790 *) ac_try_echo=$ac_try;;
13791esac
13792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13793 (eval "$ac_compile") 2>conftest.er1
13794 ac_status=$?
13795 grep -v '^ *+' conftest.er1 >conftest.err
13796 rm -f conftest.er1
13797 cat conftest.err >&5
13798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13799 (exit $ac_status); } && {
13800 test -z "$ac_c_werror_flag" ||
13801 test ! -s conftest.err
13802 } && test -s conftest.$ac_objext; then
13803 ac_hi=-1 ac_mid=-1
13804 while :; do
13805 cat >conftest.$ac_ext <<_ACEOF
13806/* confdefs.h. */
13807_ACEOF
13808cat confdefs.h >>conftest.$ac_ext
13809cat >>conftest.$ac_ext <<_ACEOF
13810/* end confdefs.h. */
13811
13812#ifdef HAVE_SYS_TYPES_H
13813#include <sys/types.h>
13814#endif
13815#ifdef HAVE_TIME_H
13816#include <time.h>
13817#endif
13818
13819
13820 typedef time_t ac__type_sizeof_;
13821int
13822main ()
13823{
13824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13825test_array [0] = 0
13826
13827 ;
13828 return 0;
13829}
13830_ACEOF
13831rm -f conftest.$ac_objext
13832if { (ac_try="$ac_compile"
13833case "(($ac_try" in
13834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13835 *) ac_try_echo=$ac_try;;
13836esac
13837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13838 (eval "$ac_compile") 2>conftest.er1
13839 ac_status=$?
13840 grep -v '^ *+' conftest.er1 >conftest.err
13841 rm -f conftest.er1
13842 cat conftest.err >&5
13843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); } && {
13845 test -z "$ac_c_werror_flag" ||
13846 test ! -s conftest.err
13847 } && test -s conftest.$ac_objext; then
13848 ac_lo=$ac_mid; break
13849else
13850 echo "$as_me: failed program was:" >&5
13851sed 's/^/| /' conftest.$ac_ext >&5
13852
13853 ac_hi=`expr '(' $ac_mid ')' - 1`
13854 if test $ac_mid -le $ac_hi; then
13855 ac_lo= ac_hi=
13856 break
13857 fi
13858 ac_mid=`expr 2 '*' $ac_mid`
13859fi
13860
13861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13862 done
13863else
13864 echo "$as_me: failed program was:" >&5
13865sed 's/^/| /' conftest.$ac_ext >&5
13866
13867 ac_lo= ac_hi=
13868fi
13869
13870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13871fi
13872
13873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13874# Binary search between lo and hi bounds.
13875while test "x$ac_lo" != "x$ac_hi"; do
13876 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13877 cat >conftest.$ac_ext <<_ACEOF
13878/* confdefs.h. */
13879_ACEOF
13880cat confdefs.h >>conftest.$ac_ext
13881cat >>conftest.$ac_ext <<_ACEOF
13882/* end confdefs.h. */
13883
13884#ifdef HAVE_SYS_TYPES_H
13885#include <sys/types.h>
13886#endif
13887#ifdef HAVE_TIME_H
13888#include <time.h>
13889#endif
13890
13891
13892 typedef time_t ac__type_sizeof_;
13893int
13894main ()
13895{
13896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13897test_array [0] = 0
13898
13899 ;
13900 return 0;
13901}
13902_ACEOF
13903rm -f conftest.$ac_objext
13904if { (ac_try="$ac_compile"
13905case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
13909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13910 (eval "$ac_compile") 2>conftest.er1
13911 ac_status=$?
13912 grep -v '^ *+' conftest.er1 >conftest.err
13913 rm -f conftest.er1
13914 cat conftest.err >&5
13915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13916 (exit $ac_status); } && {
13917 test -z "$ac_c_werror_flag" ||
13918 test ! -s conftest.err
13919 } && test -s conftest.$ac_objext; then
13920 ac_hi=$ac_mid
13921else
13922 echo "$as_me: failed program was:" >&5
13923sed 's/^/| /' conftest.$ac_ext >&5
13924
13925 ac_lo=`expr '(' $ac_mid ')' + 1`
13926fi
13927
13928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13929done
13930case $ac_lo in
13931?*) ac_cv_sizeof_time_t=$ac_lo;;
13932'') if test "$ac_cv_type_time_t" = yes; then
13933 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13934See \`config.log' for more details." >&5
13935echo "$as_me: error: cannot compute sizeof (time_t)
13936See \`config.log' for more details." >&2;}
13937 { (exit 77); exit 77; }; }
13938 else
13939 ac_cv_sizeof_time_t=0
13940 fi ;;
13941esac
13942else
13943 cat >conftest.$ac_ext <<_ACEOF
13944/* confdefs.h. */
13945_ACEOF
13946cat confdefs.h >>conftest.$ac_ext
13947cat >>conftest.$ac_ext <<_ACEOF
13948/* end confdefs.h. */
13949
13950#ifdef HAVE_SYS_TYPES_H
13951#include <sys/types.h>
13952#endif
13953#ifdef HAVE_TIME_H
13954#include <time.h>
13955#endif
13956
13957
13958 typedef time_t ac__type_sizeof_;
13959static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13960static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13961#include <stdio.h>
13962#include <stdlib.h>
13963int
13964main ()
13965{
13966
13967 FILE *f = fopen ("conftest.val", "w");
13968 if (! f)
13969 return 1;
13970 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13971 {
13972 long int i = longval ();
13973 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13974 return 1;
13975 fprintf (f, "%ld\n", i);
13976 }
13977 else
13978 {
13979 unsigned long int i = ulongval ();
13980 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13981 return 1;
13982 fprintf (f, "%lu\n", i);
13983 }
13984 return ferror (f) || fclose (f) != 0;
13985
13986 ;
13987 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013988}
Martin v. Löwis11437992002-04-12 09:54:03 +000013989_ACEOF
13990rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013991if { (ac_try="$ac_link"
13992case "(($ac_try" in
13993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13994 *) ac_try_echo=$ac_try;;
13995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001 { (case "(($ac_try" in
14002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14003 *) ac_try_echo=$ac_try;;
14004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014010 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014012 echo "$as_me: program exited with status $ac_status" >&5
14013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014014sed 's/^/| /' conftest.$ac_ext >&5
14015
Martin v. Löwis11437992002-04-12 09:54:03 +000014016( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014017if test "$ac_cv_type_time_t" = yes; then
14018 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
14019See \`config.log' for more details." >&5
14020echo "$as_me: error: cannot compute sizeof (time_t)
14021See \`config.log' for more details." >&2;}
14022 { (exit 77); exit 77; }; }
14023 else
14024 ac_cv_sizeof_time_t=0
14025 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014027rm -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 +000014028fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014029rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014030fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014031{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14032echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014034
14035
Martin v. Löwis11437992002-04-12 09:54:03 +000014036cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014037#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014038_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014039
Michael W. Hudson54241132001-12-07 15:38:26 +000014040
14041
Trent Mick635f6fb2000-08-23 21:33:05 +000014042# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014043ac_save_cc="$CC"
14044if test "$ac_cv_kpthread" = "yes"
14045then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014046elif test "$ac_cv_kthread" = "yes"
14047then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014048elif test "$ac_cv_pthread" = "yes"
14049then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014050fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014051{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14052echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014053have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014055/* confdefs.h. */
14056_ACEOF
14057cat confdefs.h >>conftest.$ac_ext
14058cat >>conftest.$ac_ext <<_ACEOF
14059/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014060#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014061int
14062main ()
14063{
Guido van Rossum12580492000-09-24 16:47:19 +000014064pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 ;
14066 return 0;
14067}
14068_ACEOF
14069rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014070if { (ac_try="$ac_compile"
14071case "(($ac_try" in
14072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14073 *) ac_try_echo=$ac_try;;
14074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014078 grep -v '^ *+' conftest.er1 >conftest.err
14079 rm -f conftest.er1
14080 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014082 (exit $ac_status); } && {
14083 test -z "$ac_c_werror_flag" ||
14084 test ! -s conftest.err
14085 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014086 have_pthread_t=yes
14087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014089sed 's/^/| /' conftest.$ac_ext >&5
14090
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091
Trent Mick635f6fb2000-08-23 21:33:05 +000014092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093
14094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014095{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14096echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014097if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014098 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14099echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14100if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014101 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014102else
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014104/* confdefs.h. */
14105_ACEOF
14106cat confdefs.h >>conftest.$ac_ext
14107cat >>conftest.$ac_ext <<_ACEOF
14108/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014109
14110#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014111#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014112#endif
14113
14114
14115typedef pthread_t ac__type_new_;
14116int
14117main ()
14118{
14119if ((ac__type_new_ *) 0)
14120 return 0;
14121if (sizeof (ac__type_new_))
14122 return 0;
14123 ;
14124 return 0;
14125}
14126_ACEOF
14127rm -f conftest.$ac_objext
14128if { (ac_try="$ac_compile"
14129case "(($ac_try" in
14130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14131 *) ac_try_echo=$ac_try;;
14132esac
14133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14134 (eval "$ac_compile") 2>conftest.er1
14135 ac_status=$?
14136 grep -v '^ *+' conftest.er1 >conftest.err
14137 rm -f conftest.er1
14138 cat conftest.err >&5
14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14140 (exit $ac_status); } && {
14141 test -z "$ac_c_werror_flag" ||
14142 test ! -s conftest.err
14143 } && test -s conftest.$ac_objext; then
14144 ac_cv_type_pthread_t=yes
14145else
14146 echo "$as_me: failed program was:" >&5
14147sed 's/^/| /' conftest.$ac_ext >&5
14148
14149 ac_cv_type_pthread_t=no
14150fi
14151
14152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14153fi
14154{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14155echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14156
14157# The cast to long int works around a bug in the HP C Compiler
14158# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14159# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14160# This bug is HP SR number 8606223364.
14161{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14162echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14163if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14164 echo $ECHO_N "(cached) $ECHO_C" >&6
14165else
14166 if test "$cross_compiling" = yes; then
14167 # Depending upon the size, compute the lo and hi bounds.
14168cat >conftest.$ac_ext <<_ACEOF
14169/* confdefs.h. */
14170_ACEOF
14171cat confdefs.h >>conftest.$ac_ext
14172cat >>conftest.$ac_ext <<_ACEOF
14173/* end confdefs.h. */
14174
14175#ifdef HAVE_PTHREAD_H
14176#include <pthread.h>
14177#endif
14178
14179
14180 typedef pthread_t ac__type_sizeof_;
14181int
14182main ()
14183{
14184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14185test_array [0] = 0
14186
14187 ;
14188 return 0;
14189}
14190_ACEOF
14191rm -f conftest.$ac_objext
14192if { (ac_try="$ac_compile"
14193case "(($ac_try" in
14194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14195 *) ac_try_echo=$ac_try;;
14196esac
14197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14198 (eval "$ac_compile") 2>conftest.er1
14199 ac_status=$?
14200 grep -v '^ *+' conftest.er1 >conftest.err
14201 rm -f conftest.er1
14202 cat conftest.err >&5
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); } && {
14205 test -z "$ac_c_werror_flag" ||
14206 test ! -s conftest.err
14207 } && test -s conftest.$ac_objext; then
14208 ac_lo=0 ac_mid=0
14209 while :; do
14210 cat >conftest.$ac_ext <<_ACEOF
14211/* confdefs.h. */
14212_ACEOF
14213cat confdefs.h >>conftest.$ac_ext
14214cat >>conftest.$ac_ext <<_ACEOF
14215/* end confdefs.h. */
14216
14217#ifdef HAVE_PTHREAD_H
14218#include <pthread.h>
14219#endif
14220
14221
14222 typedef pthread_t ac__type_sizeof_;
14223int
14224main ()
14225{
14226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14227test_array [0] = 0
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
14233rm -f conftest.$ac_objext
14234if { (ac_try="$ac_compile"
14235case "(($ac_try" in
14236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14237 *) ac_try_echo=$ac_try;;
14238esac
14239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14240 (eval "$ac_compile") 2>conftest.er1
14241 ac_status=$?
14242 grep -v '^ *+' conftest.er1 >conftest.err
14243 rm -f conftest.er1
14244 cat conftest.err >&5
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); } && {
14247 test -z "$ac_c_werror_flag" ||
14248 test ! -s conftest.err
14249 } && test -s conftest.$ac_objext; then
14250 ac_hi=$ac_mid; break
14251else
14252 echo "$as_me: failed program was:" >&5
14253sed 's/^/| /' conftest.$ac_ext >&5
14254
14255 ac_lo=`expr $ac_mid + 1`
14256 if test $ac_lo -le $ac_mid; then
14257 ac_lo= ac_hi=
14258 break
14259 fi
14260 ac_mid=`expr 2 '*' $ac_mid + 1`
14261fi
14262
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264 done
14265else
14266 echo "$as_me: failed program was:" >&5
14267sed 's/^/| /' conftest.$ac_ext >&5
14268
14269 cat >conftest.$ac_ext <<_ACEOF
14270/* confdefs.h. */
14271_ACEOF
14272cat confdefs.h >>conftest.$ac_ext
14273cat >>conftest.$ac_ext <<_ACEOF
14274/* end confdefs.h. */
14275
14276#ifdef HAVE_PTHREAD_H
14277#include <pthread.h>
14278#endif
14279
14280
14281 typedef pthread_t ac__type_sizeof_;
14282int
14283main ()
14284{
14285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14286test_array [0] = 0
14287
14288 ;
14289 return 0;
14290}
14291_ACEOF
14292rm -f conftest.$ac_objext
14293if { (ac_try="$ac_compile"
14294case "(($ac_try" in
14295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14296 *) ac_try_echo=$ac_try;;
14297esac
14298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14299 (eval "$ac_compile") 2>conftest.er1
14300 ac_status=$?
14301 grep -v '^ *+' conftest.er1 >conftest.err
14302 rm -f conftest.er1
14303 cat conftest.err >&5
14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305 (exit $ac_status); } && {
14306 test -z "$ac_c_werror_flag" ||
14307 test ! -s conftest.err
14308 } && test -s conftest.$ac_objext; then
14309 ac_hi=-1 ac_mid=-1
14310 while :; do
14311 cat >conftest.$ac_ext <<_ACEOF
14312/* confdefs.h. */
14313_ACEOF
14314cat confdefs.h >>conftest.$ac_ext
14315cat >>conftest.$ac_ext <<_ACEOF
14316/* end confdefs.h. */
14317
14318#ifdef HAVE_PTHREAD_H
14319#include <pthread.h>
14320#endif
14321
14322
14323 typedef pthread_t ac__type_sizeof_;
14324int
14325main ()
14326{
14327static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14328test_array [0] = 0
14329
14330 ;
14331 return 0;
14332}
14333_ACEOF
14334rm -f conftest.$ac_objext
14335if { (ac_try="$ac_compile"
14336case "(($ac_try" in
14337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14338 *) ac_try_echo=$ac_try;;
14339esac
14340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14341 (eval "$ac_compile") 2>conftest.er1
14342 ac_status=$?
14343 grep -v '^ *+' conftest.er1 >conftest.err
14344 rm -f conftest.er1
14345 cat conftest.err >&5
14346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347 (exit $ac_status); } && {
14348 test -z "$ac_c_werror_flag" ||
14349 test ! -s conftest.err
14350 } && test -s conftest.$ac_objext; then
14351 ac_lo=$ac_mid; break
14352else
14353 echo "$as_me: failed program was:" >&5
14354sed 's/^/| /' conftest.$ac_ext >&5
14355
14356 ac_hi=`expr '(' $ac_mid ')' - 1`
14357 if test $ac_mid -le $ac_hi; then
14358 ac_lo= ac_hi=
14359 break
14360 fi
14361 ac_mid=`expr 2 '*' $ac_mid`
14362fi
14363
14364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14365 done
14366else
14367 echo "$as_me: failed program was:" >&5
14368sed 's/^/| /' conftest.$ac_ext >&5
14369
14370 ac_lo= ac_hi=
14371fi
14372
14373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14374fi
14375
14376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14377# Binary search between lo and hi bounds.
14378while test "x$ac_lo" != "x$ac_hi"; do
14379 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14380 cat >conftest.$ac_ext <<_ACEOF
14381/* confdefs.h. */
14382_ACEOF
14383cat confdefs.h >>conftest.$ac_ext
14384cat >>conftest.$ac_ext <<_ACEOF
14385/* end confdefs.h. */
14386
14387#ifdef HAVE_PTHREAD_H
14388#include <pthread.h>
14389#endif
14390
14391
14392 typedef pthread_t ac__type_sizeof_;
14393int
14394main ()
14395{
14396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14397test_array [0] = 0
14398
14399 ;
14400 return 0;
14401}
14402_ACEOF
14403rm -f conftest.$ac_objext
14404if { (ac_try="$ac_compile"
14405case "(($ac_try" in
14406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14407 *) ac_try_echo=$ac_try;;
14408esac
14409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14410 (eval "$ac_compile") 2>conftest.er1
14411 ac_status=$?
14412 grep -v '^ *+' conftest.er1 >conftest.err
14413 rm -f conftest.er1
14414 cat conftest.err >&5
14415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416 (exit $ac_status); } && {
14417 test -z "$ac_c_werror_flag" ||
14418 test ! -s conftest.err
14419 } && test -s conftest.$ac_objext; then
14420 ac_hi=$ac_mid
14421else
14422 echo "$as_me: failed program was:" >&5
14423sed 's/^/| /' conftest.$ac_ext >&5
14424
14425 ac_lo=`expr '(' $ac_mid ')' + 1`
14426fi
14427
14428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14429done
14430case $ac_lo in
14431?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14432'') if test "$ac_cv_type_pthread_t" = yes; then
14433 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14434See \`config.log' for more details." >&5
14435echo "$as_me: error: cannot compute sizeof (pthread_t)
14436See \`config.log' for more details." >&2;}
14437 { (exit 77); exit 77; }; }
14438 else
14439 ac_cv_sizeof_pthread_t=0
14440 fi ;;
14441esac
14442else
14443 cat >conftest.$ac_ext <<_ACEOF
14444/* confdefs.h. */
14445_ACEOF
14446cat confdefs.h >>conftest.$ac_ext
14447cat >>conftest.$ac_ext <<_ACEOF
14448/* end confdefs.h. */
14449
14450#ifdef HAVE_PTHREAD_H
14451#include <pthread.h>
14452#endif
14453
14454
14455 typedef pthread_t ac__type_sizeof_;
14456static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14457static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14458#include <stdio.h>
14459#include <stdlib.h>
14460int
14461main ()
14462{
14463
14464 FILE *f = fopen ("conftest.val", "w");
14465 if (! f)
14466 return 1;
14467 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14468 {
14469 long int i = longval ();
14470 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14471 return 1;
14472 fprintf (f, "%ld\n", i);
14473 }
14474 else
14475 {
14476 unsigned long int i = ulongval ();
14477 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14478 return 1;
14479 fprintf (f, "%lu\n", i);
14480 }
14481 return ferror (f) || fclose (f) != 0;
14482
14483 ;
14484 return 0;
14485}
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
14487rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014488if { (ac_try="$ac_link"
14489case "(($ac_try" in
14490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14491 *) ac_try_echo=$ac_try;;
14492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014498 { (case "(($ac_try" in
14499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14500 *) ac_try_echo=$ac_try;;
14501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014507 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014508else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014509 echo "$as_me: program exited with status $ac_status" >&5
14510echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014511sed 's/^/| /' conftest.$ac_ext >&5
14512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014514if test "$ac_cv_type_pthread_t" = yes; then
14515 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14516See \`config.log' for more details." >&5
14517echo "$as_me: error: cannot compute sizeof (pthread_t)
14518See \`config.log' for more details." >&2;}
14519 { (exit 77); exit 77; }; }
14520 else
14521 ac_cv_sizeof_pthread_t=0
14522 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014524rm -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 +000014525fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014526rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014527fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014528{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014529echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014531
14532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014534#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014535_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014536
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014537
Trent Mick635f6fb2000-08-23 21:33:05 +000014538fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014539CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014540
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014541{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14542echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014543# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014544if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545 enableval=$enable_toolbox_glue;
14546fi
Jack Jansene578a632001-08-15 01:27:14 +000014547
14548
14549if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014550then
Jack Jansene578a632001-08-15 01:27:14 +000014551 case $ac_sys_system/$ac_sys_release in
14552 Darwin/*)
14553 enable_toolbox_glue="yes";;
14554 *)
14555 enable_toolbox_glue="no";;
14556 esac
14557fi
14558case "$enable_toolbox_glue" in
14559yes)
Jack Jansene578a632001-08-15 01:27:14 +000014560 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014561 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
14563cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014564#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014565_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014566
14567 ;;
14568*)
Jack Jansene578a632001-08-15 01:27:14 +000014569 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014570 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014571 ;;
14572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014573{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14574echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014575
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014576
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014577
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014578case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014579 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014580 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14581 ;;
14582 Darwin/*)
14583 OTHER_LIBTOOL_OPT=""
14584 ;;
14585esac
14586
14587
Ronald Oussoren25967582009-09-06 10:00:26 +000014588ARCH_RUN_32BIT=""
14589
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014590case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014591 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014592 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14593 if test "${enable_universalsdk}"; then
14594 :
14595 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014596 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014597 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014598 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014600 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014601 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014602 if test ${gcc_version} '<' 4.0
14603 then
14604 LIBTOOL_CRUFT="-lcc_dynamic"
14605 else
14606 LIBTOOL_CRUFT=""
14607 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014608 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014609 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014610else
14611 cat >conftest.$ac_ext <<_ACEOF
14612/* confdefs.h. */
14613_ACEOF
14614cat confdefs.h >>conftest.$ac_ext
14615cat >>conftest.$ac_ext <<_ACEOF
14616/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014617
Ronald Oussoren25967582009-09-06 10:00:26 +000014618 #include <unistd.h>
14619 int main(int argc, char*argv[])
14620 {
14621 if (sizeof(long) == 4) {
14622 return 0;
14623 } else {
14624 return 1;
14625 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014626 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014627
Ronald Oussoren25967582009-09-06 10:00:26 +000014628_ACEOF
14629rm -f conftest$ac_exeext
14630if { (ac_try="$ac_link"
14631case "(($ac_try" in
14632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14633 *) ac_try_echo=$ac_try;;
14634esac
14635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14636 (eval "$ac_link") 2>&5
14637 ac_status=$?
14638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14639 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14640 { (case "(($ac_try" in
14641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14642 *) ac_try_echo=$ac_try;;
14643esac
14644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14645 (eval "$ac_try") 2>&5
14646 ac_status=$?
14647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648 (exit $ac_status); }; }; then
14649 ac_osx_32bit=yes
14650else
14651 echo "$as_me: program exited with status $ac_status" >&5
14652echo "$as_me: failed program was:" >&5
14653sed 's/^/| /' conftest.$ac_ext >&5
14654
14655( exit $ac_status )
14656ac_osx_32bit=no
14657fi
14658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14659fi
14660
14661
14662
14663 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014664 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014665 i386)
14666 MACOSX_DEFAULT_ARCH="i386"
14667 ;;
14668 ppc)
14669 MACOSX_DEFAULT_ARCH="ppc"
14670 ;;
14671 *)
14672 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14673echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14674 { (exit 1); exit 1; }; }
14675 ;;
14676 esac
14677 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014678 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014679 i386)
14680 MACOSX_DEFAULT_ARCH="x86_64"
14681 ;;
14682 ppc)
14683 MACOSX_DEFAULT_ARCH="ppc64"
14684 ;;
14685 *)
14686 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14687echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14688 { (exit 1); exit 1; }; }
14689 ;;
14690 esac
14691
14692 #ARCH_RUN_32BIT="true"
14693 fi
14694
14695 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014696 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014697 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014698esac
14699
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014700{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14701echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014702if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014703then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014704 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014706 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014707
Martin v. Löwis11437992002-04-12 09:54:03 +000014708cat >>confdefs.h <<\_ACEOF
14709#define WITH_NEXT_FRAMEWORK 1
14710_ACEOF
14711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014712 { echo "$as_me:$LINENO: result: yes" >&5
14713echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014714 if test $enable_shared = "yes"
14715 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014716 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14717echo "$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 +000014718 { (exit 1); exit 1; }; }
14719 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014720else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014721 { echo "$as_me:$LINENO: result: no" >&5
14722echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014723fi
14724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014725{ echo "$as_me:$LINENO: checking for dyld" >&5
14726echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014727case $ac_sys_system/$ac_sys_release in
14728 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730cat >>confdefs.h <<\_ACEOF
14731#define WITH_DYLD 1
14732_ACEOF
14733
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014734 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14735echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014736 ;;
14737 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014738 { echo "$as_me:$LINENO: result: no" >&5
14739echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014740 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014741esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014742
Guido van Rossum0a516c91994-09-12 10:58:40 +000014743# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014744
Michael W. Hudson54241132001-12-07 15:38:26 +000014745
14746
14747
14748
Guido van Rossum0a516c91994-09-12 10:58:40 +000014749# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014750# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014751{ echo "$as_me:$LINENO: checking SO" >&5
14752echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014753if test -z "$SO"
14754then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014755 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014756 hp*|HP*)
14757 case `uname -m` in
14758 ia64) SO=.so;;
14759 *) SO=.sl;;
14760 esac
14761 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014762 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014763 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014764 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014765else
14766 # this might also be a termcap variable, see #610332
14767 echo
14768 echo '====================================================================='
14769 echo '+ +'
14770 echo '+ WARNING: You have set SO in your environment. +'
14771 echo '+ Do you really mean to change the extension for shared libraries? +'
14772 echo '+ Continuing in 10 seconds to let you to ponder. +'
14773 echo '+ +'
14774 echo '====================================================================='
14775 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014776fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014777{ echo "$as_me:$LINENO: result: $SO" >&5
14778echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014779
Ronald Oussoren79f90492009-01-02 10:44:46 +000014780
Neal Norwitz58e28882006-05-19 07:00:58 +000014781cat >>confdefs.h <<_ACEOF
14782#define SHLIB_EXT "$SO"
14783_ACEOF
14784
Guido van Rossum0a516c91994-09-12 10:58:40 +000014785# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014786# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014787# (Shared libraries in this instance are shared modules to be loaded into
14788# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014789{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14790echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014791if test -z "$LDSHARED"
14792then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014793 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014794 AIX*)
14795 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014796 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014797 ;;
14798 BeOS*)
14799 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014800 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014801 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014802 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014803 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014804 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014805 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014806 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014807 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014808 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014809 hp*|HP*)
14810 if test "$GCC" = "yes"
14811 then LDSHARED='$(CC) -shared'
14812 else LDSHARED='ld -b';
14813 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014814 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014815 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014816 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14817 if test "$enable_framework" ; then
14818 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014819 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14820 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014821 else
14822 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014823 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014824 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014825 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014826 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14827 if test "$enable_framework" ; then
14828 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014829 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14830 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014831 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014832 # No framework, use the Python app as bundle-loader
14833 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014834 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014835 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014836 Darwin/*)
14837 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14838 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014839
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014840 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014841 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014842 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014843 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014844 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014845 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14846 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014847 else
14848 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14849 if test "$enable_framework" ; then
14850 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014851 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14852 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014853 else
14854 # No framework, use the Python app as bundle-loader
14855 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14856 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14857 fi
14858 fi
14859 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014860 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014861 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014862 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014863 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014864 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +000014865 LDSHARED='$(CC) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014866 else
14867 LDSHARED="ld -Bshareable ${LDFLAGS}"
14868 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014869 OpenBSD*)
14870 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14871 then
14872 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14873 else
14874 case `uname -r` in
14875 [01].* | 2.[0-7] | 2.[0-7].*)
14876 LDSHARED="ld -Bshareable ${LDFLAGS}"
14877 ;;
14878 *)
14879 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14880 ;;
14881 esac
14882 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014883 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014884 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014885 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014886 then LDSHARED='$(CC) -shared'
14887 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014888 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014889 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014890 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014891 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014892 *) LDSHARED="ld";;
14893 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014894fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014895{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14896echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014897BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014899# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014900{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14901echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014902if test -z "$CCSHARED"
14903then
Guido van Rossum07397971997-04-29 21:49:50 +000014904 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014905 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014906 then CCSHARED="-fPIC";
14907 elif test `uname -p` = sparc;
14908 then CCSHARED="-xcode=pic32";
14909 else CCSHARED="-Kpic";
14910 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014911 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014912 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014913 else CCSHARED="+z";
14914 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014915 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014916 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014917 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014918 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014919 if test "$GCC" = "yes"
14920 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014921 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014922 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014923 SCO_SV*)
14924 if test "$GCC" = "yes"
14925 then CCSHARED="-fPIC"
14926 else CCSHARED="-Kpic -belf"
14927 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014928 IRIX*/6*) case $CC in
14929 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014930 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014931 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014933 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14936echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014937# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014938# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014939{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14940echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014941if test -z "$LINKFORSHARED"
14942then
Guido van Rossum07397971997-04-29 21:49:50 +000014943 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014944 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014945 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014946 LINKFORSHARED="-Wl,-E -Wl,+s";;
14947# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014948 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014949 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014950 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014952 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14953 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014954 # not used by the core itself but which needs to be in the core so
14955 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014956 # -prebind is no longer used, because it actually seems to give a
14957 # slowdown in stead of a speedup, maybe due to the large number of
14958 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014959
14960 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014961 if test "$enable_framework"
14962 then
Jack Jansenda49e192005-01-07 13:08:22 +000014963 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014964 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014965 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014966 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014967 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014968 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014969 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014970 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14971 then
14972 LINKFORSHARED="-Wl,--export-dynamic"
14973 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014974 SunOS/5*) case $CC in
14975 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014976 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014977 then
14978 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014979 fi;;
14980 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014981 CYGWIN*)
14982 if test $enable_shared = "no"
14983 then
14984 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14985 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014986 QNX*)
14987 # -Wl,-E causes the symbols to be added to the dynamic
14988 # symbol table so that they can be found when a module
14989 # is loaded. -N 2048K causes the stack size to be set
14990 # to 2048 kilobytes so that the stack doesn't overflow
14991 # when running test_compile.py.
14992 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014993 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014994fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014995{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14996echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014999
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015000{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
15001echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015002if test ! "$LIBRARY" = "$LDLIBRARY"
15003then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015004 case $ac_sys_system in
15005 CYGWIN*)
15006 # Cygwin needs CCSHARED when building extension DLLs
15007 # but not when building the interpreter DLL.
15008 CFLAGSFORSHARED='';;
15009 *)
15010 CFLAGSFORSHARED='$(CCSHARED)'
15011 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015013{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15014echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015015
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015016# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15017# library (with --enable-shared).
15018# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015019# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15020# if it is not required, since it creates a dependency of the shared library
15021# to LIBS. This, in turn, means that applications linking the shared libpython
15022# don't need to link LIBS explicitly. The default should be only changed
15023# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015025{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15026echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015027case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015028 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015029 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015030esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015031{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15032echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015033
15034
Guido van Rossum627b2d71993-12-24 10:39:16 +000015035# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015037{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15038echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015039if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015041else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015043LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015045/* confdefs.h. */
15046_ACEOF
15047cat confdefs.h >>conftest.$ac_ext
15048cat >>conftest.$ac_ext <<_ACEOF
15049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015050
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051/* Override any GCC internal prototype to avoid an error.
15052 Use char because int might match the return type of a GCC
15053 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015054#ifdef __cplusplus
15055extern "C"
15056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015057char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015058int
15059main ()
15060{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 ;
15063 return 0;
15064}
15065_ACEOF
15066rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015067if { (ac_try="$ac_link"
15068case "(($ac_try" in
15069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15070 *) ac_try_echo=$ac_try;;
15071esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015075 grep -v '^ *+' conftest.er1 >conftest.err
15076 rm -f conftest.er1
15077 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079 (exit $ac_status); } && {
15080 test -z "$ac_c_werror_flag" ||
15081 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015082 } && test -s conftest$ac_exeext &&
15083 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015084 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015087sed 's/^/| /' conftest.$ac_ext >&5
15088
Martin v. Löwiseba40652007-08-30 20:10:57 +000015089 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015091
15092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015093 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015094LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015095fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015096{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15097echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15098if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 cat >>confdefs.h <<_ACEOF
15100#define HAVE_LIBDL 1
15101_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015102
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015103 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015104
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015105fi
15106 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015107
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015108{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15109echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015110if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015111 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015112else
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015114LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015115cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015116/* confdefs.h. */
15117_ACEOF
15118cat confdefs.h >>conftest.$ac_ext
15119cat >>conftest.$ac_ext <<_ACEOF
15120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015121
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122/* Override any GCC internal prototype to avoid an error.
15123 Use char because int might match the return type of a GCC
15124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015125#ifdef __cplusplus
15126extern "C"
15127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015128char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015129int
15130main ()
15131{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 ;
15134 return 0;
15135}
15136_ACEOF
15137rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138if { (ac_try="$ac_link"
15139case "(($ac_try" in
15140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15141 *) ac_try_echo=$ac_try;;
15142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015146 grep -v '^ *+' conftest.er1 >conftest.err
15147 rm -f conftest.er1
15148 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150 (exit $ac_status); } && {
15151 test -z "$ac_c_werror_flag" ||
15152 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015153 } && test -s conftest$ac_exeext &&
15154 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015158sed 's/^/| /' conftest.$ac_ext >&5
15159
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015162
15163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015164 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015165LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015166fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015167{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15168echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15169if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 cat >>confdefs.h <<_ACEOF
15171#define HAVE_LIBDLD 1
15172_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015173
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015174 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176fi
15177 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015178
Ronald Oussoren79f90492009-01-02 10:44:46 +000015179# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015180if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015181 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15182echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015183if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015184 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015185else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015186 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* confdefs.h. */
15189_ACEOF
15190cat confdefs.h >>conftest.$ac_ext
15191cat >>conftest.$ac_ext <<_ACEOF
15192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193
Martin v. Löwiseba40652007-08-30 20:10:57 +000015194/* Override any GCC internal prototype to avoid an error.
15195 Use char because int might match the return type of a GCC
15196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015197#ifdef __cplusplus
15198extern "C"
15199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015200char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201int
15202main ()
15203{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 ;
15206 return 0;
15207}
15208_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209for ac_lib in '' pthread rt posix4; do
15210 if test -z "$ac_lib"; then
15211 ac_res="none required"
15212 else
15213 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 fi
15216 rm -f conftest.$ac_objext conftest$ac_exeext
15217if { (ac_try="$ac_link"
15218case "(($ac_try" in
15219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15220 *) ac_try_echo=$ac_try;;
15221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015224 ac_status=$?
15225 grep -v '^ *+' conftest.er1 >conftest.err
15226 rm -f conftest.er1
15227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229 (exit $ac_status); } && {
15230 test -z "$ac_c_werror_flag" ||
15231 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015232 } && test -s conftest$ac_exeext &&
15233 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015234 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015236 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015237sed 's/^/| /' conftest.$ac_ext >&5
15238
Martin v. Löwiseba40652007-08-30 20:10:57 +000015239
Brett Cannon19fab762007-06-02 03:02:29 +000015240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241
15242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15243 conftest$ac_exeext
15244 if test "${ac_cv_search_sem_init+set}" = set; then
15245 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015247done
15248if test "${ac_cv_search_sem_init+set}" = set; then
15249 :
15250else
15251 ac_cv_search_sem_init=no
15252fi
15253rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015254LIBS=$ac_func_search_save_LIBS
15255fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015256{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15257echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258ac_res=$ac_cv_search_sem_init
15259if test "$ac_res" != no; then
15260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015261
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015262fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015263 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015264 # posix4 on Solaris 2.6
15265 # pthread (first!) on Linux
15266fi
15267
Martin v. Löwis19d17342003-06-14 21:03:05 +000015268# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015269{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15270echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015271if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015272 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015273else
15274 ac_check_lib_save_LIBS=$LIBS
15275LIBS="-lintl $LIBS"
15276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015277/* confdefs.h. */
15278_ACEOF
15279cat confdefs.h >>conftest.$ac_ext
15280cat >>conftest.$ac_ext <<_ACEOF
15281/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015282
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283/* Override any GCC internal prototype to avoid an error.
15284 Use char because int might match the return type of a GCC
15285 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015286#ifdef __cplusplus
15287extern "C"
15288#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015289char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015290int
15291main ()
15292{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015294 ;
15295 return 0;
15296}
15297_ACEOF
15298rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015299if { (ac_try="$ac_link"
15300case "(($ac_try" in
15301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15302 *) ac_try_echo=$ac_try;;
15303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015305 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015307 grep -v '^ *+' conftest.er1 >conftest.err
15308 rm -f conftest.er1
15309 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311 (exit $ac_status); } && {
15312 test -z "$ac_c_werror_flag" ||
15313 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314 } && test -s conftest$ac_exeext &&
15315 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015316 ac_cv_lib_intl_textdomain=yes
15317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015319sed 's/^/| /' conftest.$ac_ext >&5
15320
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015323
15324rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015326LIBS=$ac_check_lib_save_LIBS
15327fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015328{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15329echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15330if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015331
15332cat >>confdefs.h <<\_ACEOF
15333#define WITH_LIBINTL 1
15334_ACEOF
15335
15336fi
15337
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015338
15339# checks for system dependent C++ extensions support
15340case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015341 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15342echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015344/* confdefs.h. */
15345_ACEOF
15346cat confdefs.h >>conftest.$ac_ext
15347cat >>conftest.$ac_ext <<_ACEOF
15348/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015349#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015350int
15351main ()
15352{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015353loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 ;
15355 return 0;
15356}
15357_ACEOF
15358rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359if { (ac_try="$ac_link"
15360case "(($ac_try" in
15361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15362 *) ac_try_echo=$ac_try;;
15363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015367 grep -v '^ *+' conftest.er1 >conftest.err
15368 rm -f conftest.er1
15369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371 (exit $ac_status); } && {
15372 test -z "$ac_c_werror_flag" ||
15373 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015374 } && test -s conftest$ac_exeext &&
15375 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015376
Martin v. Löwis11437992002-04-12 09:54:03 +000015377cat >>confdefs.h <<\_ACEOF
15378#define AIX_GENUINE_CPLUSPLUS 1
15379_ACEOF
15380
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015381 { echo "$as_me:$LINENO: result: yes" >&5
15382echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015383else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015385sed 's/^/| /' conftest.$ac_ext >&5
15386
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015387 { echo "$as_me:$LINENO: result: no" >&5
15388echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390
15391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015392 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015393 *) ;;
15394esac
15395
Guido van Rossum70c7f481998-03-26 18:44:10 +000015396# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015397# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015398{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15399echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015400if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015402else
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015404LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015406/* confdefs.h. */
15407_ACEOF
15408cat confdefs.h >>conftest.$ac_ext
15409cat >>conftest.$ac_ext <<_ACEOF
15410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015411
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412/* Override any GCC internal prototype to avoid an error.
15413 Use char because int might match the return type of a GCC
15414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015415#ifdef __cplusplus
15416extern "C"
15417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015418char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015419int
15420main ()
15421{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 ;
15424 return 0;
15425}
15426_ACEOF
15427rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015428if { (ac_try="$ac_link"
15429case "(($ac_try" in
15430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15431 *) ac_try_echo=$ac_try;;
15432esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015434 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015436 grep -v '^ *+' conftest.er1 >conftest.err
15437 rm -f conftest.er1
15438 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015440 (exit $ac_status); } && {
15441 test -z "$ac_c_werror_flag" ||
15442 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015443 } && test -s conftest$ac_exeext &&
15444 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015445 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015448sed 's/^/| /' conftest.$ac_ext >&5
15449
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015452
15453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015455LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015456fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015457{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15458echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15459if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015460 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015461fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015462 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015463{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15464echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015465if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015467else
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015469LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015471/* confdefs.h. */
15472_ACEOF
15473cat confdefs.h >>conftest.$ac_ext
15474cat >>conftest.$ac_ext <<_ACEOF
15475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015476
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477/* Override any GCC internal prototype to avoid an error.
15478 Use char because int might match the return type of a GCC
15479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015480#ifdef __cplusplus
15481extern "C"
15482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015483char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015484int
15485main ()
15486{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 ;
15489 return 0;
15490}
15491_ACEOF
15492rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493if { (ac_try="$ac_link"
15494case "(($ac_try" in
15495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15496 *) ac_try_echo=$ac_try;;
15497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015499 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015501 grep -v '^ *+' conftest.er1 >conftest.err
15502 rm -f conftest.er1
15503 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505 (exit $ac_status); } && {
15506 test -z "$ac_c_werror_flag" ||
15507 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015508 } && test -s conftest$ac_exeext &&
15509 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015511else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015513sed 's/^/| /' conftest.$ac_ext >&5
15514
Martin v. Löwiseba40652007-08-30 20:10:57 +000015515 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015517
15518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015520LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015521fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015522{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15523echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15524if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015525 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015526fi
15527 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015528
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015529case "$ac_sys_system" in
15530BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015531{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15532echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015533if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015535else
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015537LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015539/* confdefs.h. */
15540_ACEOF
15541cat confdefs.h >>conftest.$ac_ext
15542cat >>conftest.$ac_ext <<_ACEOF
15543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
Martin v. Löwiseba40652007-08-30 20:10:57 +000015545/* Override any GCC internal prototype to avoid an error.
15546 Use char because int might match the return type of a GCC
15547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015548#ifdef __cplusplus
15549extern "C"
15550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015551char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015552int
15553main ()
15554{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015555return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 ;
15557 return 0;
15558}
15559_ACEOF
15560rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015561if { (ac_try="$ac_link"
15562case "(($ac_try" in
15563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15564 *) ac_try_echo=$ac_try;;
15565esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015569 grep -v '^ *+' conftest.er1 >conftest.err
15570 rm -f conftest.er1
15571 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015573 (exit $ac_status); } && {
15574 test -z "$ac_c_werror_flag" ||
15575 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015576 } && test -s conftest$ac_exeext &&
15577 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015581sed 's/^/| /' conftest.$ac_ext >&5
15582
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015585
15586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015587 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015588LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015589fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015590{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15591echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15592if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015593 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015594fi
15595 # BeOS
15596;;
15597esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015598
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015599{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15600echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015603if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015605{ echo "$as_me:$LINENO: result: $withval" >&5
15606echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015607LIBS="$withval $LIBS"
15608
15609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015610 { echo "$as_me:$LINENO: result: no" >&5
15611echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612fi
15613
Guido van Rossum7f43da71994-08-01 12:15:30 +000015614
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015615if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015616 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15617set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15618{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15619echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15620if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15621 echo $ECHO_N "(cached) $ECHO_C" >&6
15622else
15623 case $PKG_CONFIG in
15624 [\\/]* | ?:[\\/]*)
15625 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15626 ;;
15627 *)
15628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15629for as_dir in $PATH
15630do
15631 IFS=$as_save_IFS
15632 test -z "$as_dir" && as_dir=.
15633 for ac_exec_ext in '' $ac_executable_extensions; do
15634 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15635 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15637 break 2
15638 fi
15639done
15640done
15641IFS=$as_save_IFS
15642
15643 ;;
15644esac
15645fi
15646PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15647if test -n "$PKG_CONFIG"; then
15648 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15649echo "${ECHO_T}$PKG_CONFIG" >&6; }
15650else
15651 { echo "$as_me:$LINENO: result: no" >&5
15652echo "${ECHO_T}no" >&6; }
15653fi
15654
15655
15656fi
15657if test -z "$ac_cv_path_PKG_CONFIG"; then
15658 ac_pt_PKG_CONFIG=$PKG_CONFIG
15659 # Extract the first word of "pkg-config", so it can be a program name with args.
15660set dummy pkg-config; ac_word=$2
15661{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15662echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15663if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15664 echo $ECHO_N "(cached) $ECHO_C" >&6
15665else
15666 case $ac_pt_PKG_CONFIG in
15667 [\\/]* | ?:[\\/]*)
15668 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15669 ;;
15670 *)
15671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15672for as_dir in $PATH
15673do
15674 IFS=$as_save_IFS
15675 test -z "$as_dir" && as_dir=.
15676 for ac_exec_ext in '' $ac_executable_extensions; do
15677 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15678 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15680 break 2
15681 fi
15682done
15683done
15684IFS=$as_save_IFS
15685
15686 ;;
15687esac
15688fi
15689ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15690if test -n "$ac_pt_PKG_CONFIG"; then
15691 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15692echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15693else
15694 { echo "$as_me:$LINENO: result: no" >&5
15695echo "${ECHO_T}no" >&6; }
15696fi
15697
15698 if test "x$ac_pt_PKG_CONFIG" = x; then
15699 PKG_CONFIG=""
15700 else
15701 case $cross_compiling:$ac_tool_warned in
15702yes:)
15703{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15704whose name does not start with the host triplet. If you think this
15705configuration is useful to you, please write to autoconf@gnu.org." >&5
15706echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15707whose name does not start with the host triplet. If you think this
15708configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15709ac_tool_warned=yes ;;
15710esac
15711 PKG_CONFIG=$ac_pt_PKG_CONFIG
15712 fi
15713else
15714 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15715fi
15716
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015717
15718# Check for use of the system expat library
15719{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15720echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15721
15722# Check whether --with-system_expat was given.
15723if test "${with_system_expat+set}" = set; then
15724 withval=$with_system_expat;
15725fi
15726
15727
15728{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15729echo "${ECHO_T}$with_system_expat" >&6; }
15730
15731# Check for use of the system libffi library
15732{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15733echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15734
15735# Check whether --with-system_ffi was given.
15736if test "${with_system_ffi+set}" = set; then
15737 withval=$with_system_ffi;
15738fi
15739
15740
15741if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015742 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15743else
15744 LIBFFI_INCLUDEDIR=""
15745fi
15746
15747
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015748{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15749echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015750
Benjamin Peterson867475c2009-04-29 20:36:25 +000015751# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015752{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15753echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015754
15755# Check whether --with-dbmliborder was given.
15756if test "${with_dbmliborder+set}" = set; then
15757 withval=$with_dbmliborder;
15758if test x$with_dbmliborder = xyes
15759then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015760{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15761echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015762 { (exit 1); exit 1; }; }
15763else
15764 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15765 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15766 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015767 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15768echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015769 { (exit 1); exit 1; }; }
15770 fi
15771 done
15772fi
15773fi
15774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015775{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15776echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015777
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015778# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015779
15780
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015781{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15782echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015785if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 withval=$with_signal_module;
15787fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015788
15789
15790if test -z "$with_signal_module"
15791then with_signal_module="yes"
15792fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015793{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15794echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015795
15796if test "${with_signal_module}" = "yes"; then
15797 USE_SIGNAL_MODULE=""
15798 SIGNAL_OBJS=""
15799else
15800 USE_SIGNAL_MODULE="#"
15801 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15802fi
15803
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015804# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015805
Barry Warsawc0d24d82000-06-29 16:12:00 +000015806USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015808{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15809echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015810
Guido van Rossumec2f0731997-01-22 20:54:01 +000015811
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015813if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015815{ echo "$as_me:$LINENO: result: $withval" >&5
15816echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015817LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015818if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015819 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015820fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015822 { echo "$as_me:$LINENO: result: no" >&5
15823echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824fi
15825
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
15827# Templates for things AC_DEFINEd more than once.
15828# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015829
15830
Martin v. Löwis11437992002-04-12 09:54:03 +000015831
15832
15833
15834
15835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015836{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15837echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015840if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841 withval=$with_threads;
15842fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015843
15844
Barry Warsawc0d24d82000-06-29 16:12:00 +000015845# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
Martin v. Löwiseba40652007-08-30 20:10:57 +000015847# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015848if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849 withval=$with_thread; with_threads=$with_thread
15850fi
15851
Barry Warsawc0d24d82000-06-29 16:12:00 +000015852
15853if test -z "$with_threads"
15854then with_threads="yes"
15855fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015856{ echo "$as_me:$LINENO: result: $with_threads" >&5
15857echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015858
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015859
Barry Warsawc0d24d82000-06-29 16:12:00 +000015860if test "$with_threads" = "no"
15861then
15862 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015863elif test "$ac_cv_pthread_is_default" = yes
15864then
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015868
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015869 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015871#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015873
15874 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015876elif test "$ac_cv_kpthread" = "yes"
15877then
15878 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015879 if test "$ac_cv_cxx_thread" = "yes"; then
15880 CXX="$CXX -Kpthread"
15881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015885
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015886 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015887 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015888elif test "$ac_cv_kthread" = "yes"
15889then
15890 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015891 if test "$ac_cv_cxx_thread" = "yes"; then
15892 CXX="$CXX -Kthread"
15893 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015894 cat >>confdefs.h <<\_ACEOF
15895#define WITH_THREAD 1
15896_ACEOF
15897
15898 posix_threads=yes
15899 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015900elif test "$ac_cv_pthread" = "yes"
15901then
15902 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015903 if test "$ac_cv_cxx_thread" = "yes"; then
15904 CXX="$CXX -pthread"
15905 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015906 cat >>confdefs.h <<\_ACEOF
15907#define WITH_THREAD 1
15908_ACEOF
15909
15910 posix_threads=yes
15911 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015912else
15913 if test ! -z "$with_threads" -a -d "$with_threads"
15914 then LDFLAGS="$LDFLAGS -L$with_threads"
15915 fi
15916 if test ! -z "$withval" -a -d "$withval"
15917 then LDFLAGS="$LDFLAGS -L$withval"
15918 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015919
15920 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015921 # define _POSIX_THREADS in unistd.h. Some apparently don't
15922 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015923 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15924echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015926/* confdefs.h. */
15927_ACEOF
15928cat confdefs.h >>conftest.$ac_ext
15929cat >>conftest.$ac_ext <<_ACEOF
15930/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015931
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015932#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015933#ifdef _POSIX_THREADS
15934yes
15935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015936
15937_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015939 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015940 unistd_defines_pthreads=yes
15941else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015942 unistd_defines_pthreads=no
15943fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000015944rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015946 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15947echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015948
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015950#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015951_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015952
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15955echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015956if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015957 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015958fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015959{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15960echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015961else
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015963{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15964echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015966/* confdefs.h. */
15967_ACEOF
15968cat confdefs.h >>conftest.$ac_ext
15969cat >>conftest.$ac_ext <<_ACEOF
15970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015971$ac_includes_default
15972#include <cthreads.h>
15973_ACEOF
15974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975if { (ac_try="$ac_compile"
15976case "(($ac_try" in
15977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15978 *) ac_try_echo=$ac_try;;
15979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015983 grep -v '^ *+' conftest.er1 >conftest.err
15984 rm -f conftest.er1
15985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015987 (exit $ac_status); } && {
15988 test -z "$ac_c_werror_flag" ||
15989 test ! -s conftest.err
15990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 ac_header_compiler=yes
15992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015994sed 's/^/| /' conftest.$ac_ext >&5
15995
Martin v. Löwiseba40652007-08-30 20:10:57 +000015996 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998
15999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016000{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16001echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016002
16003# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16005echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016007/* confdefs.h. */
16008_ACEOF
16009cat confdefs.h >>conftest.$ac_ext
16010cat >>conftest.$ac_ext <<_ACEOF
16011/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016012#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016013_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016014if { (ac_try="$ac_cpp conftest.$ac_ext"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016020 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016022 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 rm -f conftest.er1
16024 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016026 (exit $ac_status); } >/dev/null && {
16027 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16028 test ! -s conftest.err
16029 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ac_header_preproc=yes
16031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016033sed 's/^/| /' conftest.$ac_ext >&5
16034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016039{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16040echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016041
16042# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016043case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16044 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016045 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16046echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16047 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16048echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016049 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016050 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016051 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016052 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16053echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16054 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16055echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16056 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16057echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16058 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16059echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16060 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16061echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16062 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16063echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016065## -------------------------------------- ##
16066## Report this to http://bugs.python.org/ ##
16067## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016068_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016069 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016070 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016071esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016072{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16073echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016074if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016075 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016076else
16077 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016078fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016079{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16080echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016081
16082fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016083if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016085#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016086_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016087
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016089#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016090_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
16093cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016094#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016095_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016096
16097 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016098 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016099else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016100
Martin v. Löwis11437992002-04-12 09:54:03 +000016101 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016102 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16103echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016104if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016106fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016107{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16108echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016109else
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016111{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16112echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016114/* confdefs.h. */
16115_ACEOF
16116cat confdefs.h >>conftest.$ac_ext
16117cat >>conftest.$ac_ext <<_ACEOF
16118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016119$ac_includes_default
16120#include <mach/cthreads.h>
16121_ACEOF
16122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123if { (ac_try="$ac_compile"
16124case "(($ac_try" in
16125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16126 *) ac_try_echo=$ac_try;;
16127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016131 grep -v '^ *+' conftest.er1 >conftest.err
16132 rm -f conftest.er1
16133 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016135 (exit $ac_status); } && {
16136 test -z "$ac_c_werror_flag" ||
16137 test ! -s conftest.err
16138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 ac_header_compiler=yes
16140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016142sed 's/^/| /' conftest.$ac_ext >&5
16143
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146
16147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016148{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16149echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016150
16151# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016152{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16153echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016155/* confdefs.h. */
16156_ACEOF
16157cat confdefs.h >>conftest.$ac_ext
16158cat >>conftest.$ac_ext <<_ACEOF
16159/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016160#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016162if { (ac_try="$ac_cpp conftest.$ac_ext"
16163case "(($ac_try" in
16164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16165 *) ac_try_echo=$ac_try;;
16166esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016168 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016170 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 rm -f conftest.er1
16172 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016174 (exit $ac_status); } >/dev/null && {
16175 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16176 test ! -s conftest.err
16177 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ac_header_preproc=yes
16179else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016181sed 's/^/| /' conftest.$ac_ext >&5
16182
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016185
Martin v. Löwis11437992002-04-12 09:54:03 +000016186rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016187{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16188echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
16190# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016191case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16192 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016193 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16194echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16195 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16196echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016197 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016198 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016199 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16201echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16202 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16203echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16204 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16205echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16206 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16207echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16208 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16209echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16210 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16211echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016212 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016213## -------------------------------------- ##
16214## Report this to http://bugs.python.org/ ##
16215## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016216_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016217 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016218 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016220{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16221echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016222if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016223 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016224else
16225 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016227{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16228echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016229
16230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016231if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016234_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016235
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016237#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016238_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016239
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
16241cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016242#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016243_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016244
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016245 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016246else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016247
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016248 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16249echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016250
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016252if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016253 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16254echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016255 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016256#define WITH_THREAD 1
16257_ACEOF
16258
16259
16260cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016261#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016262_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016263
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016264 LIBS="-lpth $LIBS"
16265 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016267 { echo "$as_me:$LINENO: result: no" >&5
16268echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016269
16270 # Just looking for pthread_create in libpthread is not enough:
16271 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16272 # So we really have to include pthread.h, and then link.
16273 _libs=$LIBS
16274 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016275 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16276echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016278/* confdefs.h. */
16279_ACEOF
16280cat confdefs.h >>conftest.$ac_ext
16281cat >>conftest.$ac_ext <<_ACEOF
16282/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016283#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016284
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016285void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016286int
16287main ()
16288{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016289
16290pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ;
16292 return 0;
16293}
16294_ACEOF
16295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016296if { (ac_try="$ac_link"
16297case "(($ac_try" in
16298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16299 *) ac_try_echo=$ac_try;;
16300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016304 grep -v '^ *+' conftest.er1 >conftest.err
16305 rm -f conftest.er1
16306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308 (exit $ac_status); } && {
16309 test -z "$ac_c_werror_flag" ||
16310 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016311 } && test -s conftest$ac_exeext &&
16312 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016313
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016314 { echo "$as_me:$LINENO: result: yes" >&5
16315echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016317#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016318_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016319
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016320 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016321 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016322else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016324sed 's/^/| /' conftest.$ac_ext >&5
16325
Martin v. Löwis11437992002-04-12 09:54:03 +000016326
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016327 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016328 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16329echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016330if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016331 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016332else
Martin v. Löwis11437992002-04-12 09:54:03 +000016333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016334/* confdefs.h. */
16335_ACEOF
16336cat confdefs.h >>conftest.$ac_ext
16337cat >>conftest.$ac_ext <<_ACEOF
16338/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016339/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16340 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16341#define pthread_detach innocuous_pthread_detach
16342
Guido van Rossumad678af1998-10-02 14:42:15 +000016343/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016344 which can conflict with char pthread_detach (); below.
16345 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016346 <limits.h> exists even on freestanding compilers. */
16347
16348#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016349# include <limits.h>
16350#else
16351# include <assert.h>
16352#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016353
16354#undef pthread_detach
16355
Martin v. Löwiseba40652007-08-30 20:10:57 +000016356/* Override any GCC internal prototype to avoid an error.
16357 Use char because int might match the return type of a GCC
16358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016359#ifdef __cplusplus
16360extern "C"
16361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016362char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016363/* The GNU C library defines this for functions which it implements
16364 to always fail with ENOSYS. Some functions are actually named
16365 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016366#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016367choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016368#endif
16369
Skip Montanaro6dead952003-09-25 14:50:04 +000016370int
16371main ()
16372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 ;
16375 return 0;
16376}
16377_ACEOF
16378rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379if { (ac_try="$ac_link"
16380case "(($ac_try" in
16381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16382 *) ac_try_echo=$ac_try;;
16383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016387 grep -v '^ *+' conftest.er1 >conftest.err
16388 rm -f conftest.er1
16389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016391 (exit $ac_status); } && {
16392 test -z "$ac_c_werror_flag" ||
16393 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016394 } && test -s conftest$ac_exeext &&
16395 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016397else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016399sed 's/^/| /' conftest.$ac_ext >&5
16400
Martin v. Löwiseba40652007-08-30 20:10:57 +000016401 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403
16404rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016405 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016406fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016407{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16408echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16409if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016411#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016412_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016413
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016414 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016415 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016416else
Guido van Rossumad678af1998-10-02 14:42:15 +000016417
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016418 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016419 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16420echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016421if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016423fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016424{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16425echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016426else
16427 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016428{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16429echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016431/* confdefs.h. */
16432_ACEOF
16433cat confdefs.h >>conftest.$ac_ext
16434cat >>conftest.$ac_ext <<_ACEOF
16435/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016436$ac_includes_default
16437#include <atheos/threads.h>
16438_ACEOF
16439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440if { (ac_try="$ac_compile"
16441case "(($ac_try" in
16442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16443 *) ac_try_echo=$ac_try;;
16444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016448 grep -v '^ *+' conftest.er1 >conftest.err
16449 rm -f conftest.er1
16450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016452 (exit $ac_status); } && {
16453 test -z "$ac_c_werror_flag" ||
16454 test ! -s conftest.err
16455 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016456 ac_header_compiler=yes
16457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016459sed 's/^/| /' conftest.$ac_ext >&5
16460
Martin v. Löwiseba40652007-08-30 20:10:57 +000016461 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016463
16464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016465{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16466echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016467
16468# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16470echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016472/* confdefs.h. */
16473_ACEOF
16474cat confdefs.h >>conftest.$ac_ext
16475cat >>conftest.$ac_ext <<_ACEOF
16476/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016477#include <atheos/threads.h>
16478_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016479if { (ac_try="$ac_cpp conftest.$ac_ext"
16480case "(($ac_try" in
16481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16482 *) ac_try_echo=$ac_try;;
16483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016485 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016486 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016487 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016488 rm -f conftest.er1
16489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016491 (exit $ac_status); } >/dev/null && {
16492 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16493 test ! -s conftest.err
16494 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016495 ac_header_preproc=yes
16496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016498sed 's/^/| /' conftest.$ac_ext >&5
16499
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016500 ac_header_preproc=no
16501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016502
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016503rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016504{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16505echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016506
16507# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016508case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16509 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016510 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16511echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16512 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16513echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016514 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016515 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016516 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016517 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16518echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16519 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16520echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16521 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16522echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16523 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16524echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16525 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16526echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16527 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16528echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016529 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016530## -------------------------------------- ##
16531## Report this to http://bugs.python.org/ ##
16532## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016533_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016534 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016535 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016536esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016537{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16538echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016539if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016540 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016541else
16542 ac_cv_header_atheos_threads_h=$ac_header_preproc
16543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016544{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16545echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016546
16547fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016548if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016549 cat >>confdefs.h <<\_ACEOF
16550#define WITH_THREAD 1
16551_ACEOF
16552
16553
16554cat >>confdefs.h <<\_ACEOF
16555#define ATHEOS_THREADS 1
16556_ACEOF
16557
16558 THREADOBJ="Python/thread.o"
16559else
16560
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016562 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16563echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016564if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016566fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016567{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16568echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016569else
Martin v. Löwis11437992002-04-12 09:54:03 +000016570 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016571{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16572echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016573cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016574/* confdefs.h. */
16575_ACEOF
16576cat confdefs.h >>conftest.$ac_ext
16577cat >>conftest.$ac_ext <<_ACEOF
16578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016579$ac_includes_default
16580#include <kernel/OS.h>
16581_ACEOF
16582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016583if { (ac_try="$ac_compile"
16584case "(($ac_try" in
16585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16586 *) ac_try_echo=$ac_try;;
16587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016591 grep -v '^ *+' conftest.er1 >conftest.err
16592 rm -f conftest.er1
16593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016595 (exit $ac_status); } && {
16596 test -z "$ac_c_werror_flag" ||
16597 test ! -s conftest.err
16598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 ac_header_compiler=yes
16600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016602sed 's/^/| /' conftest.$ac_ext >&5
16603
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016606
16607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016608{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16609echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016610
16611# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16613echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016615/* confdefs.h. */
16616_ACEOF
16617cat confdefs.h >>conftest.$ac_ext
16618cat >>conftest.$ac_ext <<_ACEOF
16619/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016620#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016621_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016622if { (ac_try="$ac_cpp conftest.$ac_ext"
16623case "(($ac_try" in
16624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16625 *) ac_try_echo=$ac_try;;
16626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016628 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016630 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016631 rm -f conftest.er1
16632 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016634 (exit $ac_status); } >/dev/null && {
16635 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16636 test ! -s conftest.err
16637 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 ac_header_preproc=yes
16639else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016641sed 's/^/| /' conftest.$ac_ext >&5
16642
Martin v. Löwis11437992002-04-12 09:54:03 +000016643 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645
Martin v. Löwis11437992002-04-12 09:54:03 +000016646rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016647{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16648echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016651case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16652 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016653 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16654echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16655 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16656echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016657 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016658 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016659 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016660 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16661echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16662 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16663echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16665echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16666 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16667echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16668 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16669echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16670 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16671echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016673## -------------------------------------- ##
16674## Report this to http://bugs.python.org/ ##
16675## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016676_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016677 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016678 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016680{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16681echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016682if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016683 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016684else
16685 ac_cv_header_kernel_OS_h=$ac_header_preproc
16686fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016687{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16688echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016689
16690fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016691if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 cat >>confdefs.h <<\_ACEOF
16693#define WITH_THREAD 1
16694_ACEOF
16695
16696
16697cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016698#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016699_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016700
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016701 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016702else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016703
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016704 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16705echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016706if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016708else
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016710LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016712/* confdefs.h. */
16713_ACEOF
16714cat confdefs.h >>conftest.$ac_ext
16715cat >>conftest.$ac_ext <<_ACEOF
16716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016717
Martin v. Löwiseba40652007-08-30 20:10:57 +000016718/* Override any GCC internal prototype to avoid an error.
16719 Use char because int might match the return type of a GCC
16720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016721#ifdef __cplusplus
16722extern "C"
16723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016724char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016725int
16726main ()
16727{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 ;
16730 return 0;
16731}
16732_ACEOF
16733rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734if { (ac_try="$ac_link"
16735case "(($ac_try" in
16736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16737 *) ac_try_echo=$ac_try;;
16738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016742 grep -v '^ *+' conftest.er1 >conftest.err
16743 rm -f conftest.er1
16744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746 (exit $ac_status); } && {
16747 test -z "$ac_c_werror_flag" ||
16748 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016749 } && test -s conftest$ac_exeext &&
16750 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016752else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016754sed 's/^/| /' conftest.$ac_ext >&5
16755
Martin v. Löwiseba40652007-08-30 20:10:57 +000016756 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016758
16759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016761LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016762fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016763{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16764echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16765if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016767#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016768_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016769
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016770 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016771 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016772 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016773else
Greg Steinadf63d62000-07-05 10:38:09 +000016774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016775 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16776echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016777if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016778 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016779else
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016781LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016783/* confdefs.h. */
16784_ACEOF
16785cat confdefs.h >>conftest.$ac_ext
16786cat >>conftest.$ac_ext <<_ACEOF
16787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016788
Martin v. Löwiseba40652007-08-30 20:10:57 +000016789/* Override any GCC internal prototype to avoid an error.
16790 Use char because int might match the return type of a GCC
16791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016792#ifdef __cplusplus
16793extern "C"
16794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016795char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016796int
16797main ()
16798{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016799return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016800 ;
16801 return 0;
16802}
16803_ACEOF
16804rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016805if { (ac_try="$ac_link"
16806case "(($ac_try" in
16807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808 *) ac_try_echo=$ac_try;;
16809esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016813 grep -v '^ *+' conftest.er1 >conftest.err
16814 rm -f conftest.er1
16815 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016817 (exit $ac_status); } && {
16818 test -z "$ac_c_werror_flag" ||
16819 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016820 } && test -s conftest$ac_exeext &&
16821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016825sed 's/^/| /' conftest.$ac_ext >&5
16826
Martin v. Löwiseba40652007-08-30 20:10:57 +000016827 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016829
16830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016833fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016834{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16835echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16836if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016838#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016839_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016840
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016841 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016842 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016843 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016844else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016846 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16847echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016848if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016850else
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016852LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016854/* confdefs.h. */
16855_ACEOF
16856cat confdefs.h >>conftest.$ac_ext
16857cat >>conftest.$ac_ext <<_ACEOF
16858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016859
Martin v. Löwiseba40652007-08-30 20:10:57 +000016860/* Override any GCC internal prototype to avoid an error.
16861 Use char because int might match the return type of a GCC
16862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016863#ifdef __cplusplus
16864extern "C"
16865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016866char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016867int
16868main ()
16869{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016870return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 ;
16872 return 0;
16873}
16874_ACEOF
16875rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016876if { (ac_try="$ac_link"
16877case "(($ac_try" in
16878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16879 *) ac_try_echo=$ac_try;;
16880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016884 grep -v '^ *+' conftest.er1 >conftest.err
16885 rm -f conftest.er1
16886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016888 (exit $ac_status); } && {
16889 test -z "$ac_c_werror_flag" ||
16890 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016891 } && test -s conftest$ac_exeext &&
16892 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016896sed 's/^/| /' conftest.$ac_ext >&5
16897
Martin v. Löwiseba40652007-08-30 20:10:57 +000016898 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016900
16901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016905{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16906echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16907if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016909#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016910_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016911
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016912 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016913 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016914 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016915else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016916
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016917 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16918echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016919if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016921else
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016923LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016925/* confdefs.h. */
16926_ACEOF
16927cat confdefs.h >>conftest.$ac_ext
16928cat >>conftest.$ac_ext <<_ACEOF
16929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016930
Martin v. Löwiseba40652007-08-30 20:10:57 +000016931/* Override any GCC internal prototype to avoid an error.
16932 Use char because int might match the return type of a GCC
16933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016934#ifdef __cplusplus
16935extern "C"
16936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016937char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016938int
16939main ()
16940{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016941return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 ;
16943 return 0;
16944}
16945_ACEOF
16946rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016947if { (ac_try="$ac_link"
16948case "(($ac_try" in
16949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16950 *) ac_try_echo=$ac_try;;
16951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016953 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016955 grep -v '^ *+' conftest.er1 >conftest.err
16956 rm -f conftest.er1
16957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016959 (exit $ac_status); } && {
16960 test -z "$ac_c_werror_flag" ||
16961 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016962 } && test -s conftest$ac_exeext &&
16963 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016967sed 's/^/| /' conftest.$ac_ext >&5
16968
Martin v. Löwiseba40652007-08-30 20:10:57 +000016969 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016971
16972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016974LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016975fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016976{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16977echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16978if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016980#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016981_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016983 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016984 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016985 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016986else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016987
Martin v. Löwis130fb172001-07-19 11:00:41 +000016988 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016989fi
16990
Guido van Rossum627b2d71993-12-24 10:39:16 +000016991
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016992fi
16993
Guido van Rossum0be3e491997-05-22 20:33:33 +000016994fi
16995
Guido van Rossum49545951997-12-02 19:28:29 +000016996fi
16997
Guido van Rossumb93a8621998-05-07 13:27:32 +000016998fi
16999
Guido van Rossum07bd90e2000-05-08 13:41:38 +000017000
Michael W. Hudson54241132001-12-07 15:38:26 +000017001fi
17002
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017003
17004fi
17005
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007
17008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010fi
17011
Martin v. Löwis11437992002-04-12 09:54:03 +000017012fi
17013
17014
17015fi
17016
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017017
Michael W. Hudson54241132001-12-07 15:38:26 +000017018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017019 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17020echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017021if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017023else
Martin v. Löwis11437992002-04-12 09:54:03 +000017024 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017025LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017027/* confdefs.h. */
17028_ACEOF
17029cat confdefs.h >>conftest.$ac_ext
17030cat >>conftest.$ac_ext <<_ACEOF
17031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
Martin v. Löwiseba40652007-08-30 20:10:57 +000017033/* Override any GCC internal prototype to avoid an error.
17034 Use char because int might match the return type of a GCC
17035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017036#ifdef __cplusplus
17037extern "C"
17038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017039char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017040int
17041main ()
17042{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 ;
17045 return 0;
17046}
17047_ACEOF
17048rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017049if { (ac_try="$ac_link"
17050case "(($ac_try" in
17051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17052 *) ac_try_echo=$ac_try;;
17053esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017057 grep -v '^ *+' conftest.er1 >conftest.err
17058 rm -f conftest.er1
17059 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017061 (exit $ac_status); } && {
17062 test -z "$ac_c_werror_flag" ||
17063 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017064 } && test -s conftest$ac_exeext &&
17065 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017069sed 's/^/| /' conftest.$ac_ext >&5
17070
Martin v. Löwiseba40652007-08-30 20:10:57 +000017071 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017073
17074rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017076LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017078{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17079echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17080if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017082#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017083_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017084
Martin v. Löwis130fb172001-07-19 11:00:41 +000017085 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017086 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017087 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017088fi
17089
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017090
Neal Norwitza978ab02002-11-02 16:58:05 +000017091 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017092 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17093echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017094if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017096else
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017098LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017100/* confdefs.h. */
17101_ACEOF
17102cat confdefs.h >>conftest.$ac_ext
17103cat >>conftest.$ac_ext <<_ACEOF
17104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017105
Martin v. Löwiseba40652007-08-30 20:10:57 +000017106/* Override any GCC internal prototype to avoid an error.
17107 Use char because int might match the return type of a GCC
17108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017109#ifdef __cplusplus
17110extern "C"
17111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017112char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017113int
17114main ()
17115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017116return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 ;
17118 return 0;
17119}
17120_ACEOF
17121rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017122if { (ac_try="$ac_link"
17123case "(($ac_try" in
17124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17125 *) ac_try_echo=$ac_try;;
17126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017128 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130 grep -v '^ *+' conftest.er1 >conftest.err
17131 rm -f conftest.er1
17132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017134 (exit $ac_status); } && {
17135 test -z "$ac_c_werror_flag" ||
17136 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017137 } && test -s conftest$ac_exeext &&
17138 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017142sed 's/^/| /' conftest.$ac_ext >&5
17143
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017146
17147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017149LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017151{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17152echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17153if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017154 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017155#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017156_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017157
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017158 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017159 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017160 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017161fi
17162
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017163 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017164
Martin v. Löwis130fb172001-07-19 11:00:41 +000017165 if test "$USE_THREAD_MODULE" != "#"
17166 then
17167 # If the above checks didn't disable threads, (at least) OSF1
17168 # needs this '-threads' argument during linking.
17169 case $ac_sys_system in
17170 OSF1) LDLAST=-threads;;
17171 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017172 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017173fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017174
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017175if test "$posix_threads" = "yes"; then
17176 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017177
17178cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017179#define _POSIX_THREADS 1
17180_ACEOF
17181
17182 fi
17183
17184 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17185 case $ac_sys_system/$ac_sys_release in
17186 SunOS/5.6)
17187cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017188#define HAVE_PTHREAD_DESTRUCTOR 1
17189_ACEOF
17190
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017191 ;;
17192 SunOS/5.8)
17193cat >>confdefs.h <<\_ACEOF
17194#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17195_ACEOF
17196
17197 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017198 AIX/5)
17199cat >>confdefs.h <<\_ACEOF
17200#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17201_ACEOF
17202
17203 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017204 esac
17205
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017206 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17207echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017208 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017209 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017210else
17211 if test "$cross_compiling" = yes; then
17212 ac_cv_pthread_system_supported=no
17213else
17214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017215/* confdefs.h. */
17216_ACEOF
17217cat confdefs.h >>conftest.$ac_ext
17218cat >>conftest.$ac_ext <<_ACEOF
17219/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017220#include <pthread.h>
17221 void *foo(void *parm) {
17222 return NULL;
17223 }
17224 main() {
17225 pthread_attr_t attr;
17226 pthread_t id;
17227 if (pthread_attr_init(&attr)) exit(-1);
17228 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17229 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17230 exit(0);
17231 }
17232_ACEOF
17233rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017234if { (ac_try="$ac_link"
17235case "(($ac_try" in
17236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17237 *) ac_try_echo=$ac_try;;
17238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017241 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244 { (case "(($ac_try" in
17245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17246 *) ac_try_echo=$ac_try;;
17247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017249 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017250 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017252 (exit $ac_status); }; }; then
17253 ac_cv_pthread_system_supported=yes
17254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017255 echo "$as_me: program exited with status $ac_status" >&5
17256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017257sed 's/^/| /' conftest.$ac_ext >&5
17258
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017259( exit $ac_status )
17260ac_cv_pthread_system_supported=no
17261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017262rm -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 +000017263fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017264
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265
17266
Guido van Rossum627b2d71993-12-24 10:39:16 +000017267fi
17268
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017269 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17270echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017271 if test "$ac_cv_pthread_system_supported" = "yes"; then
17272
17273cat >>confdefs.h <<\_ACEOF
17274#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17275_ACEOF
17276
17277 fi
17278
17279for ac_func in pthread_sigmask
17280do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017281as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17282{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17283echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017286else
17287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017288/* confdefs.h. */
17289_ACEOF
17290cat confdefs.h >>conftest.$ac_ext
17291cat >>conftest.$ac_ext <<_ACEOF
17292/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017293/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17294 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17295#define $ac_func innocuous_$ac_func
17296
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017297/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017298 which can conflict with char $ac_func (); below.
17299 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017300 <limits.h> exists even on freestanding compilers. */
17301
17302#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017303# include <limits.h>
17304#else
17305# include <assert.h>
17306#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017307
17308#undef $ac_func
17309
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310/* Override any GCC internal prototype to avoid an error.
17311 Use char because int might match the return type of a GCC
17312 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017313#ifdef __cplusplus
17314extern "C"
17315#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017316char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017317/* The GNU C library defines this for functions which it implements
17318 to always fail with ENOSYS. Some functions are actually named
17319 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017320#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017321choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017322#endif
17323
Skip Montanaro6dead952003-09-25 14:50:04 +000017324int
17325main ()
17326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017327return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017328 ;
17329 return 0;
17330}
17331_ACEOF
17332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017333if { (ac_try="$ac_link"
17334case "(($ac_try" in
17335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17336 *) ac_try_echo=$ac_try;;
17337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017341 grep -v '^ *+' conftest.er1 >conftest.err
17342 rm -f conftest.er1
17343 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017345 (exit $ac_status); } && {
17346 test -z "$ac_c_werror_flag" ||
17347 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017348 } && test -s conftest$ac_exeext &&
17349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017350 eval "$as_ac_var=yes"
17351else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017353sed 's/^/| /' conftest.$ac_ext >&5
17354
Martin v. Löwiseba40652007-08-30 20:10:57 +000017355 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017357
17358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017361ac_res=`eval echo '${'$as_ac_var'}'`
17362 { echo "$as_me:$LINENO: result: $ac_res" >&5
17363echo "${ECHO_T}$ac_res" >&6; }
17364if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017365 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017367_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017368 case $ac_sys_system in
17369 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017370
Jason Tishlerfac083d2003-07-22 15:20:49 +000017371cat >>confdefs.h <<\_ACEOF
17372#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17373_ACEOF
17374
17375 ;;
17376 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017377fi
17378done
17379
17380fi
17381
17382
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017383# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017384
17385
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017386{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17387echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017388# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017389if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017390 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017391 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017392 { echo "$as_me:$LINENO: result: no" >&5
17393echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394 ipv6=no
17395 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017396 *) { echo "$as_me:$LINENO: result: yes" >&5
17397echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017400_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017401
17402 ipv6=yes
17403 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017405else
Martin v. Löwis11437992002-04-12 09:54:03 +000017406
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017407 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017408 { echo "$as_me:$LINENO: result: no" >&5
17409echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410 ipv6=no
17411
17412else
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017414/* confdefs.h. */
17415_ACEOF
17416cat confdefs.h >>conftest.$ac_ext
17417cat >>conftest.$ac_ext <<_ACEOF
17418/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017419 /* AF_INET6 available check */
17420#include <sys/types.h>
17421#include <sys/socket.h>
17422main()
17423{
17424 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17425 exit(1);
17426 else
17427 exit(0);
17428}
17429
Martin v. Löwis11437992002-04-12 09:54:03 +000017430_ACEOF
17431rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017432if { (ac_try="$ac_link"
17433case "(($ac_try" in
17434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17435 *) ac_try_echo=$ac_try;;
17436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017438 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017439 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017442 { (case "(($ac_try" in
17443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17444 *) ac_try_echo=$ac_try;;
17445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017447 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017450 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017451 { echo "$as_me:$LINENO: result: yes" >&5
17452echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017453 ipv6=yes
17454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017455 echo "$as_me: program exited with status $ac_status" >&5
17456echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017457sed 's/^/| /' conftest.$ac_ext >&5
17458
Martin v. Löwis11437992002-04-12 09:54:03 +000017459( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017460{ echo "$as_me:$LINENO: result: no" >&5
17461echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462 ipv6=no
17463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017464rm -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 +000017465fi
17466
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467
17468
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017469if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017470 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17471echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017473/* confdefs.h. */
17474_ACEOF
17475cat confdefs.h >>conftest.$ac_ext
17476cat >>conftest.$ac_ext <<_ACEOF
17477/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017478#include <sys/types.h>
17479#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017480int
17481main ()
17482{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017483struct sockaddr_in6 x;
17484x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017485 ;
17486 return 0;
17487}
17488_ACEOF
17489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017490if { (ac_try="$ac_compile"
17491case "(($ac_try" in
17492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17493 *) ac_try_echo=$ac_try;;
17494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017498 grep -v '^ *+' conftest.er1 >conftest.err
17499 rm -f conftest.er1
17500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502 (exit $ac_status); } && {
17503 test -z "$ac_c_werror_flag" ||
17504 test ! -s conftest.err
17505 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017506 { echo "$as_me:$LINENO: result: yes" >&5
17507echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017508 ipv6=yes
17509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017511sed 's/^/| /' conftest.$ac_ext >&5
17512
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017513 { echo "$as_me:$LINENO: result: no" >&5
17514echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017515 ipv6=no
17516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017517
17518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017519fi
17520
17521if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017522 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017523#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017524_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017525
17526fi
17527
Martin v. Löwiseba40652007-08-30 20:10:57 +000017528fi
17529
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017530
17531ipv6type=unknown
17532ipv6lib=none
17533ipv6trylibc=no
17534
17535if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017536 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17537echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017538 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17539 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017540 case $i in
17541 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017543/* confdefs.h. */
17544_ACEOF
17545cat confdefs.h >>conftest.$ac_ext
17546cat >>conftest.$ac_ext <<_ACEOF
17547/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017548
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017549#include <netinet/in.h>
17550#ifdef IPV6_INRIA_VERSION
17551yes
17552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017553_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017555 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017556 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017557fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017558rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017559
17560 ;;
17561 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017563/* confdefs.h. */
17564_ACEOF
17565cat confdefs.h >>conftest.$ac_ext
17566cat >>conftest.$ac_ext <<_ACEOF
17567/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017568
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017569#include <netinet/in.h>
17570#ifdef __KAME__
17571yes
17572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017573_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017575 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017576 ipv6type=$i;
17577 ipv6lib=inet6
17578 ipv6libdir=/usr/local/v6/lib
17579 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017580fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017581rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017582
17583 ;;
17584 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017586/* confdefs.h. */
17587_ACEOF
17588cat confdefs.h >>conftest.$ac_ext
17589cat >>conftest.$ac_ext <<_ACEOF
17590/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017591
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017592#include <features.h>
17593#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17594yes
17595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017596_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017598 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017599 ipv6type=$i;
17600 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017601fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017602rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017603
17604 ;;
17605 linux-inet6)
17606 if test -d /usr/inet6; then
17607 ipv6type=$i
17608 ipv6lib=inet6
17609 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017610 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017611 fi
17612 ;;
17613 solaris)
17614 if test -f /etc/netconfig; then
17615 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17616 ipv6type=$i
17617 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017618 fi
17619 fi
17620 ;;
17621 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017623/* confdefs.h. */
17624_ACEOF
17625cat confdefs.h >>conftest.$ac_ext
17626cat >>conftest.$ac_ext <<_ACEOF
17627/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017628
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017629#include <sys/param.h>
17630#ifdef _TOSHIBA_INET6
17631yes
17632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017633_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017635 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017636 ipv6type=$i;
17637 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017638 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017639fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017640rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017641
17642 ;;
17643 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017645/* confdefs.h. */
17646_ACEOF
17647cat confdefs.h >>conftest.$ac_ext
17648cat >>conftest.$ac_ext <<_ACEOF
17649/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017650
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017651#include </usr/local/v6/include/sys/v6config.h>
17652#ifdef __V6D__
17653yes
17654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017655_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017657 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017658 ipv6type=$i;
17659 ipv6lib=v6;
17660 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017661 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017662fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017663rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017664
17665 ;;
17666 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017668/* confdefs.h. */
17669_ACEOF
17670cat confdefs.h >>conftest.$ac_ext
17671cat >>conftest.$ac_ext <<_ACEOF
17672/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017673
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017674#include <sys/param.h>
17675#ifdef _ZETA_MINAMI_INET6
17676yes
17677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017678_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017680 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017681 ipv6type=$i;
17682 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017683 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017684fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017685rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017686
17687 ;;
17688 esac
17689 if test "$ipv6type" != "unknown"; then
17690 break
17691 fi
17692 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017693 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17694echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017695fi
17696
17697if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17698 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17699 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17700 echo "using lib$ipv6lib"
17701 else
17702 if test $ipv6trylibc = "yes"; then
17703 echo "using libc"
17704 else
17705 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17706 echo "You need to fetch lib$ipv6lib.a from appropriate"
17707 echo 'ipv6 kit and compile beforehand.'
17708 exit 1
17709 fi
17710 fi
17711fi
17712
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017713{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17714echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017715cat >conftest.$ac_ext <<_ACEOF
17716/* confdefs.h. */
17717_ACEOF
17718cat confdefs.h >>conftest.$ac_ext
17719cat >>conftest.$ac_ext <<_ACEOF
17720/* end confdefs.h. */
17721#include <Carbon/Carbon.h>
17722int
17723main ()
17724{
17725FSIORefNum fRef = 0
17726 ;
17727 return 0;
17728}
17729_ACEOF
17730rm -f conftest.$ac_objext
17731if { (ac_try="$ac_compile"
17732case "(($ac_try" in
17733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17734 *) ac_try_echo=$ac_try;;
17735esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017737 (eval "$ac_compile") 2>conftest.er1
17738 ac_status=$?
17739 grep -v '^ *+' conftest.er1 >conftest.err
17740 rm -f conftest.er1
17741 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017743 (exit $ac_status); } && {
17744 test -z "$ac_c_werror_flag" ||
17745 test ! -s conftest.err
17746 } && test -s conftest.$ac_objext; then
17747
17748cat >>confdefs.h <<\_ACEOF
17749#define HAVE_OSX105_SDK 1
17750_ACEOF
17751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017752 { echo "$as_me:$LINENO: result: yes" >&5
17753echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017755 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017756sed 's/^/| /' conftest.$ac_ext >&5
17757
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017758 { echo "$as_me:$LINENO: result: no" >&5
17759echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017760
17761fi
17762
17763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17764
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017765# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017766{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17767echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017768
Martin v. Löwiseba40652007-08-30 20:10:57 +000017769# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017770if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017771 withval=$with_doc_strings;
17772fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017773
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017774
17775if test -z "$with_doc_strings"
17776then with_doc_strings="yes"
17777fi
17778if test "$with_doc_strings" != "no"
17779then
17780
17781cat >>confdefs.h <<\_ACEOF
17782#define WITH_DOC_STRINGS 1
17783_ACEOF
17784
17785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017786{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17787echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017788
Neil Schemenauera35c6882001-02-27 04:45:05 +000017789# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017790{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17791echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017792
Martin v. Löwiseba40652007-08-30 20:10:57 +000017793# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017794if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017795 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017796if test "$withval" != no
17797then
17798
17799cat >>confdefs.h <<\_ACEOF
17800#define WITH_TSC 1
17801_ACEOF
17802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017803 { echo "$as_me:$LINENO: result: yes" >&5
17804echo "${ECHO_T}yes" >&6; }
17805else { echo "$as_me:$LINENO: result: no" >&5
17806echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017807fi
17808else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017809 { echo "$as_me:$LINENO: result: no" >&5
17810echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017811fi
17812
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017813
17814# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017815{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17816echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017817
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017819if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017820 withval=$with_pymalloc;
17821fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017822
Neil Schemenauera35c6882001-02-27 04:45:05 +000017823
Neil Schemenauer16c22972002-03-22 15:34:49 +000017824if test -z "$with_pymalloc"
17825then with_pymalloc="yes"
17826fi
17827if test "$with_pymalloc" != "no"
17828then
Martin v. Löwis11437992002-04-12 09:54:03 +000017829
17830cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017831#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017832_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017833
17834fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017835{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17836echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017837
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017838# Check for Valgrind support
17839{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17840echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17841
17842# Check whether --with-valgrind was given.
17843if test "${with_valgrind+set}" = set; then
17844 withval=$with_valgrind;
17845else
17846 with_valgrind=no
17847fi
17848
17849{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17850echo "${ECHO_T}$with_valgrind" >&6; }
17851if test "$with_valgrind" != no; then
17852 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17853 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17854echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17855if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17856 echo $ECHO_N "(cached) $ECHO_C" >&6
17857fi
17858{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17859echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17860else
17861 # Is the header compilable?
17862{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17863echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17864cat >conftest.$ac_ext <<_ACEOF
17865/* confdefs.h. */
17866_ACEOF
17867cat confdefs.h >>conftest.$ac_ext
17868cat >>conftest.$ac_ext <<_ACEOF
17869/* end confdefs.h. */
17870$ac_includes_default
17871#include <valgrind/valgrind.h>
17872_ACEOF
17873rm -f conftest.$ac_objext
17874if { (ac_try="$ac_compile"
17875case "(($ac_try" in
17876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17877 *) ac_try_echo=$ac_try;;
17878esac
17879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17880 (eval "$ac_compile") 2>conftest.er1
17881 ac_status=$?
17882 grep -v '^ *+' conftest.er1 >conftest.err
17883 rm -f conftest.er1
17884 cat conftest.err >&5
17885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17886 (exit $ac_status); } && {
17887 test -z "$ac_c_werror_flag" ||
17888 test ! -s conftest.err
17889 } && test -s conftest.$ac_objext; then
17890 ac_header_compiler=yes
17891else
17892 echo "$as_me: failed program was:" >&5
17893sed 's/^/| /' conftest.$ac_ext >&5
17894
17895 ac_header_compiler=no
17896fi
17897
17898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17899{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17900echo "${ECHO_T}$ac_header_compiler" >&6; }
17901
17902# Is the header present?
17903{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17904echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17905cat >conftest.$ac_ext <<_ACEOF
17906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
17911#include <valgrind/valgrind.h>
17912_ACEOF
17913if { (ac_try="$ac_cpp conftest.$ac_ext"
17914case "(($ac_try" in
17915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17916 *) ac_try_echo=$ac_try;;
17917esac
17918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17919 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17920 ac_status=$?
17921 grep -v '^ *+' conftest.er1 >conftest.err
17922 rm -f conftest.er1
17923 cat conftest.err >&5
17924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17925 (exit $ac_status); } >/dev/null && {
17926 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17927 test ! -s conftest.err
17928 }; then
17929 ac_header_preproc=yes
17930else
17931 echo "$as_me: failed program was:" >&5
17932sed 's/^/| /' conftest.$ac_ext >&5
17933
17934 ac_header_preproc=no
17935fi
17936
17937rm -f conftest.err conftest.$ac_ext
17938{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17939echo "${ECHO_T}$ac_header_preproc" >&6; }
17940
17941# So? What about this header?
17942case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17943 yes:no: )
17944 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17945echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17946 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17947echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17948 ac_header_preproc=yes
17949 ;;
17950 no:yes:* )
17951 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17952echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17953 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17954echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17955 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17956echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17957 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17958echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17959 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17960echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17961 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17962echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17963 ( cat <<\_ASBOX
17964## -------------------------------------- ##
17965## Report this to http://bugs.python.org/ ##
17966## -------------------------------------- ##
17967_ASBOX
17968 ) | sed "s/^/$as_me: WARNING: /" >&2
17969 ;;
17970esac
17971{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17972echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17973if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17974 echo $ECHO_N "(cached) $ECHO_C" >&6
17975else
17976 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17977fi
17978{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17979echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17980
17981fi
17982if test $ac_cv_header_valgrind_valgrind_h = yes; then
17983
17984cat >>confdefs.h <<\_ACEOF
17985#define WITH_VALGRIND 1
17986_ACEOF
17987
17988else
17989 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17990echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17991 { (exit 1); exit 1; }; }
17992
17993fi
17994
17995
17996fi
17997
Barry Warsawef82cd72000-06-30 16:21:01 +000017998# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017999{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
18000echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018001
Martin v. Löwiseba40652007-08-30 20:10:57 +000018002# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018003if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018005if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018006then
18007
18008cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018009#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018010_ACEOF
18011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018012 { echo "$as_me:$LINENO: result: yes" >&5
18013echo "${ECHO_T}yes" >&6; }
18014else { echo "$as_me:$LINENO: result: no" >&5
18015echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018016fi
18017else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018018 { echo "$as_me:$LINENO: result: no" >&5
18019echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020fi
18021
Barry Warsawef82cd72000-06-30 16:21:01 +000018022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018023# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018024
Guido van Rossum98935bf2001-09-05 19:13:16 +000018025DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018026
Guido van Rossume97ee181999-12-20 21:27:22 +000018027# the dlopen() function means we might want to use dynload_shlib.o. some
18028# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018029
Thomas Wouters3a584202000-08-05 23:28:51 +000018030for ac_func in dlopen
18031do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018032as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18033{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18034echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018035if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018037else
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018039/* confdefs.h. */
18040_ACEOF
18041cat confdefs.h >>conftest.$ac_ext
18042cat >>conftest.$ac_ext <<_ACEOF
18043/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018044/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18046#define $ac_func innocuous_$ac_func
18047
Guido van Rossume97ee181999-12-20 21:27:22 +000018048/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018049 which can conflict with char $ac_func (); below.
18050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018051 <limits.h> exists even on freestanding compilers. */
18052
18053#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018054# include <limits.h>
18055#else
18056# include <assert.h>
18057#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018058
18059#undef $ac_func
18060
Martin v. Löwiseba40652007-08-30 20:10:57 +000018061/* Override any GCC internal prototype to avoid an error.
18062 Use char because int might match the return type of a GCC
18063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018064#ifdef __cplusplus
18065extern "C"
18066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018067char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018068/* The GNU C library defines this for functions which it implements
18069 to always fail with ENOSYS. Some functions are actually named
18070 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018072choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018073#endif
18074
Skip Montanaro6dead952003-09-25 14:50:04 +000018075int
18076main ()
18077{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018078return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018079 ;
18080 return 0;
18081}
18082_ACEOF
18083rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018084if { (ac_try="$ac_link"
18085case "(($ac_try" in
18086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18087 *) ac_try_echo=$ac_try;;
18088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018092 grep -v '^ *+' conftest.er1 >conftest.err
18093 rm -f conftest.er1
18094 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018096 (exit $ac_status); } && {
18097 test -z "$ac_c_werror_flag" ||
18098 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018099 } && test -s conftest$ac_exeext &&
18100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018104sed 's/^/| /' conftest.$ac_ext >&5
18105
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108
18109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018110 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018111fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018112ac_res=`eval echo '${'$as_ac_var'}'`
18113 { echo "$as_me:$LINENO: result: $ac_res" >&5
18114echo "${ECHO_T}$ac_res" >&6; }
18115if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018116 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018118_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018119
Guido van Rossume97ee181999-12-20 21:27:22 +000018120fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018121done
Guido van Rossume97ee181999-12-20 21:27:22 +000018122
Michael W. Hudson54241132001-12-07 15:38:26 +000018123
Guido van Rossume97ee181999-12-20 21:27:22 +000018124# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18125# loading of modules.
18126
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018127{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18128echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018129if test -z "$DYNLOADFILE"
18130then
18131 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018132 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18133 if test "$ac_cv_func_dlopen" = yes
18134 then DYNLOADFILE="dynload_shlib.o"
18135 else DYNLOADFILE="dynload_aix.o"
18136 fi
18137 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018138 BeOS*) DYNLOADFILE="dynload_beos.o";;
18139 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018140 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18141 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018142 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018143 *)
18144 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18145 # out any dynamic loading
18146 if test "$ac_cv_func_dlopen" = yes
18147 then DYNLOADFILE="dynload_shlib.o"
18148 else DYNLOADFILE="dynload_stub.o"
18149 fi
18150 ;;
18151 esac
18152fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018153{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18154echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018155if test "$DYNLOADFILE" != "dynload_stub.o"
18156then
Martin v. Löwis11437992002-04-12 09:54:03 +000018157
18158cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018159#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018160_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018161
18162fi
18163
Neil Schemenauer4e425612001-06-19 15:44:15 +000018164# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18165
Michael W. Hudson54241132001-12-07 15:38:26 +000018166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018167{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18168echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018169if test -z "$MACHDEP_OBJS"
18170then
Jack Jansene578a632001-08-15 01:27:14 +000018171 MACHDEP_OBJS=$extra_machdep_objs
18172else
18173 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018174fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018175{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18176echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018177
Guido van Rossum627b2d71993-12-24 10:39:16 +000018178# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018179
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
18248
18249
Martin v. Löwisd6320502004-08-12 13:45:08 +000018250
Martin v. Löwisc3001752005-01-23 09:27:24 +000018251
18252
Neal Norwitz05a45592006-03-20 06:30:08 +000018253
18254
Martin v. Löwis382abef2007-02-19 10:55:19 +000018255
18256
Christian Heimes36281872007-11-30 21:11:28 +000018257
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018258
18259
Jesse Noller355b1262009-04-02 00:03:28 +000018260
18261
18262
18263
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018277
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018278for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18279 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018280 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018281 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018282 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018283 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018284 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018285 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18286 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018287 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018288 setlocale setregid setreuid setresuid setresgid \
18289 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018290 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018291 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018292 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018293do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18295{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018299else
Martin v. Löwis11437992002-04-12 09:54:03 +000018300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018301/* confdefs.h. */
18302_ACEOF
18303cat confdefs.h >>conftest.$ac_ext
18304cat >>conftest.$ac_ext <<_ACEOF
18305/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018306/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18307 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18308#define $ac_func innocuous_$ac_func
18309
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018310/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018311 which can conflict with char $ac_func (); below.
18312 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018313 <limits.h> exists even on freestanding compilers. */
18314
18315#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018316# include <limits.h>
18317#else
18318# include <assert.h>
18319#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018320
18321#undef $ac_func
18322
Martin v. Löwiseba40652007-08-30 20:10:57 +000018323/* Override any GCC internal prototype to avoid an error.
18324 Use char because int might match the return type of a GCC
18325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018326#ifdef __cplusplus
18327extern "C"
18328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018329char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018330/* The GNU C library defines this for functions which it implements
18331 to always fail with ENOSYS. Some functions are actually named
18332 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018333#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018334choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018335#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018336
Skip Montanaro6dead952003-09-25 14:50:04 +000018337int
18338main ()
18339{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018340return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018341 ;
18342 return 0;
18343}
18344_ACEOF
18345rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018346if { (ac_try="$ac_link"
18347case "(($ac_try" in
18348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18349 *) ac_try_echo=$ac_try;;
18350esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018354 grep -v '^ *+' conftest.er1 >conftest.err
18355 rm -f conftest.er1
18356 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018358 (exit $ac_status); } && {
18359 test -z "$ac_c_werror_flag" ||
18360 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018361 } && test -s conftest$ac_exeext &&
18362 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018363 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018366sed 's/^/| /' conftest.$ac_ext >&5
18367
Martin v. Löwiseba40652007-08-30 20:10:57 +000018368 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018370
18371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018372 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018373fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018374ac_res=`eval echo '${'$as_ac_var'}'`
18375 { echo "$as_me:$LINENO: result: $ac_res" >&5
18376echo "${ECHO_T}$ac_res" >&6; }
18377if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018380_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018381
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018382fi
18383done
18384
Michael W. Hudson54241132001-12-07 15:38:26 +000018385
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018386# For some functions, having a definition is not sufficient, since
18387# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018388{ echo "$as_me:$LINENO: checking for chroot" >&5
18389echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018391/* confdefs.h. */
18392_ACEOF
18393cat confdefs.h >>conftest.$ac_ext
18394cat >>conftest.$ac_ext <<_ACEOF
18395/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018396#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018397int
18398main ()
18399{
18400void *x=chroot
18401 ;
18402 return 0;
18403}
18404_ACEOF
18405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018406if { (ac_try="$ac_compile"
18407case "(($ac_try" in
18408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18409 *) ac_try_echo=$ac_try;;
18410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018414 grep -v '^ *+' conftest.er1 >conftest.err
18415 rm -f conftest.er1
18416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018418 (exit $ac_status); } && {
18419 test -z "$ac_c_werror_flag" ||
18420 test ! -s conftest.err
18421 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018422
18423cat >>confdefs.h <<\_ACEOF
18424#define HAVE_CHROOT 1
18425_ACEOF
18426
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018427 { echo "$as_me:$LINENO: result: yes" >&5
18428echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018431sed 's/^/| /' conftest.$ac_ext >&5
18432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018433 { echo "$as_me:$LINENO: result: no" >&5
18434echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018435
18436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018437
18438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018439{ echo "$as_me:$LINENO: checking for link" >&5
18440echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018442/* confdefs.h. */
18443_ACEOF
18444cat confdefs.h >>conftest.$ac_ext
18445cat >>conftest.$ac_ext <<_ACEOF
18446/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018447#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018448int
18449main ()
18450{
18451void *x=link
18452 ;
18453 return 0;
18454}
18455_ACEOF
18456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018457if { (ac_try="$ac_compile"
18458case "(($ac_try" in
18459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18460 *) ac_try_echo=$ac_try;;
18461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018465 grep -v '^ *+' conftest.er1 >conftest.err
18466 rm -f conftest.er1
18467 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018469 (exit $ac_status); } && {
18470 test -z "$ac_c_werror_flag" ||
18471 test ! -s conftest.err
18472 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018473
18474cat >>confdefs.h <<\_ACEOF
18475#define HAVE_LINK 1
18476_ACEOF
18477
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018478 { echo "$as_me:$LINENO: result: yes" >&5
18479echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018480else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018482sed 's/^/| /' conftest.$ac_ext >&5
18483
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018484 { echo "$as_me:$LINENO: result: no" >&5
18485echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018486
18487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018488
18489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018490{ echo "$as_me:$LINENO: checking for symlink" >&5
18491echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018493/* confdefs.h. */
18494_ACEOF
18495cat confdefs.h >>conftest.$ac_ext
18496cat >>conftest.$ac_ext <<_ACEOF
18497/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018498#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018499int
18500main ()
18501{
18502void *x=symlink
18503 ;
18504 return 0;
18505}
18506_ACEOF
18507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018508if { (ac_try="$ac_compile"
18509case "(($ac_try" in
18510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18511 *) ac_try_echo=$ac_try;;
18512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018516 grep -v '^ *+' conftest.er1 >conftest.err
18517 rm -f conftest.er1
18518 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018520 (exit $ac_status); } && {
18521 test -z "$ac_c_werror_flag" ||
18522 test ! -s conftest.err
18523 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018524
18525cat >>confdefs.h <<\_ACEOF
18526#define HAVE_SYMLINK 1
18527_ACEOF
18528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018529 { echo "$as_me:$LINENO: result: yes" >&5
18530echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018533sed 's/^/| /' conftest.$ac_ext >&5
18534
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018535 { echo "$as_me:$LINENO: result: no" >&5
18536echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018537
18538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018539
18540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018541{ echo "$as_me:$LINENO: checking for fchdir" >&5
18542echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018544/* confdefs.h. */
18545_ACEOF
18546cat confdefs.h >>conftest.$ac_ext
18547cat >>conftest.$ac_ext <<_ACEOF
18548/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018549#include <unistd.h>
18550int
18551main ()
18552{
18553void *x=fchdir
18554 ;
18555 return 0;
18556}
18557_ACEOF
18558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018559if { (ac_try="$ac_compile"
18560case "(($ac_try" in
18561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18562 *) ac_try_echo=$ac_try;;
18563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018567 grep -v '^ *+' conftest.er1 >conftest.err
18568 rm -f conftest.er1
18569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018571 (exit $ac_status); } && {
18572 test -z "$ac_c_werror_flag" ||
18573 test ! -s conftest.err
18574 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018575
18576cat >>confdefs.h <<\_ACEOF
18577#define HAVE_FCHDIR 1
18578_ACEOF
18579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018580 { echo "$as_me:$LINENO: result: yes" >&5
18581echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018582else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018584sed 's/^/| /' conftest.$ac_ext >&5
18585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018586 { echo "$as_me:$LINENO: result: no" >&5
18587echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018588
18589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018590
18591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018592{ echo "$as_me:$LINENO: checking for fsync" >&5
18593echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018595/* confdefs.h. */
18596_ACEOF
18597cat confdefs.h >>conftest.$ac_ext
18598cat >>conftest.$ac_ext <<_ACEOF
18599/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018600#include <unistd.h>
18601int
18602main ()
18603{
18604void *x=fsync
18605 ;
18606 return 0;
18607}
18608_ACEOF
18609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610if { (ac_try="$ac_compile"
18611case "(($ac_try" in
18612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18613 *) ac_try_echo=$ac_try;;
18614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018618 grep -v '^ *+' conftest.er1 >conftest.err
18619 rm -f conftest.er1
18620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018622 (exit $ac_status); } && {
18623 test -z "$ac_c_werror_flag" ||
18624 test ! -s conftest.err
18625 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018626
18627cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018628#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018629_ACEOF
18630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018631 { echo "$as_me:$LINENO: result: yes" >&5
18632echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018635sed 's/^/| /' conftest.$ac_ext >&5
18636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018637 { echo "$as_me:$LINENO: result: no" >&5
18638echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018639
18640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641
18642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018643{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18644echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018645cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018646/* confdefs.h. */
18647_ACEOF
18648cat confdefs.h >>conftest.$ac_ext
18649cat >>conftest.$ac_ext <<_ACEOF
18650/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018651#include <unistd.h>
18652int
18653main ()
18654{
18655void *x=fdatasync
18656 ;
18657 return 0;
18658}
18659_ACEOF
18660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018661if { (ac_try="$ac_compile"
18662case "(($ac_try" in
18663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18664 *) ac_try_echo=$ac_try;;
18665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018669 grep -v '^ *+' conftest.er1 >conftest.err
18670 rm -f conftest.er1
18671 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018673 (exit $ac_status); } && {
18674 test -z "$ac_c_werror_flag" ||
18675 test ! -s conftest.err
18676 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018677
18678cat >>confdefs.h <<\_ACEOF
18679#define HAVE_FDATASYNC 1
18680_ACEOF
18681
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018682 { echo "$as_me:$LINENO: result: yes" >&5
18683echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018686sed 's/^/| /' conftest.$ac_ext >&5
18687
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018688 { echo "$as_me:$LINENO: result: no" >&5
18689echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018690
18691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692
18693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018694{ echo "$as_me:$LINENO: checking for epoll" >&5
18695echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018696cat >conftest.$ac_ext <<_ACEOF
18697/* confdefs.h. */
18698_ACEOF
18699cat confdefs.h >>conftest.$ac_ext
18700cat >>conftest.$ac_ext <<_ACEOF
18701/* end confdefs.h. */
18702#include <sys/epoll.h>
18703int
18704main ()
18705{
18706void *x=epoll_create
18707 ;
18708 return 0;
18709}
18710_ACEOF
18711rm -f conftest.$ac_objext
18712if { (ac_try="$ac_compile"
18713case "(($ac_try" in
18714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18715 *) ac_try_echo=$ac_try;;
18716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018718 (eval "$ac_compile") 2>conftest.er1
18719 ac_status=$?
18720 grep -v '^ *+' conftest.er1 >conftest.err
18721 rm -f conftest.er1
18722 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018724 (exit $ac_status); } && {
18725 test -z "$ac_c_werror_flag" ||
18726 test ! -s conftest.err
18727 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018728
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018729cat >>confdefs.h <<\_ACEOF
18730#define HAVE_EPOLL 1
18731_ACEOF
18732
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018733 { echo "$as_me:$LINENO: result: yes" >&5
18734echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018736 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018737sed 's/^/| /' conftest.$ac_ext >&5
18738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018739 { echo "$as_me:$LINENO: result: no" >&5
18740echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018741
18742fi
18743
18744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018745{ echo "$as_me:$LINENO: checking for kqueue" >&5
18746echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018747cat >conftest.$ac_ext <<_ACEOF
18748/* confdefs.h. */
18749_ACEOF
18750cat confdefs.h >>conftest.$ac_ext
18751cat >>conftest.$ac_ext <<_ACEOF
18752/* end confdefs.h. */
18753
18754#include <sys/types.h>
18755#include <sys/event.h>
18756
18757int
18758main ()
18759{
18760int x=kqueue()
18761 ;
18762 return 0;
18763}
18764_ACEOF
18765rm -f conftest.$ac_objext
18766if { (ac_try="$ac_compile"
18767case "(($ac_try" in
18768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18769 *) ac_try_echo=$ac_try;;
18770esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018772 (eval "$ac_compile") 2>conftest.er1
18773 ac_status=$?
18774 grep -v '^ *+' conftest.er1 >conftest.err
18775 rm -f conftest.er1
18776 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018778 (exit $ac_status); } && {
18779 test -z "$ac_c_werror_flag" ||
18780 test ! -s conftest.err
18781 } && test -s conftest.$ac_objext; then
18782
18783cat >>confdefs.h <<\_ACEOF
18784#define HAVE_KQUEUE 1
18785_ACEOF
18786
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018787 { echo "$as_me:$LINENO: result: yes" >&5
18788echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018790 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018791sed 's/^/| /' conftest.$ac_ext >&5
18792
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018793 { echo "$as_me:$LINENO: result: no" >&5
18794echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018795
18796fi
18797
18798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018799# On some systems (eg. FreeBSD 5), we would find a definition of the
18800# functions ctermid_r, setgroups in the library, but no prototype
18801# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18802# address to avoid compiler warnings and potential miscompilations
18803# because of the missing prototypes.
18804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018805{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18806echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018808/* confdefs.h. */
18809_ACEOF
18810cat confdefs.h >>conftest.$ac_ext
18811cat >>conftest.$ac_ext <<_ACEOF
18812/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018813
18814#include "confdefs.h"
18815#include <stdio.h>
18816
Martin v. Löwisd5843682002-11-21 20:41:28 +000018817int
18818main ()
18819{
18820void* p = ctermid_r
18821 ;
18822 return 0;
18823}
18824_ACEOF
18825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018826if { (ac_try="$ac_compile"
18827case "(($ac_try" in
18828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18829 *) ac_try_echo=$ac_try;;
18830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018834 grep -v '^ *+' conftest.er1 >conftest.err
18835 rm -f conftest.er1
18836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018838 (exit $ac_status); } && {
18839 test -z "$ac_c_werror_flag" ||
18840 test ! -s conftest.err
18841 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018842
18843cat >>confdefs.h <<\_ACEOF
18844#define HAVE_CTERMID_R 1
18845_ACEOF
18846
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018847 { echo "$as_me:$LINENO: result: yes" >&5
18848echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018851sed 's/^/| /' conftest.$ac_ext >&5
18852
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018853 { echo "$as_me:$LINENO: result: no" >&5
18854echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018855
18856fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018857
Martin v. Löwiseba40652007-08-30 20:10:57 +000018858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018860{ echo "$as_me:$LINENO: checking for flock" >&5
18861echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018863/* confdefs.h. */
18864_ACEOF
18865cat confdefs.h >>conftest.$ac_ext
18866cat >>conftest.$ac_ext <<_ACEOF
18867/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018868
18869#include "confdefs.h"
18870#include <sys/file.h>
18871
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018872int
18873main ()
18874{
18875void* p = flock
18876 ;
18877 return 0;
18878}
18879_ACEOF
18880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018881if { (ac_try="$ac_compile"
18882case "(($ac_try" in
18883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18884 *) ac_try_echo=$ac_try;;
18885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 grep -v '^ *+' conftest.er1 >conftest.err
18890 rm -f conftest.er1
18891 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018893 (exit $ac_status); } && {
18894 test -z "$ac_c_werror_flag" ||
18895 test ! -s conftest.err
18896 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018897
18898cat >>confdefs.h <<\_ACEOF
18899#define HAVE_FLOCK 1
18900_ACEOF
18901
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018902 { echo "$as_me:$LINENO: result: yes" >&5
18903echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018906sed 's/^/| /' conftest.$ac_ext >&5
18907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018908 { echo "$as_me:$LINENO: result: no" >&5
18909echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018910
18911fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018912
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018915{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18916echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018918/* confdefs.h. */
18919_ACEOF
18920cat confdefs.h >>conftest.$ac_ext
18921cat >>conftest.$ac_ext <<_ACEOF
18922/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018923
18924#include "confdefs.h"
18925#include <unistd.h>
18926
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018927int
18928main ()
18929{
18930void* p = getpagesize
18931 ;
18932 return 0;
18933}
18934_ACEOF
18935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936if { (ac_try="$ac_compile"
18937case "(($ac_try" in
18938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18939 *) ac_try_echo=$ac_try;;
18940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018944 grep -v '^ *+' conftest.er1 >conftest.err
18945 rm -f conftest.er1
18946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948 (exit $ac_status); } && {
18949 test -z "$ac_c_werror_flag" ||
18950 test ! -s conftest.err
18951 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018952
18953cat >>confdefs.h <<\_ACEOF
18954#define HAVE_GETPAGESIZE 1
18955_ACEOF
18956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018957 { echo "$as_me:$LINENO: result: yes" >&5
18958echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018961sed 's/^/| /' conftest.$ac_ext >&5
18962
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018963 { echo "$as_me:$LINENO: result: no" >&5
18964echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018965
18966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018967
18968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018969
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018970for ac_prog in true
18971do
18972 # Extract the first word of "$ac_prog", so it can be a program name with args.
18973set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018974{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18975echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018976if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018977 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018978else
18979 if test -n "$TRUE"; then
18980 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18981else
18982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18983for as_dir in $PATH
18984do
18985 IFS=$as_save_IFS
18986 test -z "$as_dir" && as_dir=.
18987 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018988 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 +000018989 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018991 break 2
18992 fi
18993done
18994done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018995IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018996
18997fi
18998fi
18999TRUE=$ac_cv_prog_TRUE
19000if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019001 { echo "$as_me:$LINENO: result: $TRUE" >&5
19002echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019004 { echo "$as_me:$LINENO: result: no" >&5
19005echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019006fi
19007
Martin v. Löwiseba40652007-08-30 20:10:57 +000019008
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019009 test -n "$TRUE" && break
19010done
19011test -n "$TRUE" || TRUE="/bin/true"
19012
19013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019014{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19015echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019016if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019018else
19019 ac_check_lib_save_LIBS=$LIBS
19020LIBS="-lc $LIBS"
19021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019022/* confdefs.h. */
19023_ACEOF
19024cat confdefs.h >>conftest.$ac_ext
19025cat >>conftest.$ac_ext <<_ACEOF
19026/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019027
Martin v. Löwiseba40652007-08-30 20:10:57 +000019028/* Override any GCC internal prototype to avoid an error.
19029 Use char because int might match the return type of a GCC
19030 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019031#ifdef __cplusplus
19032extern "C"
19033#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019034char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019035int
19036main ()
19037{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019039 ;
19040 return 0;
19041}
19042_ACEOF
19043rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019044if { (ac_try="$ac_link"
19045case "(($ac_try" in
19046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19047 *) ac_try_echo=$ac_try;;
19048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019050 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019052 grep -v '^ *+' conftest.er1 >conftest.err
19053 rm -f conftest.er1
19054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019056 (exit $ac_status); } && {
19057 test -z "$ac_c_werror_flag" ||
19058 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019059 } && test -s conftest$ac_exeext &&
19060 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019061 ac_cv_lib_c_inet_aton=yes
19062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019064sed 's/^/| /' conftest.$ac_ext >&5
19065
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068
19069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019071LIBS=$ac_check_lib_save_LIBS
19072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019073{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19074echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19075if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019076 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019077else
19078
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019079{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19080echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019081if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019082 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019083else
19084 ac_check_lib_save_LIBS=$LIBS
19085LIBS="-lresolv $LIBS"
19086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019087/* confdefs.h. */
19088_ACEOF
19089cat confdefs.h >>conftest.$ac_ext
19090cat >>conftest.$ac_ext <<_ACEOF
19091/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019092
Martin v. Löwiseba40652007-08-30 20:10:57 +000019093/* Override any GCC internal prototype to avoid an error.
19094 Use char because int might match the return type of a GCC
19095 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019096#ifdef __cplusplus
19097extern "C"
19098#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019099char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019100int
19101main ()
19102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019103return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019104 ;
19105 return 0;
19106}
19107_ACEOF
19108rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019109if { (ac_try="$ac_link"
19110case "(($ac_try" in
19111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19112 *) ac_try_echo=$ac_try;;
19113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019115 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019117 grep -v '^ *+' conftest.er1 >conftest.err
19118 rm -f conftest.er1
19119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019121 (exit $ac_status); } && {
19122 test -z "$ac_c_werror_flag" ||
19123 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019124 } && test -s conftest$ac_exeext &&
19125 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019126 ac_cv_lib_resolv_inet_aton=yes
19127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019129sed 's/^/| /' conftest.$ac_ext >&5
19130
Martin v. Löwiseba40652007-08-30 20:10:57 +000019131 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019133
19134rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019136LIBS=$ac_check_lib_save_LIBS
19137fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019138{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19139echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19140if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019141 cat >>confdefs.h <<_ACEOF
19142#define HAVE_LIBRESOLV 1
19143_ACEOF
19144
19145 LIBS="-lresolv $LIBS"
19146
19147fi
19148
19149
19150fi
19151
19152
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019153# On Tru64, chflags seems to be present, but calling it will
19154# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019155{ echo "$as_me:$LINENO: checking for chflags" >&5
19156echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019157if test "${ac_cv_have_chflags+set}" = set; then
19158 echo $ECHO_N "(cached) $ECHO_C" >&6
19159else
19160 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019161 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019162else
19163 cat >conftest.$ac_ext <<_ACEOF
19164/* confdefs.h. */
19165_ACEOF
19166cat confdefs.h >>conftest.$ac_ext
19167cat >>conftest.$ac_ext <<_ACEOF
19168/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019169[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019170#include <sys/stat.h>
19171#include <unistd.h>
19172int main(int argc, char*argv[])
19173{
19174 if(chflags(argv[0], 0) != 0)
19175 return 1;
19176 return 0;
19177}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019178]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019179_ACEOF
19180rm -f conftest$ac_exeext
19181if { (ac_try="$ac_link"
19182case "(($ac_try" in
19183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19184 *) ac_try_echo=$ac_try;;
19185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019187 (eval "$ac_link") 2>&5
19188 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019190 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19191 { (case "(($ac_try" in
19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19193 *) ac_try_echo=$ac_try;;
19194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019196 (eval "$ac_try") 2>&5
19197 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019199 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019200 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019201else
19202 echo "$as_me: program exited with status $ac_status" >&5
19203echo "$as_me: failed program was:" >&5
19204sed 's/^/| /' conftest.$ac_ext >&5
19205
19206( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019207ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019208fi
19209rm -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 +000019210fi
19211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019212
19213
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019214fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019215{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19216echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019217if test "$ac_cv_have_chflags" = cross ; then
19218 { echo "$as_me:$LINENO: checking for chflags" >&5
19219echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19220if test "${ac_cv_func_chflags+set}" = set; then
19221 echo $ECHO_N "(cached) $ECHO_C" >&6
19222else
19223 cat >conftest.$ac_ext <<_ACEOF
19224/* confdefs.h. */
19225_ACEOF
19226cat confdefs.h >>conftest.$ac_ext
19227cat >>conftest.$ac_ext <<_ACEOF
19228/* end confdefs.h. */
19229/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19230 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19231#define chflags innocuous_chflags
19232
19233/* System header to define __stub macros and hopefully few prototypes,
19234 which can conflict with char chflags (); below.
19235 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19236 <limits.h> exists even on freestanding compilers. */
19237
19238#ifdef __STDC__
19239# include <limits.h>
19240#else
19241# include <assert.h>
19242#endif
19243
19244#undef chflags
19245
19246/* Override any GCC internal prototype to avoid an error.
19247 Use char because int might match the return type of a GCC
19248 builtin and then its argument prototype would still apply. */
19249#ifdef __cplusplus
19250extern "C"
19251#endif
19252char chflags ();
19253/* The GNU C library defines this for functions which it implements
19254 to always fail with ENOSYS. Some functions are actually named
19255 something starting with __ and the normal name is an alias. */
19256#if defined __stub_chflags || defined __stub___chflags
19257choke me
19258#endif
19259
19260int
19261main ()
19262{
19263return chflags ();
19264 ;
19265 return 0;
19266}
19267_ACEOF
19268rm -f conftest.$ac_objext conftest$ac_exeext
19269if { (ac_try="$ac_link"
19270case "(($ac_try" in
19271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19272 *) ac_try_echo=$ac_try;;
19273esac
19274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19275 (eval "$ac_link") 2>conftest.er1
19276 ac_status=$?
19277 grep -v '^ *+' conftest.er1 >conftest.err
19278 rm -f conftest.er1
19279 cat conftest.err >&5
19280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19281 (exit $ac_status); } && {
19282 test -z "$ac_c_werror_flag" ||
19283 test ! -s conftest.err
19284 } && test -s conftest$ac_exeext &&
19285 $as_test_x conftest$ac_exeext; then
19286 ac_cv_func_chflags=yes
19287else
19288 echo "$as_me: failed program was:" >&5
19289sed 's/^/| /' conftest.$ac_ext >&5
19290
19291 ac_cv_func_chflags=no
19292fi
19293
19294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19295 conftest$ac_exeext conftest.$ac_ext
19296fi
19297{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19298echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19299if test $ac_cv_func_chflags = yes; then
19300 ac_cv_have_chflags="yes"
19301else
19302 ac_cv_have_chflags="no"
19303fi
19304
19305fi
19306if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019307
19308cat >>confdefs.h <<\_ACEOF
19309#define HAVE_CHFLAGS 1
19310_ACEOF
19311
19312fi
19313
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019314{ echo "$as_me:$LINENO: checking for lchflags" >&5
19315echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019316if test "${ac_cv_have_lchflags+set}" = set; then
19317 echo $ECHO_N "(cached) $ECHO_C" >&6
19318else
19319 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019320 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019321else
19322 cat >conftest.$ac_ext <<_ACEOF
19323/* confdefs.h. */
19324_ACEOF
19325cat confdefs.h >>conftest.$ac_ext
19326cat >>conftest.$ac_ext <<_ACEOF
19327/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019328[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019329#include <sys/stat.h>
19330#include <unistd.h>
19331int main(int argc, char*argv[])
19332{
19333 if(lchflags(argv[0], 0) != 0)
19334 return 1;
19335 return 0;
19336}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019337]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019338_ACEOF
19339rm -f conftest$ac_exeext
19340if { (ac_try="$ac_link"
19341case "(($ac_try" in
19342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19343 *) ac_try_echo=$ac_try;;
19344esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019346 (eval "$ac_link") 2>&5
19347 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19350 { (case "(($ac_try" in
19351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19352 *) ac_try_echo=$ac_try;;
19353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019355 (eval "$ac_try") 2>&5
19356 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019358 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019359 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019360else
19361 echo "$as_me: program exited with status $ac_status" >&5
19362echo "$as_me: failed program was:" >&5
19363sed 's/^/| /' conftest.$ac_ext >&5
19364
19365( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019366ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019367fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19369fi
19370
19371
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019372
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019373fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019374{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19375echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019376if test "$ac_cv_have_lchflags" = cross ; then
19377 { echo "$as_me:$LINENO: checking for lchflags" >&5
19378echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19379if test "${ac_cv_func_lchflags+set}" = set; then
19380 echo $ECHO_N "(cached) $ECHO_C" >&6
19381else
19382 cat >conftest.$ac_ext <<_ACEOF
19383/* confdefs.h. */
19384_ACEOF
19385cat confdefs.h >>conftest.$ac_ext
19386cat >>conftest.$ac_ext <<_ACEOF
19387/* end confdefs.h. */
19388/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19389 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19390#define lchflags innocuous_lchflags
19391
19392/* System header to define __stub macros and hopefully few prototypes,
19393 which can conflict with char lchflags (); below.
19394 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19395 <limits.h> exists even on freestanding compilers. */
19396
19397#ifdef __STDC__
19398# include <limits.h>
19399#else
19400# include <assert.h>
19401#endif
19402
19403#undef lchflags
19404
19405/* Override any GCC internal prototype to avoid an error.
19406 Use char because int might match the return type of a GCC
19407 builtin and then its argument prototype would still apply. */
19408#ifdef __cplusplus
19409extern "C"
19410#endif
19411char lchflags ();
19412/* The GNU C library defines this for functions which it implements
19413 to always fail with ENOSYS. Some functions are actually named
19414 something starting with __ and the normal name is an alias. */
19415#if defined __stub_lchflags || defined __stub___lchflags
19416choke me
19417#endif
19418
19419int
19420main ()
19421{
19422return lchflags ();
19423 ;
19424 return 0;
19425}
19426_ACEOF
19427rm -f conftest.$ac_objext conftest$ac_exeext
19428if { (ac_try="$ac_link"
19429case "(($ac_try" in
19430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19431 *) ac_try_echo=$ac_try;;
19432esac
19433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19434 (eval "$ac_link") 2>conftest.er1
19435 ac_status=$?
19436 grep -v '^ *+' conftest.er1 >conftest.err
19437 rm -f conftest.er1
19438 cat conftest.err >&5
19439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19440 (exit $ac_status); } && {
19441 test -z "$ac_c_werror_flag" ||
19442 test ! -s conftest.err
19443 } && test -s conftest$ac_exeext &&
19444 $as_test_x conftest$ac_exeext; then
19445 ac_cv_func_lchflags=yes
19446else
19447 echo "$as_me: failed program was:" >&5
19448sed 's/^/| /' conftest.$ac_ext >&5
19449
19450 ac_cv_func_lchflags=no
19451fi
19452
19453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19454 conftest$ac_exeext conftest.$ac_ext
19455fi
19456{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19457echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19458if test $ac_cv_func_lchflags = yes; then
19459 ac_cv_have_lchflags="yes"
19460else
19461 ac_cv_have_lchflags="no"
19462fi
19463
19464fi
19465if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019466
19467cat >>confdefs.h <<\_ACEOF
19468#define HAVE_LCHFLAGS 1
19469_ACEOF
19470
19471fi
19472
Ronald Oussorenf8752642006-07-06 10:13:35 +000019473case $ac_sys_system/$ac_sys_release in
19474Darwin/*)
19475 _CUR_CFLAGS="${CFLAGS}"
19476 _CUR_LDFLAGS="${LDFLAGS}"
19477 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19478 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19479 ;;
19480esac
19481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019482{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19483echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019484if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019485 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019486else
19487 ac_check_lib_save_LIBS=$LIBS
19488LIBS="-lz $LIBS"
19489cat >conftest.$ac_ext <<_ACEOF
19490/* confdefs.h. */
19491_ACEOF
19492cat confdefs.h >>conftest.$ac_ext
19493cat >>conftest.$ac_ext <<_ACEOF
19494/* end confdefs.h. */
19495
Martin v. Löwiseba40652007-08-30 20:10:57 +000019496/* Override any GCC internal prototype to avoid an error.
19497 Use char because int might match the return type of a GCC
19498 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019499#ifdef __cplusplus
19500extern "C"
19501#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019502char inflateCopy ();
19503int
19504main ()
19505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019506return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019507 ;
19508 return 0;
19509}
19510_ACEOF
19511rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019512if { (ac_try="$ac_link"
19513case "(($ac_try" in
19514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19515 *) ac_try_echo=$ac_try;;
19516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019519 ac_status=$?
19520 grep -v '^ *+' conftest.er1 >conftest.err
19521 rm -f conftest.er1
19522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524 (exit $ac_status); } && {
19525 test -z "$ac_c_werror_flag" ||
19526 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019527 } && test -s conftest$ac_exeext &&
19528 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019529 ac_cv_lib_z_inflateCopy=yes
19530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019531 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019532sed 's/^/| /' conftest.$ac_ext >&5
19533
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019536
19537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019538 conftest$ac_exeext conftest.$ac_ext
19539LIBS=$ac_check_lib_save_LIBS
19540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019541{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19542echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19543if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019544
19545cat >>confdefs.h <<\_ACEOF
19546#define HAVE_ZLIB_COPY 1
19547_ACEOF
19548
19549fi
19550
19551
Ronald Oussorenf8752642006-07-06 10:13:35 +000019552case $ac_sys_system/$ac_sys_release in
19553Darwin/*)
19554 CFLAGS="${_CUR_CFLAGS}"
19555 LDFLAGS="${_CUR_LDFLAGS}"
19556 ;;
19557esac
19558
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019559{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19560echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019562/* confdefs.h. */
19563_ACEOF
19564cat confdefs.h >>conftest.$ac_ext
19565cat >>conftest.$ac_ext <<_ACEOF
19566/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019567
19568#include "confdefs.h"
19569#include <netdb.h>
19570
Martin v. Löwise9416172003-05-03 10:12:45 +000019571int
19572main ()
19573{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019574void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019575 ;
19576 return 0;
19577}
19578_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019579rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019580if { (ac_try="$ac_link"
19581case "(($ac_try" in
19582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19583 *) ac_try_echo=$ac_try;;
19584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019586 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019588 grep -v '^ *+' conftest.er1 >conftest.err
19589 rm -f conftest.er1
19590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019592 (exit $ac_status); } && {
19593 test -z "$ac_c_werror_flag" ||
19594 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019595 } && test -s conftest$ac_exeext &&
19596 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019597
19598cat >>confdefs.h <<\_ACEOF
19599#define HAVE_HSTRERROR 1
19600_ACEOF
19601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019602 { echo "$as_me:$LINENO: result: yes" >&5
19603echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019606sed 's/^/| /' conftest.$ac_ext >&5
19607
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019608 { echo "$as_me:$LINENO: result: no" >&5
19609echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019610
19611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019612
19613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019616{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19617echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019619/* confdefs.h. */
19620_ACEOF
19621cat confdefs.h >>conftest.$ac_ext
19622cat >>conftest.$ac_ext <<_ACEOF
19623/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019624
19625#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019626#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019627#include <sys/socket.h>
19628#include <netinet/in.h>
19629#include <arpa/inet.h>
19630
Martin v. Löwise9416172003-05-03 10:12:45 +000019631int
19632main ()
19633{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019634void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019635 ;
19636 return 0;
19637}
19638_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019639rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640if { (ac_try="$ac_link"
19641case "(($ac_try" in
19642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19643 *) ac_try_echo=$ac_try;;
19644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019646 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019648 grep -v '^ *+' conftest.er1 >conftest.err
19649 rm -f conftest.er1
19650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019652 (exit $ac_status); } && {
19653 test -z "$ac_c_werror_flag" ||
19654 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019655 } && test -s conftest$ac_exeext &&
19656 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019657
19658cat >>confdefs.h <<\_ACEOF
19659#define HAVE_INET_ATON 1
19660_ACEOF
19661
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019662 { echo "$as_me:$LINENO: result: yes" >&5
19663echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019666sed 's/^/| /' conftest.$ac_ext >&5
19667
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019668 { echo "$as_me:$LINENO: result: no" >&5
19669echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019670
19671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019672
19673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019675
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019676{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19677echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019679/* confdefs.h. */
19680_ACEOF
19681cat confdefs.h >>conftest.$ac_ext
19682cat >>conftest.$ac_ext <<_ACEOF
19683/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019684
19685#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019686#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019687#include <sys/socket.h>
19688#include <netinet/in.h>
19689#include <arpa/inet.h>
19690
Martin v. Löwise9416172003-05-03 10:12:45 +000019691int
19692main ()
19693{
19694void* p = inet_pton
19695 ;
19696 return 0;
19697}
19698_ACEOF
19699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019700if { (ac_try="$ac_compile"
19701case "(($ac_try" in
19702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19703 *) ac_try_echo=$ac_try;;
19704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019708 grep -v '^ *+' conftest.er1 >conftest.err
19709 rm -f conftest.er1
19710 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019712 (exit $ac_status); } && {
19713 test -z "$ac_c_werror_flag" ||
19714 test ! -s conftest.err
19715 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019716
19717cat >>confdefs.h <<\_ACEOF
19718#define HAVE_INET_PTON 1
19719_ACEOF
19720
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019721 { echo "$as_me:$LINENO: result: yes" >&5
19722echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019725sed 's/^/| /' conftest.$ac_ext >&5
19726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019727 { echo "$as_me:$LINENO: result: no" >&5
19728echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019729
19730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019731
19732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019733
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019734# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019735{ echo "$as_me:$LINENO: checking for setgroups" >&5
19736echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019738/* confdefs.h. */
19739_ACEOF
19740cat confdefs.h >>conftest.$ac_ext
19741cat >>conftest.$ac_ext <<_ACEOF
19742/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019743
19744#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019745#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019746#ifdef HAVE_GRP_H
19747#include <grp.h>
19748#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019749
Martin v. Löwisd5843682002-11-21 20:41:28 +000019750int
19751main ()
19752{
19753void* p = setgroups
19754 ;
19755 return 0;
19756}
19757_ACEOF
19758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019759if { (ac_try="$ac_compile"
19760case "(($ac_try" in
19761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19762 *) ac_try_echo=$ac_try;;
19763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767 grep -v '^ *+' conftest.er1 >conftest.err
19768 rm -f conftest.er1
19769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019771 (exit $ac_status); } && {
19772 test -z "$ac_c_werror_flag" ||
19773 test ! -s conftest.err
19774 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019775
19776cat >>confdefs.h <<\_ACEOF
19777#define HAVE_SETGROUPS 1
19778_ACEOF
19779
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019780 { echo "$as_me:$LINENO: result: yes" >&5
19781echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019782else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019784sed 's/^/| /' conftest.$ac_ext >&5
19785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019786 { echo "$as_me:$LINENO: result: no" >&5
19787echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019788
19789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019790
19791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019792
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019793# check for openpty and forkpty
19794
Martin v. Löwis11437992002-04-12 09:54:03 +000019795
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019796for ac_func in openpty
19797do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019798as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19799{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19800echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019803else
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019805/* confdefs.h. */
19806_ACEOF
19807cat confdefs.h >>conftest.$ac_ext
19808cat >>conftest.$ac_ext <<_ACEOF
19809/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019810/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19811 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19812#define $ac_func innocuous_$ac_func
19813
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019814/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019815 which can conflict with char $ac_func (); below.
19816 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019817 <limits.h> exists even on freestanding compilers. */
19818
19819#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019820# include <limits.h>
19821#else
19822# include <assert.h>
19823#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019824
19825#undef $ac_func
19826
Martin v. Löwiseba40652007-08-30 20:10:57 +000019827/* Override any GCC internal prototype to avoid an error.
19828 Use char because int might match the return type of a GCC
19829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019830#ifdef __cplusplus
19831extern "C"
19832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019833char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019834/* The GNU C library defines this for functions which it implements
19835 to always fail with ENOSYS. Some functions are actually named
19836 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019837#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019838choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019839#endif
19840
Skip Montanaro6dead952003-09-25 14:50:04 +000019841int
19842main ()
19843{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019844return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 ;
19846 return 0;
19847}
19848_ACEOF
19849rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850if { (ac_try="$ac_link"
19851case "(($ac_try" in
19852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19853 *) ac_try_echo=$ac_try;;
19854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019856 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019858 grep -v '^ *+' conftest.er1 >conftest.err
19859 rm -f conftest.er1
19860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862 (exit $ac_status); } && {
19863 test -z "$ac_c_werror_flag" ||
19864 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019865 } && test -s conftest$ac_exeext &&
19866 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019867 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019870sed 's/^/| /' conftest.$ac_ext >&5
19871
Martin v. Löwiseba40652007-08-30 20:10:57 +000019872 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019874
19875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019876 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019877fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019878ac_res=`eval echo '${'$as_ac_var'}'`
19879 { echo "$as_me:$LINENO: result: $ac_res" >&5
19880echo "${ECHO_T}$ac_res" >&6; }
19881if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019882 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019883#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019884_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019885
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019886else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019887 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19888echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019889if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019890 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019891else
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019893LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019895/* confdefs.h. */
19896_ACEOF
19897cat confdefs.h >>conftest.$ac_ext
19898cat >>conftest.$ac_ext <<_ACEOF
19899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019900
Martin v. Löwiseba40652007-08-30 20:10:57 +000019901/* Override any GCC internal prototype to avoid an error.
19902 Use char because int might match the return type of a GCC
19903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019904#ifdef __cplusplus
19905extern "C"
19906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019907char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019908int
19909main ()
19910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019911return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019912 ;
19913 return 0;
19914}
19915_ACEOF
19916rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917if { (ac_try="$ac_link"
19918case "(($ac_try" in
19919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19920 *) ac_try_echo=$ac_try;;
19921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019923 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019925 grep -v '^ *+' conftest.er1 >conftest.err
19926 rm -f conftest.er1
19927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929 (exit $ac_status); } && {
19930 test -z "$ac_c_werror_flag" ||
19931 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019932 } && test -s conftest$ac_exeext &&
19933 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019934 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019935else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019937sed 's/^/| /' conftest.$ac_ext >&5
19938
Martin v. Löwiseba40652007-08-30 20:10:57 +000019939 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019941
19942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019944LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019946{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19947echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19948if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019949 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019950#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019951_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019952 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019954 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19955echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019956if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019957 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019958else
19959 ac_check_lib_save_LIBS=$LIBS
19960LIBS="-lbsd $LIBS"
19961cat >conftest.$ac_ext <<_ACEOF
19962/* confdefs.h. */
19963_ACEOF
19964cat confdefs.h >>conftest.$ac_ext
19965cat >>conftest.$ac_ext <<_ACEOF
19966/* end confdefs.h. */
19967
Martin v. Löwiseba40652007-08-30 20:10:57 +000019968/* Override any GCC internal prototype to avoid an error.
19969 Use char because int might match the return type of a GCC
19970 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019971#ifdef __cplusplus
19972extern "C"
19973#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019974char openpty ();
19975int
19976main ()
19977{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019978return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019979 ;
19980 return 0;
19981}
19982_ACEOF
19983rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984if { (ac_try="$ac_link"
19985case "(($ac_try" in
19986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19987 *) ac_try_echo=$ac_try;;
19988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019990 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019991 ac_status=$?
19992 grep -v '^ *+' conftest.er1 >conftest.err
19993 rm -f conftest.er1
19994 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019996 (exit $ac_status); } && {
19997 test -z "$ac_c_werror_flag" ||
19998 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019999 } && test -s conftest$ac_exeext &&
20000 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020001 ac_cv_lib_bsd_openpty=yes
20002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020003 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020004sed 's/^/| /' conftest.$ac_ext >&5
20005
Martin v. Löwiseba40652007-08-30 20:10:57 +000020006 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020008
20009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020010 conftest$ac_exeext conftest.$ac_ext
20011LIBS=$ac_check_lib_save_LIBS
20012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020013{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20014echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20015if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020016 cat >>confdefs.h <<\_ACEOF
20017#define HAVE_OPENPTY 1
20018_ACEOF
20019 LIBS="$LIBS -lbsd"
20020fi
20021
20022
20023fi
20024
Fred Drake8cef4cf2000-06-28 16:40:38 +000020025
20026fi
20027done
20028
Martin v. Löwis11437992002-04-12 09:54:03 +000020029
Fred Drake8cef4cf2000-06-28 16:40:38 +000020030for ac_func in forkpty
20031do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020032as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20033{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20034echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020036 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020037else
Martin v. Löwis11437992002-04-12 09:54:03 +000020038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020039/* confdefs.h. */
20040_ACEOF
20041cat confdefs.h >>conftest.$ac_ext
20042cat >>conftest.$ac_ext <<_ACEOF
20043/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020044/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20046#define $ac_func innocuous_$ac_func
20047
Fred Drake8cef4cf2000-06-28 16:40:38 +000020048/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020049 which can conflict with char $ac_func (); below.
20050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020051 <limits.h> exists even on freestanding compilers. */
20052
20053#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020054# include <limits.h>
20055#else
20056# include <assert.h>
20057#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020058
20059#undef $ac_func
20060
Martin v. Löwiseba40652007-08-30 20:10:57 +000020061/* Override any GCC internal prototype to avoid an error.
20062 Use char because int might match the return type of a GCC
20063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020064#ifdef __cplusplus
20065extern "C"
20066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020067char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020068/* The GNU C library defines this for functions which it implements
20069 to always fail with ENOSYS. Some functions are actually named
20070 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020071#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020072choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020073#endif
20074
Skip Montanaro6dead952003-09-25 14:50:04 +000020075int
20076main ()
20077{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020078return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020079 ;
20080 return 0;
20081}
20082_ACEOF
20083rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084if { (ac_try="$ac_link"
20085case "(($ac_try" in
20086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087 *) ac_try_echo=$ac_try;;
20088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020092 grep -v '^ *+' conftest.er1 >conftest.err
20093 rm -f conftest.er1
20094 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020096 (exit $ac_status); } && {
20097 test -z "$ac_c_werror_flag" ||
20098 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020099 } && test -s conftest$ac_exeext &&
20100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020101 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020104sed 's/^/| /' conftest.$ac_ext >&5
20105
Martin v. Löwiseba40652007-08-30 20:10:57 +000020106 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020108
20109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020110 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020111fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020112ac_res=`eval echo '${'$as_ac_var'}'`
20113 { echo "$as_me:$LINENO: result: $ac_res" >&5
20114echo "${ECHO_T}$ac_res" >&6; }
20115if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020116 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020118_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020119
Fred Drake8cef4cf2000-06-28 16:40:38 +000020120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020121 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20122echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020123if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020124 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020125else
Martin v. Löwis11437992002-04-12 09:54:03 +000020126 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020127LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020129/* confdefs.h. */
20130_ACEOF
20131cat confdefs.h >>conftest.$ac_ext
20132cat >>conftest.$ac_ext <<_ACEOF
20133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020134
Martin v. Löwiseba40652007-08-30 20:10:57 +000020135/* Override any GCC internal prototype to avoid an error.
20136 Use char because int might match the return type of a GCC
20137 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020138#ifdef __cplusplus
20139extern "C"
20140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020141char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020142int
20143main ()
20144{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020145return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 ;
20147 return 0;
20148}
20149_ACEOF
20150rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151if { (ac_try="$ac_link"
20152case "(($ac_try" in
20153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20154 *) ac_try_echo=$ac_try;;
20155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020157 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020159 grep -v '^ *+' conftest.er1 >conftest.err
20160 rm -f conftest.er1
20161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020163 (exit $ac_status); } && {
20164 test -z "$ac_c_werror_flag" ||
20165 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020166 } && test -s conftest$ac_exeext &&
20167 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020171sed 's/^/| /' conftest.$ac_ext >&5
20172
Martin v. Löwiseba40652007-08-30 20:10:57 +000020173 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020175
20176rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020178LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020179fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020180{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20181echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20182if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020183 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020184#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020185_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020186 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020188 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20189echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020190if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020191 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020192else
20193 ac_check_lib_save_LIBS=$LIBS
20194LIBS="-lbsd $LIBS"
20195cat >conftest.$ac_ext <<_ACEOF
20196/* confdefs.h. */
20197_ACEOF
20198cat confdefs.h >>conftest.$ac_ext
20199cat >>conftest.$ac_ext <<_ACEOF
20200/* end confdefs.h. */
20201
Martin v. Löwiseba40652007-08-30 20:10:57 +000020202/* Override any GCC internal prototype to avoid an error.
20203 Use char because int might match the return type of a GCC
20204 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020205#ifdef __cplusplus
20206extern "C"
20207#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020208char forkpty ();
20209int
20210main ()
20211{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020213 ;
20214 return 0;
20215}
20216_ACEOF
20217rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020218if { (ac_try="$ac_link"
20219case "(($ac_try" in
20220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20221 *) ac_try_echo=$ac_try;;
20222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020225 ac_status=$?
20226 grep -v '^ *+' conftest.er1 >conftest.err
20227 rm -f conftest.er1
20228 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020230 (exit $ac_status); } && {
20231 test -z "$ac_c_werror_flag" ||
20232 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020233 } && test -s conftest$ac_exeext &&
20234 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020235 ac_cv_lib_bsd_forkpty=yes
20236else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020237 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020238sed 's/^/| /' conftest.$ac_ext >&5
20239
Martin v. Löwiseba40652007-08-30 20:10:57 +000020240 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242
20243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020244 conftest$ac_exeext conftest.$ac_ext
20245LIBS=$ac_check_lib_save_LIBS
20246fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020247{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20248echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20249if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020250 cat >>confdefs.h <<\_ACEOF
20251#define HAVE_FORKPTY 1
20252_ACEOF
20253 LIBS="$LIBS -lbsd"
20254fi
20255
20256
20257fi
20258
Fred Drake8cef4cf2000-06-28 16:40:38 +000020259
20260fi
20261done
20262
Jack Jansendd19cf82001-12-06 22:36:17 +000020263
Brett Cannonaa5778d2008-03-18 04:09:00 +000020264# Stuff for expat.
20265
20266for ac_func in memmove
20267do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020268as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20269{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20270echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020271if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020272 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020273else
20274 cat >conftest.$ac_ext <<_ACEOF
20275/* confdefs.h. */
20276_ACEOF
20277cat confdefs.h >>conftest.$ac_ext
20278cat >>conftest.$ac_ext <<_ACEOF
20279/* end confdefs.h. */
20280/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20281 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20282#define $ac_func innocuous_$ac_func
20283
20284/* System header to define __stub macros and hopefully few prototypes,
20285 which can conflict with char $ac_func (); below.
20286 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20287 <limits.h> exists even on freestanding compilers. */
20288
20289#ifdef __STDC__
20290# include <limits.h>
20291#else
20292# include <assert.h>
20293#endif
20294
20295#undef $ac_func
20296
20297/* Override any GCC internal prototype to avoid an error.
20298 Use char because int might match the return type of a GCC
20299 builtin and then its argument prototype would still apply. */
20300#ifdef __cplusplus
20301extern "C"
20302#endif
20303char $ac_func ();
20304/* The GNU C library defines this for functions which it implements
20305 to always fail with ENOSYS. Some functions are actually named
20306 something starting with __ and the normal name is an alias. */
20307#if defined __stub_$ac_func || defined __stub___$ac_func
20308choke me
20309#endif
20310
20311int
20312main ()
20313{
20314return $ac_func ();
20315 ;
20316 return 0;
20317}
20318_ACEOF
20319rm -f conftest.$ac_objext conftest$ac_exeext
20320if { (ac_try="$ac_link"
20321case "(($ac_try" in
20322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20323 *) ac_try_echo=$ac_try;;
20324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020326 (eval "$ac_link") 2>conftest.er1
20327 ac_status=$?
20328 grep -v '^ *+' conftest.er1 >conftest.err
20329 rm -f conftest.er1
20330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020332 (exit $ac_status); } && {
20333 test -z "$ac_c_werror_flag" ||
20334 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020335 } && test -s conftest$ac_exeext &&
20336 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020337 eval "$as_ac_var=yes"
20338else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020339 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020340sed 's/^/| /' conftest.$ac_ext >&5
20341
20342 eval "$as_ac_var=no"
20343fi
20344
20345rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20346 conftest$ac_exeext conftest.$ac_ext
20347fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020348ac_res=`eval echo '${'$as_ac_var'}'`
20349 { echo "$as_me:$LINENO: result: $ac_res" >&5
20350echo "${ECHO_T}$ac_res" >&6; }
20351if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020352 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020353#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020354_ACEOF
20355
20356fi
20357done
20358
20359
Michael W. Hudson54241132001-12-07 15:38:26 +000020360# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020361
20362
20363
20364
20365
20366
Fred Drake8cef4cf2000-06-28 16:40:38 +000020367for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20368do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020369as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20370{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20371echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020372if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020373 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020374else
Martin v. Löwis11437992002-04-12 09:54:03 +000020375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020376/* confdefs.h. */
20377_ACEOF
20378cat confdefs.h >>conftest.$ac_ext
20379cat >>conftest.$ac_ext <<_ACEOF
20380/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020381/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20382 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20383#define $ac_func innocuous_$ac_func
20384
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020385/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020386 which can conflict with char $ac_func (); below.
20387 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020388 <limits.h> exists even on freestanding compilers. */
20389
20390#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020391# include <limits.h>
20392#else
20393# include <assert.h>
20394#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020395
20396#undef $ac_func
20397
Martin v. Löwiseba40652007-08-30 20:10:57 +000020398/* Override any GCC internal prototype to avoid an error.
20399 Use char because int might match the return type of a GCC
20400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020401#ifdef __cplusplus
20402extern "C"
20403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020404char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020405/* The GNU C library defines this for functions which it implements
20406 to always fail with ENOSYS. Some functions are actually named
20407 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020408#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020409choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020410#endif
20411
Skip Montanaro6dead952003-09-25 14:50:04 +000020412int
20413main ()
20414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020415return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020416 ;
20417 return 0;
20418}
20419_ACEOF
20420rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020421if { (ac_try="$ac_link"
20422case "(($ac_try" in
20423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20424 *) ac_try_echo=$ac_try;;
20425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020427 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020429 grep -v '^ *+' conftest.er1 >conftest.err
20430 rm -f conftest.er1
20431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020433 (exit $ac_status); } && {
20434 test -z "$ac_c_werror_flag" ||
20435 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020436 } && test -s conftest$ac_exeext &&
20437 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020438 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020441sed 's/^/| /' conftest.$ac_ext >&5
20442
Martin v. Löwiseba40652007-08-30 20:10:57 +000020443 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445
20446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020447 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020448fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020449ac_res=`eval echo '${'$as_ac_var'}'`
20450 { echo "$as_me:$LINENO: result: $ac_res" >&5
20451echo "${ECHO_T}$ac_res" >&6; }
20452if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020453 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020454#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020455_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020456
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020457fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020458done
20459
Michael W. Hudson54241132001-12-07 15:38:26 +000020460
Martin v. Löwis11437992002-04-12 09:54:03 +000020461
20462
20463
Brett Cannonaa5778d2008-03-18 04:09:00 +000020464for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020465do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020466as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20467{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20468echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020469if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020470 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020471else
Martin v. Löwis11437992002-04-12 09:54:03 +000020472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020473/* confdefs.h. */
20474_ACEOF
20475cat confdefs.h >>conftest.$ac_ext
20476cat >>conftest.$ac_ext <<_ACEOF
20477/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020478/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20479 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20480#define $ac_func innocuous_$ac_func
20481
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020482/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020483 which can conflict with char $ac_func (); below.
20484 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020485 <limits.h> exists even on freestanding compilers. */
20486
20487#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020488# include <limits.h>
20489#else
20490# include <assert.h>
20491#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020492
20493#undef $ac_func
20494
Martin v. Löwiseba40652007-08-30 20:10:57 +000020495/* Override any GCC internal prototype to avoid an error.
20496 Use char because int might match the return type of a GCC
20497 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020498#ifdef __cplusplus
20499extern "C"
20500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020501char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020502/* The GNU C library defines this for functions which it implements
20503 to always fail with ENOSYS. Some functions are actually named
20504 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020505#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020506choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020507#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020508
Skip Montanaro6dead952003-09-25 14:50:04 +000020509int
20510main ()
20511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020512return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020513 ;
20514 return 0;
20515}
20516_ACEOF
20517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020518if { (ac_try="$ac_link"
20519case "(($ac_try" in
20520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20521 *) ac_try_echo=$ac_try;;
20522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020526 grep -v '^ *+' conftest.er1 >conftest.err
20527 rm -f conftest.er1
20528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530 (exit $ac_status); } && {
20531 test -z "$ac_c_werror_flag" ||
20532 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020533 } && test -s conftest$ac_exeext &&
20534 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020535 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020536else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020538sed 's/^/| /' conftest.$ac_ext >&5
20539
Martin v. Löwiseba40652007-08-30 20:10:57 +000020540 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542
20543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020545fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020546ac_res=`eval echo '${'$as_ac_var'}'`
20547 { echo "$as_me:$LINENO: result: $ac_res" >&5
20548echo "${ECHO_T}$ac_res" >&6; }
20549if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020550 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020551#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020552_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020553
Martin v. Löwis1142de32002-03-29 16:28:31 +000020554else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020555 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020556 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020557 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20558 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020559esac
20560
Martin v. Löwis1142de32002-03-29 16:28:31 +000020561fi
20562done
20563
20564
Martin v. Löwis11437992002-04-12 09:54:03 +000020565
Martin v. Löwis1142de32002-03-29 16:28:31 +000020566for ac_func in getpgrp
20567do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20569{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020572 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020573else
Martin v. Löwis11437992002-04-12 09:54:03 +000020574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020575/* confdefs.h. */
20576_ACEOF
20577cat confdefs.h >>conftest.$ac_ext
20578cat >>conftest.$ac_ext <<_ACEOF
20579/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020580/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20581 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20582#define $ac_func innocuous_$ac_func
20583
Martin v. Löwis1142de32002-03-29 16:28:31 +000020584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020585 which can conflict with char $ac_func (); below.
20586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020587 <limits.h> exists even on freestanding compilers. */
20588
20589#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020590# include <limits.h>
20591#else
20592# include <assert.h>
20593#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020594
20595#undef $ac_func
20596
Martin v. Löwiseba40652007-08-30 20:10:57 +000020597/* Override any GCC internal prototype to avoid an error.
20598 Use char because int might match the return type of a GCC
20599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020600#ifdef __cplusplus
20601extern "C"
20602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020603char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020604/* The GNU C library defines this for functions which it implements
20605 to always fail with ENOSYS. Some functions are actually named
20606 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020607#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020608choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020609#endif
20610
Skip Montanaro6dead952003-09-25 14:50:04 +000020611int
20612main ()
20613{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020614return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 ;
20616 return 0;
20617}
20618_ACEOF
20619rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620if { (ac_try="$ac_link"
20621case "(($ac_try" in
20622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20623 *) ac_try_echo=$ac_try;;
20624esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020628 grep -v '^ *+' conftest.er1 >conftest.err
20629 rm -f conftest.er1
20630 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020632 (exit $ac_status); } && {
20633 test -z "$ac_c_werror_flag" ||
20634 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020635 } && test -s conftest$ac_exeext &&
20636 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020637 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020640sed 's/^/| /' conftest.$ac_ext >&5
20641
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644
20645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020647fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020648ac_res=`eval echo '${'$as_ac_var'}'`
20649 { echo "$as_me:$LINENO: result: $ac_res" >&5
20650echo "${ECHO_T}$ac_res" >&6; }
20651if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020654_ACEOF
20655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020656/* confdefs.h. */
20657_ACEOF
20658cat confdefs.h >>conftest.$ac_ext
20659cat >>conftest.$ac_ext <<_ACEOF
20660/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020661#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020662int
20663main ()
20664{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020665getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020666 ;
20667 return 0;
20668}
20669_ACEOF
20670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020671if { (ac_try="$ac_compile"
20672case "(($ac_try" in
20673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20674 *) ac_try_echo=$ac_try;;
20675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020679 grep -v '^ *+' conftest.er1 >conftest.err
20680 rm -f conftest.er1
20681 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020683 (exit $ac_status); } && {
20684 test -z "$ac_c_werror_flag" ||
20685 test ! -s conftest.err
20686 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020687
20688cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020689#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020690_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020691
Martin v. Löwis11437992002-04-12 09:54:03 +000020692
Guido van Rossumf78abae1997-01-21 22:02:36 +000020693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020695sed 's/^/| /' conftest.$ac_ext >&5
20696
Martin v. Löwiseba40652007-08-30 20:10:57 +000020697
Guido van Rossum627b2d71993-12-24 10:39:16 +000020698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699
20700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020701
Guido van Rossum627b2d71993-12-24 10:39:16 +000020702fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020703done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020704
Jack Jansen150753c2003-03-29 22:07:47 +000020705
20706for ac_func in setpgrp
20707do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020708as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20709{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20710echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020712 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020713else
Martin v. Löwis11437992002-04-12 09:54:03 +000020714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020715/* confdefs.h. */
20716_ACEOF
20717cat confdefs.h >>conftest.$ac_ext
20718cat >>conftest.$ac_ext <<_ACEOF
20719/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020720/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20721 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20722#define $ac_func innocuous_$ac_func
20723
Jack Jansen150753c2003-03-29 22:07:47 +000020724/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020725 which can conflict with char $ac_func (); below.
20726 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020727 <limits.h> exists even on freestanding compilers. */
20728
20729#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020730# include <limits.h>
20731#else
20732# include <assert.h>
20733#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020734
20735#undef $ac_func
20736
Martin v. Löwiseba40652007-08-30 20:10:57 +000020737/* Override any GCC internal prototype to avoid an error.
20738 Use char because int might match the return type of a GCC
20739 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020740#ifdef __cplusplus
20741extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020742#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020743char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020744/* The GNU C library defines this for functions which it implements
20745 to always fail with ENOSYS. Some functions are actually named
20746 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020748choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020749#endif
20750
Skip Montanaro6dead952003-09-25 14:50:04 +000020751int
20752main ()
20753{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020754return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020755 ;
20756 return 0;
20757}
20758_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020759rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020760if { (ac_try="$ac_link"
20761case "(($ac_try" in
20762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20763 *) ac_try_echo=$ac_try;;
20764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020766 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020768 grep -v '^ *+' conftest.er1 >conftest.err
20769 rm -f conftest.er1
20770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020772 (exit $ac_status); } && {
20773 test -z "$ac_c_werror_flag" ||
20774 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020775 } && test -s conftest$ac_exeext &&
20776 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020777 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020780sed 's/^/| /' conftest.$ac_ext >&5
20781
Martin v. Löwiseba40652007-08-30 20:10:57 +000020782 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020784
20785rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020786 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020788ac_res=`eval echo '${'$as_ac_var'}'`
20789 { echo "$as_me:$LINENO: result: $ac_res" >&5
20790echo "${ECHO_T}$ac_res" >&6; }
20791if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020792 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020793#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020794_ACEOF
20795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020796/* confdefs.h. */
20797_ACEOF
20798cat confdefs.h >>conftest.$ac_ext
20799cat >>conftest.$ac_ext <<_ACEOF
20800/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020801#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020802int
20803main ()
20804{
20805setpgrp(0,0);
20806 ;
20807 return 0;
20808}
20809_ACEOF
20810rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020811if { (ac_try="$ac_compile"
20812case "(($ac_try" in
20813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20814 *) ac_try_echo=$ac_try;;
20815esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020819 grep -v '^ *+' conftest.er1 >conftest.err
20820 rm -f conftest.er1
20821 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020823 (exit $ac_status); } && {
20824 test -z "$ac_c_werror_flag" ||
20825 test ! -s conftest.err
20826 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020827
20828cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020829#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020830_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020831
Jack Jansen150753c2003-03-29 22:07:47 +000020832
20833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020835sed 's/^/| /' conftest.$ac_ext >&5
20836
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839
20840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020841
20842fi
20843done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020844
Martin v. Löwis11437992002-04-12 09:54:03 +000020845
Thomas Wouters3a584202000-08-05 23:28:51 +000020846for ac_func in gettimeofday
20847do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020848as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20849{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20850echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020851if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020853else
Martin v. Löwis11437992002-04-12 09:54:03 +000020854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020855/* confdefs.h. */
20856_ACEOF
20857cat confdefs.h >>conftest.$ac_ext
20858cat >>conftest.$ac_ext <<_ACEOF
20859/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020860/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20862#define $ac_func innocuous_$ac_func
20863
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020864/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020865 which can conflict with char $ac_func (); below.
20866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020867 <limits.h> exists even on freestanding compilers. */
20868
20869#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020870# include <limits.h>
20871#else
20872# include <assert.h>
20873#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020874
20875#undef $ac_func
20876
Martin v. Löwiseba40652007-08-30 20:10:57 +000020877/* Override any GCC internal prototype to avoid an error.
20878 Use char because int might match the return type of a GCC
20879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020880#ifdef __cplusplus
20881extern "C"
20882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020883char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884/* The GNU C library defines this for functions which it implements
20885 to always fail with ENOSYS. Some functions are actually named
20886 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020887#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020888choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020889#endif
20890
Skip Montanaro6dead952003-09-25 14:50:04 +000020891int
20892main ()
20893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020895 ;
20896 return 0;
20897}
20898_ACEOF
20899rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020900if { (ac_try="$ac_link"
20901case "(($ac_try" in
20902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20903 *) ac_try_echo=$ac_try;;
20904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020908 grep -v '^ *+' conftest.er1 >conftest.err
20909 rm -f conftest.er1
20910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020912 (exit $ac_status); } && {
20913 test -z "$ac_c_werror_flag" ||
20914 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020915 } && test -s conftest$ac_exeext &&
20916 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020920sed 's/^/| /' conftest.$ac_ext >&5
20921
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020924
20925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020926 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020927fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020928ac_res=`eval echo '${'$as_ac_var'}'`
20929 { echo "$as_me:$LINENO: result: $ac_res" >&5
20930echo "${ECHO_T}$ac_res" >&6; }
20931if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020932 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020933#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020934_ACEOF
20935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020936/* confdefs.h. */
20937_ACEOF
20938cat confdefs.h >>conftest.$ac_ext
20939cat >>conftest.$ac_ext <<_ACEOF
20940/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020941#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020942int
20943main ()
20944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020945gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 ;
20947 return 0;
20948}
20949_ACEOF
20950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020951if { (ac_try="$ac_compile"
20952case "(($ac_try" in
20953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20954 *) ac_try_echo=$ac_try;;
20955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020959 grep -v '^ *+' conftest.er1 >conftest.err
20960 rm -f conftest.er1
20961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020963 (exit $ac_status); } && {
20964 test -z "$ac_c_werror_flag" ||
20965 test ! -s conftest.err
20966 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020967 :
20968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020970sed 's/^/| /' conftest.$ac_ext >&5
20971
Martin v. Löwis11437992002-04-12 09:54:03 +000020972
20973cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020974#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020975_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020976
Martin v. Löwis11437992002-04-12 09:54:03 +000020977
Guido van Rossum627b2d71993-12-24 10:39:16 +000020978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020979
20980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020981
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020982fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020983done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020984
Michael W. Hudson54241132001-12-07 15:38:26 +000020985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020986{ echo "$as_me:$LINENO: checking for major" >&5
20987echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020989/* confdefs.h. */
20990_ACEOF
20991cat confdefs.h >>conftest.$ac_ext
20992cat >>conftest.$ac_ext <<_ACEOF
20993/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020994
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020995#if defined(MAJOR_IN_MKDEV)
20996#include <sys/mkdev.h>
20997#elif defined(MAJOR_IN_SYSMACROS)
20998#include <sys/sysmacros.h>
20999#else
21000#include <sys/types.h>
21001#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021002
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021003int
21004main ()
21005{
21006
21007 makedev(major(0),minor(0));
21008
21009 ;
21010 return 0;
21011}
21012_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021013rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021014if { (ac_try="$ac_link"
21015case "(($ac_try" in
21016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21017 *) ac_try_echo=$ac_try;;
21018esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021022 grep -v '^ *+' conftest.er1 >conftest.err
21023 rm -f conftest.er1
21024 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021026 (exit $ac_status); } && {
21027 test -z "$ac_c_werror_flag" ||
21028 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021029 } && test -s conftest$ac_exeext &&
21030 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021031
21032
21033cat >>confdefs.h <<\_ACEOF
21034#define HAVE_DEVICE_MACROS 1
21035_ACEOF
21036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021037 { echo "$as_me:$LINENO: result: yes" >&5
21038echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021039
21040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021042sed 's/^/| /' conftest.$ac_ext >&5
21043
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021045 { echo "$as_me:$LINENO: result: no" >&5
21046echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021047
21048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021049
21050rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021051 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021052
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021053# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021054# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021055{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21056echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021058/* confdefs.h. */
21059_ACEOF
21060cat confdefs.h >>conftest.$ac_ext
21061cat >>conftest.$ac_ext <<_ACEOF
21062/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021063
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021064#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021065#include <sys/socket.h>
21066#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021067#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021068
Martin v. Löwis11437992002-04-12 09:54:03 +000021069int
21070main ()
21071{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021072getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021073 ;
21074 return 0;
21075}
21076_ACEOF
21077rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021078if { (ac_try="$ac_link"
21079case "(($ac_try" in
21080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21081 *) ac_try_echo=$ac_try;;
21082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021084 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021086 grep -v '^ *+' conftest.er1 >conftest.err
21087 rm -f conftest.er1
21088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021090 (exit $ac_status); } && {
21091 test -z "$ac_c_werror_flag" ||
21092 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021093 } && test -s conftest$ac_exeext &&
21094 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021095 have_getaddrinfo=yes
21096else
21097 echo "$as_me: failed program was:" >&5
21098sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021099
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021100 have_getaddrinfo=no
21101fi
21102
21103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21104 conftest$ac_exeext conftest.$ac_ext
21105{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21106echo "${ECHO_T}$have_getaddrinfo" >&6; }
21107if test $have_getaddrinfo = yes
21108then
21109 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021110echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021111 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21112 echo $ECHO_N "(cached) $ECHO_C" >&6
21113else
21114 if test "$cross_compiling" = yes; then
21115 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021116else
Martin v. Löwis11437992002-04-12 09:54:03 +000021117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021118/* confdefs.h. */
21119_ACEOF
21120cat confdefs.h >>conftest.$ac_ext
21121cat >>conftest.$ac_ext <<_ACEOF
21122/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021123
21124#include <sys/types.h>
21125#include <netdb.h>
21126#include <string.h>
21127#include <sys/socket.h>
21128#include <netinet/in.h>
21129
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021130int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021131{
21132 int passive, gaierr, inet4 = 0, inet6 = 0;
21133 struct addrinfo hints, *ai, *aitop;
21134 char straddr[INET6_ADDRSTRLEN], strport[16];
21135
21136 for (passive = 0; passive <= 1; passive++) {
21137 memset(&hints, 0, sizeof(hints));
21138 hints.ai_family = AF_UNSPEC;
21139 hints.ai_flags = passive ? AI_PASSIVE : 0;
21140 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021141 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021142 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21143 (void)gai_strerror(gaierr);
21144 goto bad;
21145 }
21146 for (ai = aitop; ai; ai = ai->ai_next) {
21147 if (ai->ai_addr == NULL ||
21148 ai->ai_addrlen == 0 ||
21149 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21150 straddr, sizeof(straddr), strport, sizeof(strport),
21151 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21152 goto bad;
21153 }
21154 switch (ai->ai_family) {
21155 case AF_INET:
21156 if (strcmp(strport, "54321") != 0) {
21157 goto bad;
21158 }
21159 if (passive) {
21160 if (strcmp(straddr, "0.0.0.0") != 0) {
21161 goto bad;
21162 }
21163 } else {
21164 if (strcmp(straddr, "127.0.0.1") != 0) {
21165 goto bad;
21166 }
21167 }
21168 inet4++;
21169 break;
21170 case AF_INET6:
21171 if (strcmp(strport, "54321") != 0) {
21172 goto bad;
21173 }
21174 if (passive) {
21175 if (strcmp(straddr, "::") != 0) {
21176 goto bad;
21177 }
21178 } else {
21179 if (strcmp(straddr, "::1") != 0) {
21180 goto bad;
21181 }
21182 }
21183 inet6++;
21184 break;
21185 case AF_UNSPEC:
21186 goto bad;
21187 break;
21188 default:
21189 /* another family support? */
21190 break;
21191 }
21192 }
21193 }
21194
21195 if (!(inet4 == 0 || inet4 == 2))
21196 goto bad;
21197 if (!(inet6 == 0 || inet6 == 2))
21198 goto bad;
21199
21200 if (aitop)
21201 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021202 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021203
21204 bad:
21205 if (aitop)
21206 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021207 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021208}
21209
Martin v. Löwis11437992002-04-12 09:54:03 +000021210_ACEOF
21211rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021212if { (ac_try="$ac_link"
21213case "(($ac_try" in
21214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21215 *) ac_try_echo=$ac_try;;
21216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021218 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021219 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222 { (case "(($ac_try" in
21223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21224 *) ac_try_echo=$ac_try;;
21225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021231 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021233 echo "$as_me: program exited with status $ac_status" >&5
21234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021235sed 's/^/| /' conftest.$ac_ext >&5
21236
Martin v. Löwis11437992002-04-12 09:54:03 +000021237( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021238ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021240rm -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 +000021241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021242
21243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021244fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021245
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021247
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021248if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021249then
21250 if test $ipv6 = yes
21251 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021252 echo 'Fatal: You must get working getaddrinfo() function.'
21253 echo ' or you can specify "--disable-ipv6"'.
21254 exit 1
21255 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021256else
Martin v. Löwis11437992002-04-12 09:54:03 +000021257
21258cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021259#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021260_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021261
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021263
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021264for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021265do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21267{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021269if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021271else
Martin v. Löwis11437992002-04-12 09:54:03 +000021272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021273/* confdefs.h. */
21274_ACEOF
21275cat confdefs.h >>conftest.$ac_ext
21276cat >>conftest.$ac_ext <<_ACEOF
21277/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021278/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21280#define $ac_func innocuous_$ac_func
21281
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021282/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021283 which can conflict with char $ac_func (); below.
21284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021285 <limits.h> exists even on freestanding compilers. */
21286
21287#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021288# include <limits.h>
21289#else
21290# include <assert.h>
21291#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021292
21293#undef $ac_func
21294
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295/* Override any GCC internal prototype to avoid an error.
21296 Use char because int might match the return type of a GCC
21297 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021298#ifdef __cplusplus
21299extern "C"
21300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021301char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021302/* The GNU C library defines this for functions which it implements
21303 to always fail with ENOSYS. Some functions are actually named
21304 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021305#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021306choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021307#endif
21308
Skip Montanaro6dead952003-09-25 14:50:04 +000021309int
21310main ()
21311{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021312return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021313 ;
21314 return 0;
21315}
21316_ACEOF
21317rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318if { (ac_try="$ac_link"
21319case "(($ac_try" in
21320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21321 *) ac_try_echo=$ac_try;;
21322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021326 grep -v '^ *+' conftest.er1 >conftest.err
21327 rm -f conftest.er1
21328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021330 (exit $ac_status); } && {
21331 test -z "$ac_c_werror_flag" ||
21332 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021333 } && test -s conftest$ac_exeext &&
21334 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021335 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021336else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021338sed 's/^/| /' conftest.$ac_ext >&5
21339
Martin v. Löwiseba40652007-08-30 20:10:57 +000021340 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021342
21343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021344 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021346ac_res=`eval echo '${'$as_ac_var'}'`
21347 { echo "$as_me:$LINENO: result: $ac_res" >&5
21348echo "${ECHO_T}$ac_res" >&6; }
21349if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021351#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021352_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021353
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021354fi
21355done
21356
Michael W. Hudson54241132001-12-07 15:38:26 +000021357
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021358# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021359{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21360echo $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 +000021361if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021362 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021363else
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021365/* confdefs.h. */
21366_ACEOF
21367cat confdefs.h >>conftest.$ac_ext
21368cat >>conftest.$ac_ext <<_ACEOF
21369/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021370#include <sys/types.h>
21371#include <sys/time.h>
21372#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021373
Martin v. Löwis11437992002-04-12 09:54:03 +000021374int
21375main ()
21376{
21377if ((struct tm *) 0)
21378return 0;
21379 ;
21380 return 0;
21381}
21382_ACEOF
21383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021384if { (ac_try="$ac_compile"
21385case "(($ac_try" in
21386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21387 *) ac_try_echo=$ac_try;;
21388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021392 grep -v '^ *+' conftest.er1 >conftest.err
21393 rm -f conftest.er1
21394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021396 (exit $ac_status); } && {
21397 test -z "$ac_c_werror_flag" ||
21398 test ! -s conftest.err
21399 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021400 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021403sed 's/^/| /' conftest.$ac_ext >&5
21404
Martin v. Löwiseba40652007-08-30 20:10:57 +000021405 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021407
21408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021409fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021410{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21411echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021412if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021413
21414cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021415#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021416_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021417
21418fi
21419
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021420{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21421echo $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 +000021422if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021423 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021424else
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021426/* confdefs.h. */
21427_ACEOF
21428cat confdefs.h >>conftest.$ac_ext
21429cat >>conftest.$ac_ext <<_ACEOF
21430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021431#include <sys/types.h>
21432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021433
Martin v. Löwis11437992002-04-12 09:54:03 +000021434int
21435main ()
21436{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021437struct tm tm;
21438 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021439 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021440 ;
21441 return 0;
21442}
21443_ACEOF
21444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021445if { (ac_try="$ac_compile"
21446case "(($ac_try" in
21447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21448 *) ac_try_echo=$ac_try;;
21449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021453 grep -v '^ *+' conftest.er1 >conftest.err
21454 rm -f conftest.er1
21455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457 (exit $ac_status); } && {
21458 test -z "$ac_c_werror_flag" ||
21459 test ! -s conftest.err
21460 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021461 ac_cv_struct_tm=time.h
21462else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021464sed 's/^/| /' conftest.$ac_ext >&5
21465
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021468
21469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021470fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021471{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21472echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021473if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
21475cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021476#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021477_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021478
21479fi
21480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021481{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21482echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021483if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021484 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021485else
Martin v. Löwis11437992002-04-12 09:54:03 +000021486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021487/* confdefs.h. */
21488_ACEOF
21489cat confdefs.h >>conftest.$ac_ext
21490cat >>conftest.$ac_ext <<_ACEOF
21491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021492#include <sys/types.h>
21493#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021494
21495
Martin v. Löwis11437992002-04-12 09:54:03 +000021496int
21497main ()
21498{
21499static struct tm ac_aggr;
21500if (ac_aggr.tm_zone)
21501return 0;
21502 ;
21503 return 0;
21504}
21505_ACEOF
21506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507if { (ac_try="$ac_compile"
21508case "(($ac_try" in
21509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21510 *) ac_try_echo=$ac_try;;
21511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021515 grep -v '^ *+' conftest.er1 >conftest.err
21516 rm -f conftest.er1
21517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 (exit $ac_status); } && {
21520 test -z "$ac_c_werror_flag" ||
21521 test ! -s conftest.err
21522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021523 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021526sed 's/^/| /' conftest.$ac_ext >&5
21527
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
21534#include <sys/types.h>
21535#include <$ac_cv_struct_tm>
21536
21537
21538int
21539main ()
21540{
21541static struct tm ac_aggr;
21542if (sizeof ac_aggr.tm_zone)
21543return 0;
21544 ;
21545 return 0;
21546}
21547_ACEOF
21548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549if { (ac_try="$ac_compile"
21550case "(($ac_try" in
21551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21552 *) ac_try_echo=$ac_try;;
21553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021557 grep -v '^ *+' conftest.er1 >conftest.err
21558 rm -f conftest.er1
21559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021561 (exit $ac_status); } && {
21562 test -z "$ac_c_werror_flag" ||
21563 test ! -s conftest.err
21564 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021565 ac_cv_member_struct_tm_tm_zone=yes
21566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021568sed 's/^/| /' conftest.$ac_ext >&5
21569
Martin v. Löwiseba40652007-08-30 20:10:57 +000021570 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572
21573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021575
21576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021577fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021578{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21579echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21580if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021581
21582cat >>confdefs.h <<_ACEOF
21583#define HAVE_STRUCT_TM_TM_ZONE 1
21584_ACEOF
21585
21586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021587fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021588
Martin v. Löwis11437992002-04-12 09:54:03 +000021589if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21590
21591cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021592#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021593_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021594
21595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021596 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21597echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021599 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600else
21601 cat >conftest.$ac_ext <<_ACEOF
21602/* confdefs.h. */
21603_ACEOF
21604cat confdefs.h >>conftest.$ac_ext
21605cat >>conftest.$ac_ext <<_ACEOF
21606/* end confdefs.h. */
21607#include <time.h>
21608
21609int
21610main ()
21611{
21612#ifndef tzname
21613 (void) tzname;
21614#endif
21615
21616 ;
21617 return 0;
21618}
21619_ACEOF
21620rm -f conftest.$ac_objext
21621if { (ac_try="$ac_compile"
21622case "(($ac_try" in
21623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21624 *) ac_try_echo=$ac_try;;
21625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021627 (eval "$ac_compile") 2>conftest.er1
21628 ac_status=$?
21629 grep -v '^ *+' conftest.er1 >conftest.err
21630 rm -f conftest.er1
21631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021633 (exit $ac_status); } && {
21634 test -z "$ac_c_werror_flag" ||
21635 test ! -s conftest.err
21636 } && test -s conftest.$ac_objext; then
21637 ac_cv_have_decl_tzname=yes
21638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021639 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021640sed 's/^/| /' conftest.$ac_ext >&5
21641
21642 ac_cv_have_decl_tzname=no
21643fi
21644
21645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21646fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021647{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21648echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21649if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021650
21651cat >>confdefs.h <<_ACEOF
21652#define HAVE_DECL_TZNAME 1
21653_ACEOF
21654
21655
21656else
21657 cat >>confdefs.h <<_ACEOF
21658#define HAVE_DECL_TZNAME 0
21659_ACEOF
21660
21661
21662fi
21663
21664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021665 { echo "$as_me:$LINENO: checking for tzname" >&5
21666echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021667if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021668 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021669else
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021676#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021677#if !HAVE_DECL_TZNAME
21678extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021680
Martin v. Löwis11437992002-04-12 09:54:03 +000021681int
21682main ()
21683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021684return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021685 ;
21686 return 0;
21687}
21688_ACEOF
21689rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021690if { (ac_try="$ac_link"
21691case "(($ac_try" in
21692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21693 *) ac_try_echo=$ac_try;;
21694esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021698 grep -v '^ *+' conftest.er1 >conftest.err
21699 rm -f conftest.er1
21700 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021702 (exit $ac_status); } && {
21703 test -z "$ac_c_werror_flag" ||
21704 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021705 } && test -s conftest$ac_exeext &&
21706 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021707 ac_cv_var_tzname=yes
21708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021710sed 's/^/| /' conftest.$ac_ext >&5
21711
Martin v. Löwiseba40652007-08-30 20:10:57 +000021712 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714
21715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021716 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021717fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021718{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21719echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021720 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021721
21722cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021723#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021724_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021726 fi
21727fi
21728
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021729{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21730echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021731if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021732 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021733else
21734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021735/* confdefs.h. */
21736_ACEOF
21737cat confdefs.h >>conftest.$ac_ext
21738cat >>conftest.$ac_ext <<_ACEOF
21739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021740$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021741int
21742main ()
21743{
21744static struct stat ac_aggr;
21745if (ac_aggr.st_rdev)
21746return 0;
21747 ;
21748 return 0;
21749}
21750_ACEOF
21751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752if { (ac_try="$ac_compile"
21753case "(($ac_try" in
21754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21755 *) ac_try_echo=$ac_try;;
21756esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021760 grep -v '^ *+' conftest.er1 >conftest.err
21761 rm -f conftest.er1
21762 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021764 (exit $ac_status); } && {
21765 test -z "$ac_c_werror_flag" ||
21766 test ! -s conftest.err
21767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021768 ac_cv_member_struct_stat_st_rdev=yes
21769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021771sed 's/^/| /' conftest.$ac_ext >&5
21772
Martin v. Löwiseba40652007-08-30 20:10:57 +000021773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021774/* confdefs.h. */
21775_ACEOF
21776cat confdefs.h >>conftest.$ac_ext
21777cat >>conftest.$ac_ext <<_ACEOF
21778/* end confdefs.h. */
21779$ac_includes_default
21780int
21781main ()
21782{
21783static struct stat ac_aggr;
21784if (sizeof ac_aggr.st_rdev)
21785return 0;
21786 ;
21787 return 0;
21788}
21789_ACEOF
21790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021791if { (ac_try="$ac_compile"
21792case "(($ac_try" in
21793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21794 *) ac_try_echo=$ac_try;;
21795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021799 grep -v '^ *+' conftest.er1 >conftest.err
21800 rm -f conftest.er1
21801 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021803 (exit $ac_status); } && {
21804 test -z "$ac_c_werror_flag" ||
21805 test ! -s conftest.err
21806 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021807 ac_cv_member_struct_stat_st_rdev=yes
21808else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021810sed 's/^/| /' conftest.$ac_ext >&5
21811
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814
21815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021817
21818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21821echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21822if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021823
21824cat >>confdefs.h <<_ACEOF
21825#define HAVE_STRUCT_STAT_ST_RDEV 1
21826_ACEOF
21827
21828
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021829fi
21830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021831{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21832echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021833if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021835else
Martin v. Löwis11437992002-04-12 09:54:03 +000021836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021837/* confdefs.h. */
21838_ACEOF
21839cat confdefs.h >>conftest.$ac_ext
21840cat >>conftest.$ac_ext <<_ACEOF
21841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021842$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021843int
21844main ()
21845{
21846static struct stat ac_aggr;
21847if (ac_aggr.st_blksize)
21848return 0;
21849 ;
21850 return 0;
21851}
21852_ACEOF
21853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021854if { (ac_try="$ac_compile"
21855case "(($ac_try" in
21856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21857 *) ac_try_echo=$ac_try;;
21858esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021862 grep -v '^ *+' conftest.er1 >conftest.err
21863 rm -f conftest.er1
21864 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866 (exit $ac_status); } && {
21867 test -z "$ac_c_werror_flag" ||
21868 test ! -s conftest.err
21869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021870 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021871else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021873sed 's/^/| /' conftest.$ac_ext >&5
21874
Martin v. Löwiseba40652007-08-30 20:10:57 +000021875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021876/* confdefs.h. */
21877_ACEOF
21878cat confdefs.h >>conftest.$ac_ext
21879cat >>conftest.$ac_ext <<_ACEOF
21880/* end confdefs.h. */
21881$ac_includes_default
21882int
21883main ()
21884{
21885static struct stat ac_aggr;
21886if (sizeof ac_aggr.st_blksize)
21887return 0;
21888 ;
21889 return 0;
21890}
21891_ACEOF
21892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021893if { (ac_try="$ac_compile"
21894case "(($ac_try" in
21895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21896 *) ac_try_echo=$ac_try;;
21897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021899 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021901 grep -v '^ *+' conftest.er1 >conftest.err
21902 rm -f conftest.er1
21903 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021905 (exit $ac_status); } && {
21906 test -z "$ac_c_werror_flag" ||
21907 test ! -s conftest.err
21908 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021909 ac_cv_member_struct_stat_st_blksize=yes
21910else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021912sed 's/^/| /' conftest.$ac_ext >&5
21913
Martin v. Löwiseba40652007-08-30 20:10:57 +000021914 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916
21917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021919
21920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21923echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21924if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021925
Martin v. Löwis11437992002-04-12 09:54:03 +000021926cat >>confdefs.h <<_ACEOF
21927#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21928_ACEOF
21929
21930
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021931fi
21932
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021933{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21934echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021935if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021936 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021937else
21938 cat >conftest.$ac_ext <<_ACEOF
21939/* confdefs.h. */
21940_ACEOF
21941cat confdefs.h >>conftest.$ac_ext
21942cat >>conftest.$ac_ext <<_ACEOF
21943/* end confdefs.h. */
21944$ac_includes_default
21945int
21946main ()
21947{
21948static struct stat ac_aggr;
21949if (ac_aggr.st_flags)
21950return 0;
21951 ;
21952 return 0;
21953}
21954_ACEOF
21955rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021956if { (ac_try="$ac_compile"
21957case "(($ac_try" in
21958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21959 *) ac_try_echo=$ac_try;;
21960esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021962 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021963 ac_status=$?
21964 grep -v '^ *+' conftest.er1 >conftest.err
21965 rm -f conftest.er1
21966 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021968 (exit $ac_status); } && {
21969 test -z "$ac_c_werror_flag" ||
21970 test ! -s conftest.err
21971 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021972 ac_cv_member_struct_stat_st_flags=yes
21973else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021974 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021975sed 's/^/| /' conftest.$ac_ext >&5
21976
Martin v. Löwiseba40652007-08-30 20:10:57 +000021977 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021978/* confdefs.h. */
21979_ACEOF
21980cat confdefs.h >>conftest.$ac_ext
21981cat >>conftest.$ac_ext <<_ACEOF
21982/* end confdefs.h. */
21983$ac_includes_default
21984int
21985main ()
21986{
21987static struct stat ac_aggr;
21988if (sizeof ac_aggr.st_flags)
21989return 0;
21990 ;
21991 return 0;
21992}
21993_ACEOF
21994rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021995if { (ac_try="$ac_compile"
21996case "(($ac_try" in
21997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21998 *) ac_try_echo=$ac_try;;
21999esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022002 ac_status=$?
22003 grep -v '^ *+' conftest.er1 >conftest.err
22004 rm -f conftest.er1
22005 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007 (exit $ac_status); } && {
22008 test -z "$ac_c_werror_flag" ||
22009 test ! -s conftest.err
22010 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022011 ac_cv_member_struct_stat_st_flags=yes
22012else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022013 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022014sed 's/^/| /' conftest.$ac_ext >&5
22015
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018
22019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022021
22022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022024{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22025echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22026if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022027
22028cat >>confdefs.h <<_ACEOF
22029#define HAVE_STRUCT_STAT_ST_FLAGS 1
22030_ACEOF
22031
22032
22033fi
22034
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22036echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022037if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022038 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022039else
22040 cat >conftest.$ac_ext <<_ACEOF
22041/* confdefs.h. */
22042_ACEOF
22043cat confdefs.h >>conftest.$ac_ext
22044cat >>conftest.$ac_ext <<_ACEOF
22045/* end confdefs.h. */
22046$ac_includes_default
22047int
22048main ()
22049{
22050static struct stat ac_aggr;
22051if (ac_aggr.st_gen)
22052return 0;
22053 ;
22054 return 0;
22055}
22056_ACEOF
22057rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022058if { (ac_try="$ac_compile"
22059case "(($ac_try" in
22060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22061 *) ac_try_echo=$ac_try;;
22062esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022065 ac_status=$?
22066 grep -v '^ *+' conftest.er1 >conftest.err
22067 rm -f conftest.er1
22068 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022070 (exit $ac_status); } && {
22071 test -z "$ac_c_werror_flag" ||
22072 test ! -s conftest.err
22073 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022074 ac_cv_member_struct_stat_st_gen=yes
22075else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022076 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022077sed 's/^/| /' conftest.$ac_ext >&5
22078
Martin v. Löwiseba40652007-08-30 20:10:57 +000022079 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022080/* confdefs.h. */
22081_ACEOF
22082cat confdefs.h >>conftest.$ac_ext
22083cat >>conftest.$ac_ext <<_ACEOF
22084/* end confdefs.h. */
22085$ac_includes_default
22086int
22087main ()
22088{
22089static struct stat ac_aggr;
22090if (sizeof ac_aggr.st_gen)
22091return 0;
22092 ;
22093 return 0;
22094}
22095_ACEOF
22096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022097if { (ac_try="$ac_compile"
22098case "(($ac_try" in
22099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22100 *) ac_try_echo=$ac_try;;
22101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022104 ac_status=$?
22105 grep -v '^ *+' conftest.er1 >conftest.err
22106 rm -f conftest.er1
22107 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022109 (exit $ac_status); } && {
22110 test -z "$ac_c_werror_flag" ||
22111 test ! -s conftest.err
22112 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022113 ac_cv_member_struct_stat_st_gen=yes
22114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022115 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022116sed 's/^/| /' conftest.$ac_ext >&5
22117
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120
22121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022123
22124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022125fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022126{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22127echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22128if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022129
22130cat >>confdefs.h <<_ACEOF
22131#define HAVE_STRUCT_STAT_ST_GEN 1
22132_ACEOF
22133
22134
22135fi
22136
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022137{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22138echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022139if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022140 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022141else
22142 cat >conftest.$ac_ext <<_ACEOF
22143/* confdefs.h. */
22144_ACEOF
22145cat confdefs.h >>conftest.$ac_ext
22146cat >>conftest.$ac_ext <<_ACEOF
22147/* end confdefs.h. */
22148$ac_includes_default
22149int
22150main ()
22151{
22152static struct stat ac_aggr;
22153if (ac_aggr.st_birthtime)
22154return 0;
22155 ;
22156 return 0;
22157}
22158_ACEOF
22159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022160if { (ac_try="$ac_compile"
22161case "(($ac_try" in
22162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22163 *) ac_try_echo=$ac_try;;
22164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022167 ac_status=$?
22168 grep -v '^ *+' conftest.er1 >conftest.err
22169 rm -f conftest.er1
22170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172 (exit $ac_status); } && {
22173 test -z "$ac_c_werror_flag" ||
22174 test ! -s conftest.err
22175 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022176 ac_cv_member_struct_stat_st_birthtime=yes
22177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022178 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022179sed 's/^/| /' conftest.$ac_ext >&5
22180
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022182/* confdefs.h. */
22183_ACEOF
22184cat confdefs.h >>conftest.$ac_ext
22185cat >>conftest.$ac_ext <<_ACEOF
22186/* end confdefs.h. */
22187$ac_includes_default
22188int
22189main ()
22190{
22191static struct stat ac_aggr;
22192if (sizeof ac_aggr.st_birthtime)
22193return 0;
22194 ;
22195 return 0;
22196}
22197_ACEOF
22198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022199if { (ac_try="$ac_compile"
22200case "(($ac_try" in
22201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22202 *) ac_try_echo=$ac_try;;
22203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022206 ac_status=$?
22207 grep -v '^ *+' conftest.er1 >conftest.err
22208 rm -f conftest.er1
22209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022211 (exit $ac_status); } && {
22212 test -z "$ac_c_werror_flag" ||
22213 test ! -s conftest.err
22214 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022215 ac_cv_member_struct_stat_st_birthtime=yes
22216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022217 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022218sed 's/^/| /' conftest.$ac_ext >&5
22219
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222
22223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022225
22226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022228{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22229echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22230if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022231
22232cat >>confdefs.h <<_ACEOF
22233#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22234_ACEOF
22235
22236
22237fi
22238
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022239{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22240echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022241if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022243else
Martin v. Löwis11437992002-04-12 09:54:03 +000022244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022245/* confdefs.h. */
22246_ACEOF
22247cat confdefs.h >>conftest.$ac_ext
22248cat >>conftest.$ac_ext <<_ACEOF
22249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022250$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022251int
22252main ()
22253{
22254static struct stat ac_aggr;
22255if (ac_aggr.st_blocks)
22256return 0;
22257 ;
22258 return 0;
22259}
22260_ACEOF
22261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022262if { (ac_try="$ac_compile"
22263case "(($ac_try" in
22264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22265 *) ac_try_echo=$ac_try;;
22266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022270 grep -v '^ *+' conftest.er1 >conftest.err
22271 rm -f conftest.er1
22272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274 (exit $ac_status); } && {
22275 test -z "$ac_c_werror_flag" ||
22276 test ! -s conftest.err
22277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022278 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022279else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022281sed 's/^/| /' conftest.$ac_ext >&5
22282
Martin v. Löwiseba40652007-08-30 20:10:57 +000022283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022284/* confdefs.h. */
22285_ACEOF
22286cat confdefs.h >>conftest.$ac_ext
22287cat >>conftest.$ac_ext <<_ACEOF
22288/* end confdefs.h. */
22289$ac_includes_default
22290int
22291main ()
22292{
22293static struct stat ac_aggr;
22294if (sizeof ac_aggr.st_blocks)
22295return 0;
22296 ;
22297 return 0;
22298}
22299_ACEOF
22300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022301if { (ac_try="$ac_compile"
22302case "(($ac_try" in
22303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22304 *) ac_try_echo=$ac_try;;
22305esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022307 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022309 grep -v '^ *+' conftest.er1 >conftest.err
22310 rm -f conftest.er1
22311 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022313 (exit $ac_status); } && {
22314 test -z "$ac_c_werror_flag" ||
22315 test ! -s conftest.err
22316 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022317 ac_cv_member_struct_stat_st_blocks=yes
22318else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022320sed 's/^/| /' conftest.$ac_ext >&5
22321
Martin v. Löwiseba40652007-08-30 20:10:57 +000022322 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022324
22325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022327
22328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022329fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022330{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22331echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22332if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022333
Martin v. Löwis11437992002-04-12 09:54:03 +000022334cat >>confdefs.h <<_ACEOF
22335#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22336_ACEOF
22337
22338
22339cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022340#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022341_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022342
22343else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022344 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022345 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22347 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022348esac
22349
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022350fi
22351
Michael W. Hudson54241132001-12-07 15:38:26 +000022352
Martin v. Löwis11437992002-04-12 09:54:03 +000022353
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022354{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22355echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022356if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022358else
Martin v. Löwis11437992002-04-12 09:54:03 +000022359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022360/* confdefs.h. */
22361_ACEOF
22362cat confdefs.h >>conftest.$ac_ext
22363cat >>conftest.$ac_ext <<_ACEOF
22364/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022365#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022366int
22367main ()
22368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022369return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022370 ;
22371 return 0;
22372}
22373_ACEOF
22374rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022375if { (ac_try="$ac_compile"
22376case "(($ac_try" in
22377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22378 *) ac_try_echo=$ac_try;;
22379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022383 grep -v '^ *+' conftest.er1 >conftest.err
22384 rm -f conftest.er1
22385 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022387 (exit $ac_status); } && {
22388 test -z "$ac_c_werror_flag" ||
22389 test ! -s conftest.err
22390 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022391 ac_cv_header_time_altzone=yes
22392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022394sed 's/^/| /' conftest.$ac_ext >&5
22395
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022397fi
22398
Martin v. Löwiseba40652007-08-30 20:10:57 +000022399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22400fi
22401
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022402{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22403echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022404if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022405
22406cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022407#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022408_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022409
22410fi
22411
Guido van Rossumda88dad1995-01-26 00:46:29 +000022412was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022413{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22414echo $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 +000022415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022416/* confdefs.h. */
22417_ACEOF
22418cat confdefs.h >>conftest.$ac_ext
22419cat >>conftest.$ac_ext <<_ACEOF
22420/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022421
22422#include <sys/types.h>
22423#include <sys/select.h>
22424#include <sys/time.h>
22425
Martin v. Löwis11437992002-04-12 09:54:03 +000022426int
22427main ()
22428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022429;
Martin v. Löwis11437992002-04-12 09:54:03 +000022430 ;
22431 return 0;
22432}
22433_ACEOF
22434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022435if { (ac_try="$ac_compile"
22436case "(($ac_try" in
22437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22438 *) ac_try_echo=$ac_try;;
22439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022443 grep -v '^ *+' conftest.er1 >conftest.err
22444 rm -f conftest.er1
22445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022447 (exit $ac_status); } && {
22448 test -z "$ac_c_werror_flag" ||
22449 test ! -s conftest.err
22450 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022451
22452
22453cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022454#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022455_ACEOF
22456
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022457 was_it_defined=yes
22458
Guido van Rossumf78abae1997-01-21 22:02:36 +000022459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022461sed 's/^/| /' conftest.$ac_ext >&5
22462
Brett Cannon19fab762007-06-02 03:02:29 +000022463
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464fi
22465
22466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022467{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22468echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022470{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22471echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022472if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022473 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022474else
Martin v. Löwis11437992002-04-12 09:54:03 +000022475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022476/* confdefs.h. */
22477_ACEOF
22478cat confdefs.h >>conftest.$ac_ext
22479cat >>conftest.$ac_ext <<_ACEOF
22480/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022481
22482# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022483int
22484main ()
22485{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022486struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022487 ;
22488 return 0;
22489}
22490_ACEOF
22491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022492if { (ac_try="$ac_compile"
22493case "(($ac_try" in
22494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22495 *) ac_try_echo=$ac_try;;
22496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022500 grep -v '^ *+' conftest.er1 >conftest.err
22501 rm -f conftest.er1
22502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022504 (exit $ac_status); } && {
22505 test -z "$ac_c_werror_flag" ||
22506 test ! -s conftest.err
22507 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022508 ac_cv_struct_addrinfo=yes
22509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022511sed 's/^/| /' conftest.$ac_ext >&5
22512
Martin v. Löwiseba40652007-08-30 20:10:57 +000022513 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022514fi
22515
Martin v. Löwiseba40652007-08-30 20:10:57 +000022516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22517fi
22518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022519{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22520echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022521if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022522
22523cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022524#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022525_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022526
22527fi
22528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022529{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22530echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022531if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022532 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022533else
Martin v. Löwis11437992002-04-12 09:54:03 +000022534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022535/* confdefs.h. */
22536_ACEOF
22537cat confdefs.h >>conftest.$ac_ext
22538cat >>conftest.$ac_ext <<_ACEOF
22539/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022540
22541# include <sys/types.h>
22542# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022543int
22544main ()
22545{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022546struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022547 ;
22548 return 0;
22549}
22550_ACEOF
22551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022552if { (ac_try="$ac_compile"
22553case "(($ac_try" in
22554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22555 *) ac_try_echo=$ac_try;;
22556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022560 grep -v '^ *+' conftest.er1 >conftest.err
22561 rm -f conftest.er1
22562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564 (exit $ac_status); } && {
22565 test -z "$ac_c_werror_flag" ||
22566 test ! -s conftest.err
22567 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022568 ac_cv_struct_sockaddr_storage=yes
22569else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022571sed 's/^/| /' conftest.$ac_ext >&5
22572
Martin v. Löwiseba40652007-08-30 20:10:57 +000022573 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022574fi
22575
Martin v. Löwiseba40652007-08-30 20:10:57 +000022576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22577fi
22578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022579{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22580echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022581if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022582
22583cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022584#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022585_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022586
22587fi
22588
Guido van Rossum627b2d71993-12-24 10:39:16 +000022589# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022590
Michael W. Hudson54241132001-12-07 15:38:26 +000022591
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022592{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22593echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022594if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022595 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022596else
Martin v. Löwis11437992002-04-12 09:54:03 +000022597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022598/* confdefs.h. */
22599_ACEOF
22600cat confdefs.h >>conftest.$ac_ext
22601cat >>conftest.$ac_ext <<_ACEOF
22602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022604int
22605main ()
22606{
22607static int test_array [1 - 2 * !(((char) -1) < 0)];
22608test_array [0] = 0
22609
22610 ;
22611 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022612}
Martin v. Löwis11437992002-04-12 09:54:03 +000022613_ACEOF
22614rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022615if { (ac_try="$ac_compile"
22616case "(($ac_try" in
22617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22618 *) ac_try_echo=$ac_try;;
22619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022623 grep -v '^ *+' conftest.er1 >conftest.err
22624 rm -f conftest.er1
22625 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022627 (exit $ac_status); } && {
22628 test -z "$ac_c_werror_flag" ||
22629 test ! -s conftest.err
22630 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022631 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022634sed 's/^/| /' conftest.$ac_ext >&5
22635
Martin v. Löwiseba40652007-08-30 20:10:57 +000022636 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022638
22639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022640fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022641{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22642echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022643if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022644 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022645#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022646_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022647
22648fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022649
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022650{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22651echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022652if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022653 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022654else
22655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022656/* confdefs.h. */
22657_ACEOF
22658cat confdefs.h >>conftest.$ac_ext
22659cat >>conftest.$ac_ext <<_ACEOF
22660/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022661
Martin v. Löwis11437992002-04-12 09:54:03 +000022662int
22663main ()
22664{
22665/* FIXME: Include the comments suggested by Paul. */
22666#ifndef __cplusplus
22667 /* Ultrix mips cc rejects this. */
22668 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022671 char const *const *pcpcc;
22672 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 /* NEC SVR4.0.2 mips cc rejects this. */
22674 struct point {int x, y;};
22675 static struct point const zero = {0,0};
22676 /* AIX XL C 1.02.0.0 rejects this.
22677 It does not let you subtract one const X* pointer from another in
22678 an arm of an if-expression whose if-part is not a constant
22679 expression */
22680 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022681 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022682 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022683 ++pcpcc;
22684 ppc = (char**) pcpcc;
22685 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022686 { /* SCO 3.2v4 cc rejects this. */
22687 char *t;
22688 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022689
Martin v. Löwis11437992002-04-12 09:54:03 +000022690 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022692 }
22693 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22694 int x[] = {25, 17};
22695 const int *foo = &x[0];
22696 ++foo;
22697 }
22698 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22699 typedef const int *iptr;
22700 iptr p = 0;
22701 ++p;
22702 }
22703 { /* AIX XL C 1.02.0.0 rejects this saying
22704 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22705 struct s { int j; const int *ap[3]; };
22706 struct s *b; b->j = 5;
22707 }
22708 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22709 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022710 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022711 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022712 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022713#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022714
Martin v. Löwis11437992002-04-12 09:54:03 +000022715 ;
22716 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022717}
Martin v. Löwis11437992002-04-12 09:54:03 +000022718_ACEOF
22719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022720if { (ac_try="$ac_compile"
22721case "(($ac_try" in
22722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22723 *) ac_try_echo=$ac_try;;
22724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022728 grep -v '^ *+' conftest.er1 >conftest.err
22729 rm -f conftest.er1
22730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022732 (exit $ac_status); } && {
22733 test -z "$ac_c_werror_flag" ||
22734 test ! -s conftest.err
22735 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022736 ac_cv_c_const=yes
22737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022739sed 's/^/| /' conftest.$ac_ext >&5
22740
Martin v. Löwiseba40652007-08-30 20:10:57 +000022741 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022743
22744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022746{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22747echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022748if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022749
22750cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022751#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022752_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022753
22754fi
22755
Michael W. Hudson54241132001-12-07 15:38:26 +000022756
Guido van Rossumda88dad1995-01-26 00:46:29 +000022757works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022758{ echo "$as_me:$LINENO: checking for working volatile" >&5
22759echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022760cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022761/* confdefs.h. */
22762_ACEOF
22763cat confdefs.h >>conftest.$ac_ext
22764cat >>conftest.$ac_ext <<_ACEOF
22765/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022766
Martin v. Löwis11437992002-04-12 09:54:03 +000022767int
22768main ()
22769{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022770volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022771 ;
22772 return 0;
22773}
22774_ACEOF
22775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022776if { (ac_try="$ac_compile"
22777case "(($ac_try" in
22778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22779 *) ac_try_echo=$ac_try;;
22780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022784 grep -v '^ *+' conftest.er1 >conftest.err
22785 rm -f conftest.er1
22786 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022788 (exit $ac_status); } && {
22789 test -z "$ac_c_werror_flag" ||
22790 test ! -s conftest.err
22791 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022792 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022795sed 's/^/| /' conftest.$ac_ext >&5
22796
Martin v. Löwis11437992002-04-12 09:54:03 +000022797
22798cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022799#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022800_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022801
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022802
Guido van Rossum627b2d71993-12-24 10:39:16 +000022803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022804
22805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022806{ echo "$as_me:$LINENO: result: $works" >&5
22807echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022808
Guido van Rossumda88dad1995-01-26 00:46:29 +000022809works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022810{ echo "$as_me:$LINENO: checking for working signed char" >&5
22811echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022812cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022813/* confdefs.h. */
22814_ACEOF
22815cat confdefs.h >>conftest.$ac_ext
22816cat >>conftest.$ac_ext <<_ACEOF
22817/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022818
Martin v. Löwis11437992002-04-12 09:54:03 +000022819int
22820main ()
22821{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022822signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022823 ;
22824 return 0;
22825}
22826_ACEOF
22827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022828if { (ac_try="$ac_compile"
22829case "(($ac_try" in
22830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22831 *) ac_try_echo=$ac_try;;
22832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022836 grep -v '^ *+' conftest.er1 >conftest.err
22837 rm -f conftest.er1
22838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022840 (exit $ac_status); } && {
22841 test -z "$ac_c_werror_flag" ||
22842 test ! -s conftest.err
22843 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022844 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022847sed 's/^/| /' conftest.$ac_ext >&5
22848
Martin v. Löwis11437992002-04-12 09:54:03 +000022849
22850cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022851#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022852_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022853
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022854
Guido van Rossum7f43da71994-08-01 12:15:30 +000022855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022856
22857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022858{ echo "$as_me:$LINENO: result: $works" >&5
22859echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022860
Guido van Rossumda88dad1995-01-26 00:46:29 +000022861have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022862{ echo "$as_me:$LINENO: checking for prototypes" >&5
22863echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022865/* confdefs.h. */
22866_ACEOF
22867cat confdefs.h >>conftest.$ac_ext
22868cat >>conftest.$ac_ext <<_ACEOF
22869/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022870int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022871int
22872main ()
22873{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022874return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022875 ;
22876 return 0;
22877}
22878_ACEOF
22879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022880if { (ac_try="$ac_compile"
22881case "(($ac_try" in
22882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22883 *) ac_try_echo=$ac_try;;
22884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022888 grep -v '^ *+' conftest.er1 >conftest.err
22889 rm -f conftest.er1
22890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022892 (exit $ac_status); } && {
22893 test -z "$ac_c_werror_flag" ||
22894 test ! -s conftest.err
22895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022896
22897
22898cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022899#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022900_ACEOF
22901
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022902 have_prototypes=yes
22903
Guido van Rossumf78abae1997-01-21 22:02:36 +000022904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022906sed 's/^/| /' conftest.$ac_ext >&5
22907
Martin v. Löwiseba40652007-08-30 20:10:57 +000022908
Guido van Rossum7f43da71994-08-01 12:15:30 +000022909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910
22911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022912{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22913echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022914
Guido van Rossumda88dad1995-01-26 00:46:29 +000022915works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022916{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22917echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022919/* confdefs.h. */
22920_ACEOF
22921cat confdefs.h >>conftest.$ac_ext
22922cat >>conftest.$ac_ext <<_ACEOF
22923/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022924
22925#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022926int foo(int x, ...) {
22927 va_list va;
22928 va_start(va, x);
22929 va_arg(va, int);
22930 va_arg(va, char *);
22931 va_arg(va, double);
22932 return 0;
22933}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022934
Martin v. Löwis11437992002-04-12 09:54:03 +000022935int
22936main ()
22937{
Guido van Rossum90eea071996-08-30 20:58:57 +000022938return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022939 ;
22940 return 0;
22941}
22942_ACEOF
22943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022944if { (ac_try="$ac_compile"
22945case "(($ac_try" in
22946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22947 *) ac_try_echo=$ac_try;;
22948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022952 grep -v '^ *+' conftest.er1 >conftest.err
22953 rm -f conftest.er1
22954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022956 (exit $ac_status); } && {
22957 test -z "$ac_c_werror_flag" ||
22958 test ! -s conftest.err
22959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022960
22961
22962cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022963#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022964_ACEOF
22965
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022966 works=yes
22967
Guido van Rossumf78abae1997-01-21 22:02:36 +000022968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022970sed 's/^/| /' conftest.$ac_ext >&5
22971
Martin v. Löwiseba40652007-08-30 20:10:57 +000022972
Guido van Rossum627b2d71993-12-24 10:39:16 +000022973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974
22975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022976{ echo "$as_me:$LINENO: result: $works" >&5
22977echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022978
Martin v. Löwisd6320502004-08-12 13:45:08 +000022979# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022980{ echo "$as_me:$LINENO: checking for socketpair" >&5
22981echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022982cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022983/* confdefs.h. */
22984_ACEOF
22985cat confdefs.h >>conftest.$ac_ext
22986cat >>conftest.$ac_ext <<_ACEOF
22987/* end confdefs.h. */
22988
22989#include <sys/types.h>
22990#include <sys/socket.h>
22991
22992int
22993main ()
22994{
22995void *x=socketpair
22996 ;
22997 return 0;
22998}
22999_ACEOF
23000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023001if { (ac_try="$ac_compile"
23002case "(($ac_try" in
23003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23004 *) ac_try_echo=$ac_try;;
23005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023009 grep -v '^ *+' conftest.er1 >conftest.err
23010 rm -f conftest.er1
23011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013 (exit $ac_status); } && {
23014 test -z "$ac_c_werror_flag" ||
23015 test ! -s conftest.err
23016 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023017
23018cat >>confdefs.h <<\_ACEOF
23019#define HAVE_SOCKETPAIR 1
23020_ACEOF
23021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023022 { echo "$as_me:$LINENO: result: yes" >&5
23023echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023026sed 's/^/| /' conftest.$ac_ext >&5
23027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023028 { echo "$as_me:$LINENO: result: no" >&5
23029echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023030
23031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023032
23033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023034
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023035# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023036{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23037echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023039/* confdefs.h. */
23040_ACEOF
23041cat confdefs.h >>conftest.$ac_ext
23042cat >>conftest.$ac_ext <<_ACEOF
23043/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023044#include <sys/types.h>
23045#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023046int
23047main ()
23048{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023049struct sockaddr x;
23050x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023051 ;
23052 return 0;
23053}
23054_ACEOF
23055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023056if { (ac_try="$ac_compile"
23057case "(($ac_try" in
23058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23059 *) ac_try_echo=$ac_try;;
23060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023064 grep -v '^ *+' conftest.er1 >conftest.err
23065 rm -f conftest.er1
23066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068 (exit $ac_status); } && {
23069 test -z "$ac_c_werror_flag" ||
23070 test ! -s conftest.err
23071 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023072 { echo "$as_me:$LINENO: result: yes" >&5
23073echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023074
23075cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023076#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023077_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023078
23079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023081sed 's/^/| /' conftest.$ac_ext >&5
23082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083 { echo "$as_me:$LINENO: result: no" >&5
23084echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023086
23087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023088
Guido van Rossumda88dad1995-01-26 00:46:29 +000023089va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023090{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23091echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023093/* confdefs.h. */
23094_ACEOF
23095cat confdefs.h >>conftest.$ac_ext
23096cat >>conftest.$ac_ext <<_ACEOF
23097/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023098
23099#ifdef HAVE_STDARG_PROTOTYPES
23100#include <stdarg.h>
23101#else
23102#include <varargs.h>
23103#endif
23104
Martin v. Löwis11437992002-04-12 09:54:03 +000023105int
23106main ()
23107{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023108va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023109 ;
23110 return 0;
23111}
23112_ACEOF
23113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023114if { (ac_try="$ac_compile"
23115case "(($ac_try" in
23116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23117 *) ac_try_echo=$ac_try;;
23118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023122 grep -v '^ *+' conftest.er1 >conftest.err
23123 rm -f conftest.er1
23124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023126 (exit $ac_status); } && {
23127 test -z "$ac_c_werror_flag" ||
23128 test ! -s conftest.err
23129 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023130 :
23131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023133sed 's/^/| /' conftest.$ac_ext >&5
23134
Martin v. Löwis11437992002-04-12 09:54:03 +000023135
23136
23137cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023138#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023139_ACEOF
23140
Guido van Rossumda88dad1995-01-26 00:46:29 +000023141 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023142
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144
23145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023146{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23147echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023149# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023150
23151
23152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023153{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23154echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023155if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023156 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023157else
Martin v. Löwis11437992002-04-12 09:54:03 +000023158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023159/* confdefs.h. */
23160_ACEOF
23161cat confdefs.h >>conftest.$ac_ext
23162cat >>conftest.$ac_ext <<_ACEOF
23163/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023164/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23165 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23166#define gethostbyname_r innocuous_gethostbyname_r
23167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023168/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023169 which can conflict with char gethostbyname_r (); below.
23170 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023171 <limits.h> exists even on freestanding compilers. */
23172
23173#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023174# include <limits.h>
23175#else
23176# include <assert.h>
23177#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023178
23179#undef gethostbyname_r
23180
Martin v. Löwiseba40652007-08-30 20:10:57 +000023181/* Override any GCC internal prototype to avoid an error.
23182 Use char because int might match the return type of a GCC
23183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023184#ifdef __cplusplus
23185extern "C"
23186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023187char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023188/* The GNU C library defines this for functions which it implements
23189 to always fail with ENOSYS. Some functions are actually named
23190 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023191#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023192choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023193#endif
23194
Skip Montanaro6dead952003-09-25 14:50:04 +000023195int
23196main ()
23197{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023198return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023199 ;
23200 return 0;
23201}
23202_ACEOF
23203rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023204if { (ac_try="$ac_link"
23205case "(($ac_try" in
23206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23207 *) ac_try_echo=$ac_try;;
23208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023212 grep -v '^ *+' conftest.er1 >conftest.err
23213 rm -f conftest.er1
23214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023216 (exit $ac_status); } && {
23217 test -z "$ac_c_werror_flag" ||
23218 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023219 } && test -s conftest$ac_exeext &&
23220 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023221 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023222else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023224sed 's/^/| /' conftest.$ac_ext >&5
23225
Martin v. Löwiseba40652007-08-30 20:10:57 +000023226 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023228
23229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023230 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023232{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23233echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23234if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023235
Martin v. Löwis11437992002-04-12 09:54:03 +000023236 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023237#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023238_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023239
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023240 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23241echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023242 OLD_CFLAGS=$CFLAGS
23243 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023245/* confdefs.h. */
23246_ACEOF
23247cat confdefs.h >>conftest.$ac_ext
23248cat >>conftest.$ac_ext <<_ACEOF
23249/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023250
23251# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023252
Martin v. Löwis11437992002-04-12 09:54:03 +000023253int
23254main ()
23255{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023256
23257 char *name;
23258 struct hostent *he, *res;
23259 char buffer[2048];
23260 int buflen = 2048;
23261 int h_errnop;
23262
23263 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023264
23265 ;
23266 return 0;
23267}
23268_ACEOF
23269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023270if { (ac_try="$ac_compile"
23271case "(($ac_try" in
23272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23273 *) ac_try_echo=$ac_try;;
23274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023278 grep -v '^ *+' conftest.er1 >conftest.err
23279 rm -f conftest.er1
23280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023282 (exit $ac_status); } && {
23283 test -z "$ac_c_werror_flag" ||
23284 test ! -s conftest.err
23285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023286
23287 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023288#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023289_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023290
Martin v. Löwis11437992002-04-12 09:54:03 +000023291
23292cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023293#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023294_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023296 { echo "$as_me:$LINENO: result: yes" >&5
23297echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023301sed 's/^/| /' conftest.$ac_ext >&5
23302
Martin v. Löwis11437992002-04-12 09:54:03 +000023303
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023304 { echo "$as_me:$LINENO: result: no" >&5
23305echo "${ECHO_T}no" >&6; }
23306 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23307echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023309/* confdefs.h. */
23310_ACEOF
23311cat confdefs.h >>conftest.$ac_ext
23312cat >>conftest.$ac_ext <<_ACEOF
23313/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023314
23315# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023316
Martin v. Löwis11437992002-04-12 09:54:03 +000023317int
23318main ()
23319{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023320
23321 char *name;
23322 struct hostent *he;
23323 char buffer[2048];
23324 int buflen = 2048;
23325 int h_errnop;
23326
23327 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023328
23329 ;
23330 return 0;
23331}
23332_ACEOF
23333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023334if { (ac_try="$ac_compile"
23335case "(($ac_try" in
23336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23337 *) ac_try_echo=$ac_try;;
23338esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023342 grep -v '^ *+' conftest.er1 >conftest.err
23343 rm -f conftest.er1
23344 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023346 (exit $ac_status); } && {
23347 test -z "$ac_c_werror_flag" ||
23348 test ! -s conftest.err
23349 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023350
23351 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023352#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023353_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023354
Martin v. Löwis11437992002-04-12 09:54:03 +000023355
23356cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023357#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023358_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023359
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023360 { echo "$as_me:$LINENO: result: yes" >&5
23361echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023365sed 's/^/| /' conftest.$ac_ext >&5
23366
Martin v. Löwis11437992002-04-12 09:54:03 +000023367
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023368 { echo "$as_me:$LINENO: result: no" >&5
23369echo "${ECHO_T}no" >&6; }
23370 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23371echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023373/* confdefs.h. */
23374_ACEOF
23375cat confdefs.h >>conftest.$ac_ext
23376cat >>conftest.$ac_ext <<_ACEOF
23377/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023378
23379# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023380
Martin v. Löwis11437992002-04-12 09:54:03 +000023381int
23382main ()
23383{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023384
23385 char *name;
23386 struct hostent *he;
23387 struct hostent_data data;
23388
23389 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023390
23391 ;
23392 return 0;
23393}
23394_ACEOF
23395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023396if { (ac_try="$ac_compile"
23397case "(($ac_try" in
23398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23399 *) ac_try_echo=$ac_try;;
23400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023404 grep -v '^ *+' conftest.er1 >conftest.err
23405 rm -f conftest.er1
23406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023408 (exit $ac_status); } && {
23409 test -z "$ac_c_werror_flag" ||
23410 test ! -s conftest.err
23411 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023412
23413 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023414#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023415_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023416
Martin v. Löwis11437992002-04-12 09:54:03 +000023417
23418cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023419#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023420_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023422 { echo "$as_me:$LINENO: result: yes" >&5
23423echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023427sed 's/^/| /' conftest.$ac_ext >&5
23428
Martin v. Löwis11437992002-04-12 09:54:03 +000023429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023430 { echo "$as_me:$LINENO: result: no" >&5
23431echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023432
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434
23435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023438
23439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442
23443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023444 CFLAGS=$OLD_CFLAGS
23445
23446else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023447
Martin v. Löwis11437992002-04-12 09:54:03 +000023448
23449for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023450do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023451as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23452{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23453echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023454if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023456else
Martin v. Löwis11437992002-04-12 09:54:03 +000023457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023458/* confdefs.h. */
23459_ACEOF
23460cat confdefs.h >>conftest.$ac_ext
23461cat >>conftest.$ac_ext <<_ACEOF
23462/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023463/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23464 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23465#define $ac_func innocuous_$ac_func
23466
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023467/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023468 which can conflict with char $ac_func (); below.
23469 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023470 <limits.h> exists even on freestanding compilers. */
23471
23472#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023473# include <limits.h>
23474#else
23475# include <assert.h>
23476#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023477
23478#undef $ac_func
23479
Martin v. Löwiseba40652007-08-30 20:10:57 +000023480/* Override any GCC internal prototype to avoid an error.
23481 Use char because int might match the return type of a GCC
23482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023483#ifdef __cplusplus
23484extern "C"
23485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023486char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023487/* The GNU C library defines this for functions which it implements
23488 to always fail with ENOSYS. Some functions are actually named
23489 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023490#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023491choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023492#endif
23493
Skip Montanaro6dead952003-09-25 14:50:04 +000023494int
23495main ()
23496{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023497return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023498 ;
23499 return 0;
23500}
23501_ACEOF
23502rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023503if { (ac_try="$ac_link"
23504case "(($ac_try" in
23505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23506 *) ac_try_echo=$ac_try;;
23507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023509 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023511 grep -v '^ *+' conftest.er1 >conftest.err
23512 rm -f conftest.er1
23513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023515 (exit $ac_status); } && {
23516 test -z "$ac_c_werror_flag" ||
23517 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023518 } && test -s conftest$ac_exeext &&
23519 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023520 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023523sed 's/^/| /' conftest.$ac_ext >&5
23524
Martin v. Löwiseba40652007-08-30 20:10:57 +000023525 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023527
23528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023529 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023530fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023531ac_res=`eval echo '${'$as_ac_var'}'`
23532 { echo "$as_me:$LINENO: result: $ac_res" >&5
23533echo "${ECHO_T}$ac_res" >&6; }
23534if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023535 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023536#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023537_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023539fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023540done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023541
Michael W. Hudson54241132001-12-07 15:38:26 +000023542
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023543fi
23544
Michael W. Hudson54241132001-12-07 15:38:26 +000023545
23546
23547
23548
23549
23550
Guido van Rossum627b2d71993-12-24 10:39:16 +000023551# checks for system services
23552# (none yet)
23553
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023554# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023555{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23556echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023557if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023558 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023559else
Martin v. Löwis11437992002-04-12 09:54:03 +000023560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023561/* confdefs.h. */
23562_ACEOF
23563cat confdefs.h >>conftest.$ac_ext
23564cat >>conftest.$ac_ext <<_ACEOF
23565/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023566/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23568#define __fpu_control innocuous___fpu_control
23569
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023570/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023571 which can conflict with char __fpu_control (); below.
23572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023573 <limits.h> exists even on freestanding compilers. */
23574
23575#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023576# include <limits.h>
23577#else
23578# include <assert.h>
23579#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023580
23581#undef __fpu_control
23582
Martin v. Löwiseba40652007-08-30 20:10:57 +000023583/* Override any GCC internal prototype to avoid an error.
23584 Use char because int might match the return type of a GCC
23585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023586#ifdef __cplusplus
23587extern "C"
23588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023589char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023590/* The GNU C library defines this for functions which it implements
23591 to always fail with ENOSYS. Some functions are actually named
23592 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023593#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023594choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023595#endif
23596
Skip Montanaro6dead952003-09-25 14:50:04 +000023597int
23598main ()
23599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023600return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023601 ;
23602 return 0;
23603}
23604_ACEOF
23605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023606if { (ac_try="$ac_link"
23607case "(($ac_try" in
23608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23609 *) ac_try_echo=$ac_try;;
23610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023614 grep -v '^ *+' conftest.er1 >conftest.err
23615 rm -f conftest.er1
23616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023618 (exit $ac_status); } && {
23619 test -z "$ac_c_werror_flag" ||
23620 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023621 } && test -s conftest$ac_exeext &&
23622 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023623 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023626sed 's/^/| /' conftest.$ac_ext >&5
23627
Martin v. Löwiseba40652007-08-30 20:10:57 +000023628 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023630
23631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023632 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023633fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023634{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23635echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23636if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023637 :
23638else
Martin v. Löwis11437992002-04-12 09:54:03 +000023639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023640{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23641echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023642if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023644else
Martin v. Löwis11437992002-04-12 09:54:03 +000023645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023646LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023648/* confdefs.h. */
23649_ACEOF
23650cat confdefs.h >>conftest.$ac_ext
23651cat >>conftest.$ac_ext <<_ACEOF
23652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023653
Martin v. Löwiseba40652007-08-30 20:10:57 +000023654/* Override any GCC internal prototype to avoid an error.
23655 Use char because int might match the return type of a GCC
23656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023657#ifdef __cplusplus
23658extern "C"
23659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023660char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023661int
23662main ()
23663{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023664return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023665 ;
23666 return 0;
23667}
23668_ACEOF
23669rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023670if { (ac_try="$ac_link"
23671case "(($ac_try" in
23672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23673 *) ac_try_echo=$ac_try;;
23674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023676 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023678 grep -v '^ *+' conftest.er1 >conftest.err
23679 rm -f conftest.er1
23680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023682 (exit $ac_status); } && {
23683 test -z "$ac_c_werror_flag" ||
23684 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023685 } && test -s conftest$ac_exeext &&
23686 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023687 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023690sed 's/^/| /' conftest.$ac_ext >&5
23691
Martin v. Löwiseba40652007-08-30 20:10:57 +000023692 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023694
23695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023697LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023698fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023699{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23700echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23701if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023702 cat >>confdefs.h <<_ACEOF
23703#define HAVE_LIBIEEE 1
23704_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023705
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023706 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023707
Guido van Rossum627b2d71993-12-24 10:39:16 +000023708fi
23709
Michael W. Hudson54241132001-12-07 15:38:26 +000023710
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023711fi
23712
Michael W. Hudson54241132001-12-07 15:38:26 +000023713
Guido van Rossum7f253911997-05-09 02:42:48 +000023714# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023715{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23716echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023717
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023719if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023720 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023721if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023722then
23723
23724cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023725#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023726_ACEOF
23727
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023728 { echo "$as_me:$LINENO: result: yes" >&5
23729echo "${ECHO_T}yes" >&6; }
23730else { echo "$as_me:$LINENO: result: no" >&5
23731echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023732fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023734 { echo "$as_me:$LINENO: result: no" >&5
23735echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023736fi
23737
Guido van Rossum7f253911997-05-09 02:42:48 +000023738
Guido van Rossum7f43da71994-08-01 12:15:30 +000023739# check for --with-libm=...
23740
Guido van Rossum563e7081996-09-10 18:20:48 +000023741case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023742Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023743BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023744*) LIBM=-lm
23745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023746{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23747echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023748
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023750if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023751 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023752if test "$withval" = no
23753then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023754 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23755echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023756elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023757then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023758 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23759echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23760else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23761echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023762 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023763fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023765 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23766echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023767fi
23768
Guido van Rossum7f43da71994-08-01 12:15:30 +000023769
23770# check for --with-libc=...
23771
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023772{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23773echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023774
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023776if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023777 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023778if test "$withval" = no
23779then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023780 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23781echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023782elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023783then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023784 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23785echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23786else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23787echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023788 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023789fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023791 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23792echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023793fi
23794
Guido van Rossum7f43da71994-08-01 12:15:30 +000023795
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023796# **************************************************
23797# * Check for various properties of floating point *
23798# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023799
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023800{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23801echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23802if test "${ac_cv_little_endian_double+set}" = set; then
23803 echo $ECHO_N "(cached) $ECHO_C" >&6
23804else
23805
23806if test "$cross_compiling" = yes; then
23807 ac_cv_little_endian_double=no
23808else
23809 cat >conftest.$ac_ext <<_ACEOF
23810/* confdefs.h. */
23811_ACEOF
23812cat confdefs.h >>conftest.$ac_ext
23813cat >>conftest.$ac_ext <<_ACEOF
23814/* end confdefs.h. */
23815
23816#include <string.h>
23817int main() {
23818 double x = 9006104071832581.0;
23819 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23820 return 0;
23821 else
23822 return 1;
23823}
23824
23825_ACEOF
23826rm -f conftest$ac_exeext
23827if { (ac_try="$ac_link"
23828case "(($ac_try" in
23829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23830 *) ac_try_echo=$ac_try;;
23831esac
23832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23833 (eval "$ac_link") 2>&5
23834 ac_status=$?
23835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23837 { (case "(($ac_try" in
23838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23839 *) ac_try_echo=$ac_try;;
23840esac
23841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23842 (eval "$ac_try") 2>&5
23843 ac_status=$?
23844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23845 (exit $ac_status); }; }; then
23846 ac_cv_little_endian_double=yes
23847else
23848 echo "$as_me: program exited with status $ac_status" >&5
23849echo "$as_me: failed program was:" >&5
23850sed 's/^/| /' conftest.$ac_ext >&5
23851
23852( exit $ac_status )
23853ac_cv_little_endian_double=no
23854fi
23855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23856fi
23857
23858
23859fi
23860
23861{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23862echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23863if test "$ac_cv_little_endian_double" = yes
23864then
23865
23866cat >>confdefs.h <<\_ACEOF
23867#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23868_ACEOF
23869
23870fi
23871
23872{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23873echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23874if test "${ac_cv_big_endian_double+set}" = set; then
23875 echo $ECHO_N "(cached) $ECHO_C" >&6
23876else
23877
23878if test "$cross_compiling" = yes; then
23879 ac_cv_big_endian_double=no
23880else
23881 cat >conftest.$ac_ext <<_ACEOF
23882/* confdefs.h. */
23883_ACEOF
23884cat confdefs.h >>conftest.$ac_ext
23885cat >>conftest.$ac_ext <<_ACEOF
23886/* end confdefs.h. */
23887
23888#include <string.h>
23889int main() {
23890 double x = 9006104071832581.0;
23891 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23892 return 0;
23893 else
23894 return 1;
23895}
23896
23897_ACEOF
23898rm -f conftest$ac_exeext
23899if { (ac_try="$ac_link"
23900case "(($ac_try" in
23901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23902 *) ac_try_echo=$ac_try;;
23903esac
23904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23905 (eval "$ac_link") 2>&5
23906 ac_status=$?
23907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23909 { (case "(($ac_try" in
23910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23911 *) ac_try_echo=$ac_try;;
23912esac
23913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23914 (eval "$ac_try") 2>&5
23915 ac_status=$?
23916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23917 (exit $ac_status); }; }; then
23918 ac_cv_big_endian_double=yes
23919else
23920 echo "$as_me: program exited with status $ac_status" >&5
23921echo "$as_me: failed program was:" >&5
23922sed 's/^/| /' conftest.$ac_ext >&5
23923
23924( exit $ac_status )
23925ac_cv_big_endian_double=no
23926fi
23927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23928fi
23929
23930
23931fi
23932
23933{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23934echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23935if test "$ac_cv_big_endian_double" = yes
23936then
23937
23938cat >>confdefs.h <<\_ACEOF
23939#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23940_ACEOF
23941
23942fi
23943
23944# Some ARM platforms use a mixed-endian representation for doubles.
23945# While Python doesn't currently have full support for these platforms
23946# (see e.g., issue 1762561), we can at least make sure that float <-> string
23947# conversions work.
23948{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23949echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23950if test "${ac_cv_mixed_endian_double+set}" = set; then
23951 echo $ECHO_N "(cached) $ECHO_C" >&6
23952else
23953
23954if test "$cross_compiling" = yes; then
23955 ac_cv_mixed_endian_double=no
23956else
23957 cat >conftest.$ac_ext <<_ACEOF
23958/* confdefs.h. */
23959_ACEOF
23960cat confdefs.h >>conftest.$ac_ext
23961cat >>conftest.$ac_ext <<_ACEOF
23962/* end confdefs.h. */
23963
23964#include <string.h>
23965int main() {
23966 double x = 9006104071832581.0;
23967 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23968 return 0;
23969 else
23970 return 1;
23971}
23972
23973_ACEOF
23974rm -f conftest$ac_exeext
23975if { (ac_try="$ac_link"
23976case "(($ac_try" in
23977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23978 *) ac_try_echo=$ac_try;;
23979esac
23980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23981 (eval "$ac_link") 2>&5
23982 ac_status=$?
23983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23984 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23985 { (case "(($ac_try" in
23986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23987 *) ac_try_echo=$ac_try;;
23988esac
23989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23990 (eval "$ac_try") 2>&5
23991 ac_status=$?
23992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23993 (exit $ac_status); }; }; then
23994 ac_cv_mixed_endian_double=yes
23995else
23996 echo "$as_me: program exited with status $ac_status" >&5
23997echo "$as_me: failed program was:" >&5
23998sed 's/^/| /' conftest.$ac_ext >&5
23999
24000( exit $ac_status )
24001ac_cv_mixed_endian_double=no
24002fi
24003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24004fi
24005
24006
24007fi
24008
24009{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24010echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24011if test "$ac_cv_mixed_endian_double" = yes
24012then
24013
24014cat >>confdefs.h <<\_ACEOF
24015#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24016_ACEOF
24017
24018fi
24019
24020# The short float repr introduced in Python 3.1 requires the
24021# correctly-rounded string <-> double conversion functions from
24022# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24023# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024024# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024025# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024026
24027# This inline assembler syntax may also work for suncc and icc,
24028# so we try it on all platforms.
24029
24030{ 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 +000024031echo $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 +000024032cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024033/* confdefs.h. */
24034_ACEOF
24035cat confdefs.h >>conftest.$ac_ext
24036cat >>conftest.$ac_ext <<_ACEOF
24037/* end confdefs.h. */
24038
24039int
24040main ()
24041{
24042
Mark Dickinsona548dee2009-11-15 13:12:43 +000024043 unsigned short cw;
24044 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24045 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024046
24047 ;
24048 return 0;
24049}
24050_ACEOF
24051rm -f conftest.$ac_objext
24052if { (ac_try="$ac_compile"
24053case "(($ac_try" in
24054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24055 *) ac_try_echo=$ac_try;;
24056esac
24057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24058 (eval "$ac_compile") 2>conftest.er1
24059 ac_status=$?
24060 grep -v '^ *+' conftest.er1 >conftest.err
24061 rm -f conftest.er1
24062 cat conftest.err >&5
24063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24064 (exit $ac_status); } && {
24065 test -z "$ac_c_werror_flag" ||
24066 test ! -s conftest.err
24067 } && test -s conftest.$ac_objext; then
24068 have_gcc_asm_for_x87=yes
24069else
24070 echo "$as_me: failed program was:" >&5
24071sed 's/^/| /' conftest.$ac_ext >&5
24072
24073 have_gcc_asm_for_x87=no
24074fi
24075
24076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024077{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024078echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024079if test "$have_gcc_asm_for_x87" = yes
24080then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024081
24082cat >>confdefs.h <<\_ACEOF
24083#define HAVE_GCC_ASM_FOR_X87 1
24084_ACEOF
24085
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024086fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024087
Mark Dickinson04b27232009-01-04 12:29:36 +000024088# Detect whether system arithmetic is subject to x87-style double
24089# rounding issues. The result of this test has little meaning on non
24090# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24091# mode is round-to-nearest and double rounding issues are present, and
24092# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024093{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24094echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024095# $BASECFLAGS may affect the result
24096ac_save_cc="$CC"
24097CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024098if test "$cross_compiling" = yes; then
24099 ac_cv_x87_double_rounding=no
24100else
24101 cat >conftest.$ac_ext <<_ACEOF
24102/* confdefs.h. */
24103_ACEOF
24104cat confdefs.h >>conftest.$ac_ext
24105cat >>conftest.$ac_ext <<_ACEOF
24106/* end confdefs.h. */
24107
24108#include <stdlib.h>
24109#include <math.h>
24110int main() {
24111 volatile double x, y, z;
24112 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24113 x = 0.99999999999999989; /* 1-2**-53 */
24114 y = 1./x;
24115 if (y != 1.)
24116 exit(0);
24117 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24118 x = 1e16;
24119 y = 2.99999;
24120 z = x + y;
24121 if (z != 1e16+4.)
24122 exit(0);
24123 /* both tests show evidence of double rounding */
24124 exit(1);
24125}
24126
24127_ACEOF
24128rm -f conftest$ac_exeext
24129if { (ac_try="$ac_link"
24130case "(($ac_try" in
24131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24132 *) ac_try_echo=$ac_try;;
24133esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024135 (eval "$ac_link") 2>&5
24136 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24139 { (case "(($ac_try" in
24140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24141 *) ac_try_echo=$ac_try;;
24142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024144 (eval "$ac_try") 2>&5
24145 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024147 (exit $ac_status); }; }; then
24148 ac_cv_x87_double_rounding=no
24149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024150 echo "$as_me: program exited with status $ac_status" >&5
24151echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024152sed 's/^/| /' conftest.$ac_ext >&5
24153
24154( exit $ac_status )
24155ac_cv_x87_double_rounding=yes
24156fi
24157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24158fi
24159
24160
Mark Dickinson99abd142009-10-24 13:44:16 +000024161CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024162{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24163echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024164if test "$ac_cv_x87_double_rounding" = yes
24165then
24166
24167cat >>confdefs.h <<\_ACEOF
24168#define X87_DOUBLE_ROUNDING 1
24169_ACEOF
24170
24171fi
24172
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024173# ************************************
24174# * Check for mathematical functions *
24175# ************************************
24176
24177LIBS_SAVE=$LIBS
24178LIBS="$LIBS $LIBM"
24179
Mark Dickinson265d7382008-04-21 22:32:24 +000024180# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24181# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024182{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24183echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024184if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024185 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024186else
24187
24188if test "$cross_compiling" = yes; then
24189 ac_cv_tanh_preserves_zero_sign=no
24190else
24191 cat >conftest.$ac_ext <<_ACEOF
24192/* confdefs.h. */
24193_ACEOF
24194cat confdefs.h >>conftest.$ac_ext
24195cat >>conftest.$ac_ext <<_ACEOF
24196/* end confdefs.h. */
24197
24198#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024199#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024200int main() {
24201 /* return 0 if either negative zeros don't exist
24202 on this platform or if negative zeros exist
24203 and tanh(-0.) == -0. */
24204 if (atan2(0., -1.) == atan2(-0., -1.) ||
24205 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24206 else exit(1);
24207}
24208
24209_ACEOF
24210rm -f conftest$ac_exeext
24211if { (ac_try="$ac_link"
24212case "(($ac_try" in
24213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24214 *) ac_try_echo=$ac_try;;
24215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024217 (eval "$ac_link") 2>&5
24218 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24221 { (case "(($ac_try" in
24222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24223 *) ac_try_echo=$ac_try;;
24224esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024226 (eval "$ac_try") 2>&5
24227 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024229 (exit $ac_status); }; }; then
24230 ac_cv_tanh_preserves_zero_sign=yes
24231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024232 echo "$as_me: program exited with status $ac_status" >&5
24233echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024234sed 's/^/| /' conftest.$ac_ext >&5
24235
24236( exit $ac_status )
24237ac_cv_tanh_preserves_zero_sign=no
24238fi
24239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24240fi
24241
24242
24243fi
24244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024245{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24246echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024247if test "$ac_cv_tanh_preserves_zero_sign" = yes
24248then
24249
24250cat >>confdefs.h <<\_ACEOF
24251#define TANH_PRESERVES_ZERO_SIGN 1
24252_ACEOF
24253
24254fi
24255
Martin v. Löwis11437992002-04-12 09:54:03 +000024256
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024257
Michael W. Hudson54241132001-12-07 15:38:26 +000024258
Christian Heimes0a8143f2007-12-18 23:22:54 +000024259
24260
24261
24262
24263
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024264
Mark Dickinson65898e02009-09-05 10:27:00 +000024265for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24266do
24267as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24268{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24269echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24270if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24271 echo $ECHO_N "(cached) $ECHO_C" >&6
24272else
24273 cat >conftest.$ac_ext <<_ACEOF
24274/* confdefs.h. */
24275_ACEOF
24276cat confdefs.h >>conftest.$ac_ext
24277cat >>conftest.$ac_ext <<_ACEOF
24278/* end confdefs.h. */
24279/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24281#define $ac_func innocuous_$ac_func
24282
24283/* System header to define __stub macros and hopefully few prototypes,
24284 which can conflict with char $ac_func (); below.
24285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24286 <limits.h> exists even on freestanding compilers. */
24287
24288#ifdef __STDC__
24289# include <limits.h>
24290#else
24291# include <assert.h>
24292#endif
24293
24294#undef $ac_func
24295
24296/* Override any GCC internal prototype to avoid an error.
24297 Use char because int might match the return type of a GCC
24298 builtin and then its argument prototype would still apply. */
24299#ifdef __cplusplus
24300extern "C"
24301#endif
24302char $ac_func ();
24303/* The GNU C library defines this for functions which it implements
24304 to always fail with ENOSYS. Some functions are actually named
24305 something starting with __ and the normal name is an alias. */
24306#if defined __stub_$ac_func || defined __stub___$ac_func
24307choke me
24308#endif
24309
24310int
24311main ()
24312{
24313return $ac_func ();
24314 ;
24315 return 0;
24316}
24317_ACEOF
24318rm -f conftest.$ac_objext conftest$ac_exeext
24319if { (ac_try="$ac_link"
24320case "(($ac_try" in
24321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24322 *) ac_try_echo=$ac_try;;
24323esac
24324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24325 (eval "$ac_link") 2>conftest.er1
24326 ac_status=$?
24327 grep -v '^ *+' conftest.er1 >conftest.err
24328 rm -f conftest.er1
24329 cat conftest.err >&5
24330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24331 (exit $ac_status); } && {
24332 test -z "$ac_c_werror_flag" ||
24333 test ! -s conftest.err
24334 } && test -s conftest$ac_exeext &&
24335 $as_test_x conftest$ac_exeext; then
24336 eval "$as_ac_var=yes"
24337else
24338 echo "$as_me: failed program was:" >&5
24339sed 's/^/| /' conftest.$ac_ext >&5
24340
24341 eval "$as_ac_var=no"
24342fi
24343
24344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24345 conftest$ac_exeext conftest.$ac_ext
24346fi
24347ac_res=`eval echo '${'$as_ac_var'}'`
24348 { echo "$as_me:$LINENO: result: $ac_res" >&5
24349echo "${ECHO_T}$ac_res" >&6; }
24350if test `eval echo '${'$as_ac_var'}'` = yes; then
24351 cat >>confdefs.h <<_ACEOF
24352#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24353_ACEOF
24354
24355fi
24356done
24357
24358
24359
24360
24361
24362
24363for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024364do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24366{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024368if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024369 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024370else
24371 cat >conftest.$ac_ext <<_ACEOF
24372/* confdefs.h. */
24373_ACEOF
24374cat confdefs.h >>conftest.$ac_ext
24375cat >>conftest.$ac_ext <<_ACEOF
24376/* end confdefs.h. */
24377/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24378 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24379#define $ac_func innocuous_$ac_func
24380
24381/* System header to define __stub macros and hopefully few prototypes,
24382 which can conflict with char $ac_func (); below.
24383 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24384 <limits.h> exists even on freestanding compilers. */
24385
24386#ifdef __STDC__
24387# include <limits.h>
24388#else
24389# include <assert.h>
24390#endif
24391
24392#undef $ac_func
24393
24394/* Override any GCC internal prototype to avoid an error.
24395 Use char because int might match the return type of a GCC
24396 builtin and then its argument prototype would still apply. */
24397#ifdef __cplusplus
24398extern "C"
24399#endif
24400char $ac_func ();
24401/* The GNU C library defines this for functions which it implements
24402 to always fail with ENOSYS. Some functions are actually named
24403 something starting with __ and the normal name is an alias. */
24404#if defined __stub_$ac_func || defined __stub___$ac_func
24405choke me
24406#endif
24407
24408int
24409main ()
24410{
24411return $ac_func ();
24412 ;
24413 return 0;
24414}
24415_ACEOF
24416rm -f conftest.$ac_objext conftest$ac_exeext
24417if { (ac_try="$ac_link"
24418case "(($ac_try" in
24419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24420 *) ac_try_echo=$ac_try;;
24421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024423 (eval "$ac_link") 2>conftest.er1
24424 ac_status=$?
24425 grep -v '^ *+' conftest.er1 >conftest.err
24426 rm -f conftest.er1
24427 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024429 (exit $ac_status); } && {
24430 test -z "$ac_c_werror_flag" ||
24431 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024432 } && test -s conftest$ac_exeext &&
24433 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024434 eval "$as_ac_var=yes"
24435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024436 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024437sed 's/^/| /' conftest.$ac_ext >&5
24438
24439 eval "$as_ac_var=no"
24440fi
24441
24442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24443 conftest$ac_exeext conftest.$ac_ext
24444fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024445ac_res=`eval echo '${'$as_ac_var'}'`
24446 { echo "$as_me:$LINENO: result: $ac_res" >&5
24447echo "${ECHO_T}$ac_res" >&6; }
24448if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024449 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024450#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024451_ACEOF
24452
24453fi
24454done
24455
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24457echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024458if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024459 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024460else
24461 cat >conftest.$ac_ext <<_ACEOF
24462/* confdefs.h. */
24463_ACEOF
24464cat confdefs.h >>conftest.$ac_ext
24465cat >>conftest.$ac_ext <<_ACEOF
24466/* end confdefs.h. */
24467#include <math.h>
24468
24469int
24470main ()
24471{
24472#ifndef isinf
24473 (void) isinf;
24474#endif
24475
24476 ;
24477 return 0;
24478}
24479_ACEOF
24480rm -f conftest.$ac_objext
24481if { (ac_try="$ac_compile"
24482case "(($ac_try" in
24483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24484 *) ac_try_echo=$ac_try;;
24485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024487 (eval "$ac_compile") 2>conftest.er1
24488 ac_status=$?
24489 grep -v '^ *+' conftest.er1 >conftest.err
24490 rm -f conftest.er1
24491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024493 (exit $ac_status); } && {
24494 test -z "$ac_c_werror_flag" ||
24495 test ! -s conftest.err
24496 } && test -s conftest.$ac_objext; then
24497 ac_cv_have_decl_isinf=yes
24498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024499 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024500sed 's/^/| /' conftest.$ac_ext >&5
24501
24502 ac_cv_have_decl_isinf=no
24503fi
24504
24505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24506fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024507{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24508echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24509if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024510
24511cat >>confdefs.h <<_ACEOF
24512#define HAVE_DECL_ISINF 1
24513_ACEOF
24514
24515
24516else
24517 cat >>confdefs.h <<_ACEOF
24518#define HAVE_DECL_ISINF 0
24519_ACEOF
24520
24521
24522fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024523{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24524echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024525if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024526 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024527else
24528 cat >conftest.$ac_ext <<_ACEOF
24529/* confdefs.h. */
24530_ACEOF
24531cat confdefs.h >>conftest.$ac_ext
24532cat >>conftest.$ac_ext <<_ACEOF
24533/* end confdefs.h. */
24534#include <math.h>
24535
24536int
24537main ()
24538{
24539#ifndef isnan
24540 (void) isnan;
24541#endif
24542
24543 ;
24544 return 0;
24545}
24546_ACEOF
24547rm -f conftest.$ac_objext
24548if { (ac_try="$ac_compile"
24549case "(($ac_try" in
24550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24551 *) ac_try_echo=$ac_try;;
24552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024554 (eval "$ac_compile") 2>conftest.er1
24555 ac_status=$?
24556 grep -v '^ *+' conftest.er1 >conftest.err
24557 rm -f conftest.er1
24558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024560 (exit $ac_status); } && {
24561 test -z "$ac_c_werror_flag" ||
24562 test ! -s conftest.err
24563 } && test -s conftest.$ac_objext; then
24564 ac_cv_have_decl_isnan=yes
24565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024566 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024567sed 's/^/| /' conftest.$ac_ext >&5
24568
24569 ac_cv_have_decl_isnan=no
24570fi
24571
24572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24573fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024574{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24575echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24576if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024577
24578cat >>confdefs.h <<_ACEOF
24579#define HAVE_DECL_ISNAN 1
24580_ACEOF
24581
24582
24583else
24584 cat >>confdefs.h <<_ACEOF
24585#define HAVE_DECL_ISNAN 0
24586_ACEOF
24587
24588
24589fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024590{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24591echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024592if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024593 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024594else
24595 cat >conftest.$ac_ext <<_ACEOF
24596/* confdefs.h. */
24597_ACEOF
24598cat confdefs.h >>conftest.$ac_ext
24599cat >>conftest.$ac_ext <<_ACEOF
24600/* end confdefs.h. */
24601#include <math.h>
24602
24603int
24604main ()
24605{
24606#ifndef isfinite
24607 (void) isfinite;
24608#endif
24609
24610 ;
24611 return 0;
24612}
24613_ACEOF
24614rm -f conftest.$ac_objext
24615if { (ac_try="$ac_compile"
24616case "(($ac_try" in
24617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24618 *) ac_try_echo=$ac_try;;
24619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024621 (eval "$ac_compile") 2>conftest.er1
24622 ac_status=$?
24623 grep -v '^ *+' conftest.er1 >conftest.err
24624 rm -f conftest.er1
24625 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024627 (exit $ac_status); } && {
24628 test -z "$ac_c_werror_flag" ||
24629 test ! -s conftest.err
24630 } && test -s conftest.$ac_objext; then
24631 ac_cv_have_decl_isfinite=yes
24632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024633 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024634sed 's/^/| /' conftest.$ac_ext >&5
24635
24636 ac_cv_have_decl_isfinite=no
24637fi
24638
24639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24640fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024641{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24642echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24643if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024644
24645cat >>confdefs.h <<_ACEOF
24646#define HAVE_DECL_ISFINITE 1
24647_ACEOF
24648
24649
24650else
24651 cat >>confdefs.h <<_ACEOF
24652#define HAVE_DECL_ISFINITE 0
24653_ACEOF
24654
24655
24656fi
24657
24658
Christian Heimes0a8143f2007-12-18 23:22:54 +000024659
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024660LIBS=$LIBS_SAVE
24661
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024662# For multiprocessing module, check that sem_open
24663# actually works. For FreeBSD versions <= 7.2,
24664# the kernel module that provides POSIX semaphores
24665# isn't loaded by default, so an attempt to call
24666# sem_open results in a 'Signal 12' error.
24667{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24668echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24669if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24670 echo $ECHO_N "(cached) $ECHO_C" >&6
24671else
24672 if test "$cross_compiling" = yes; then
24673 ac_cv_posix_semaphores_enabled=yes
24674else
24675 cat >conftest.$ac_ext <<_ACEOF
24676/* confdefs.h. */
24677_ACEOF
24678cat confdefs.h >>conftest.$ac_ext
24679cat >>conftest.$ac_ext <<_ACEOF
24680/* end confdefs.h. */
24681
24682#include <unistd.h>
24683#include <fcntl.h>
24684#include <stdio.h>
24685#include <semaphore.h>
24686#include <sys/stat.h>
24687
24688int main(void) {
24689 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24690 if (a == SEM_FAILED) {
24691 perror("sem_open");
24692 return 1;
24693 }
24694 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024695 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024696 return 0;
24697}
24698
24699_ACEOF
24700rm -f conftest$ac_exeext
24701if { (ac_try="$ac_link"
24702case "(($ac_try" in
24703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24704 *) ac_try_echo=$ac_try;;
24705esac
24706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24707 (eval "$ac_link") 2>&5
24708 ac_status=$?
24709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24711 { (case "(($ac_try" in
24712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24713 *) ac_try_echo=$ac_try;;
24714esac
24715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24716 (eval "$ac_try") 2>&5
24717 ac_status=$?
24718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24719 (exit $ac_status); }; }; then
24720 ac_cv_posix_semaphores_enabled=yes
24721else
24722 echo "$as_me: program exited with status $ac_status" >&5
24723echo "$as_me: failed program was:" >&5
24724sed 's/^/| /' conftest.$ac_ext >&5
24725
24726( exit $ac_status )
24727ac_cv_posix_semaphores_enabled=no
24728fi
24729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24730fi
24731
24732
24733
24734fi
24735
24736{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24737echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24738if test $ac_cv_posix_semaphores_enabled = no
24739then
24740
24741cat >>confdefs.h <<\_ACEOF
24742#define POSIX_SEMAPHORES_NOT_ENABLED 1
24743_ACEOF
24744
24745fi
24746
24747# Multiprocessing check for broken sem_getvalue
24748{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24749echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24750if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24751 echo $ECHO_N "(cached) $ECHO_C" >&6
24752else
24753 if test "$cross_compiling" = yes; then
24754 ac_cv_broken_sem_getvalue=yes
24755else
24756 cat >conftest.$ac_ext <<_ACEOF
24757/* confdefs.h. */
24758_ACEOF
24759cat confdefs.h >>conftest.$ac_ext
24760cat >>conftest.$ac_ext <<_ACEOF
24761/* end confdefs.h. */
24762
24763#include <unistd.h>
24764#include <fcntl.h>
24765#include <stdio.h>
24766#include <semaphore.h>
24767#include <sys/stat.h>
24768
24769int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024770 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024771 int count;
24772 int res;
24773 if(a==SEM_FAILED){
24774 perror("sem_open");
24775 return 1;
24776
24777 }
24778 res = sem_getvalue(a, &count);
24779 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024780 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024781 return res==-1 ? 1 : 0;
24782}
24783
24784_ACEOF
24785rm -f conftest$ac_exeext
24786if { (ac_try="$ac_link"
24787case "(($ac_try" in
24788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24789 *) ac_try_echo=$ac_try;;
24790esac
24791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24792 (eval "$ac_link") 2>&5
24793 ac_status=$?
24794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24796 { (case "(($ac_try" in
24797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24798 *) ac_try_echo=$ac_try;;
24799esac
24800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24801 (eval "$ac_try") 2>&5
24802 ac_status=$?
24803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24804 (exit $ac_status); }; }; then
24805 ac_cv_broken_sem_getvalue=no
24806else
24807 echo "$as_me: program exited with status $ac_status" >&5
24808echo "$as_me: failed program was:" >&5
24809sed 's/^/| /' conftest.$ac_ext >&5
24810
24811( exit $ac_status )
24812ac_cv_broken_sem_getvalue=yes
24813fi
24814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24815fi
24816
24817
24818
24819fi
24820
24821{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24822echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24823if test $ac_cv_broken_sem_getvalue = yes
24824then
24825
24826cat >>confdefs.h <<\_ACEOF
24827#define HAVE_BROKEN_SEM_GETVALUE 1
24828_ACEOF
24829
24830fi
24831
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024832# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024833{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24834echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024835# Check whether --enable-big-digits was given.
24836if test "${enable_big_digits+set}" = set; then
24837 enableval=$enable_big_digits; case $enable_big_digits in
24838yes)
24839 enable_big_digits=30 ;;
24840no)
24841 enable_big_digits=15 ;;
2484215|30)
24843 ;;
24844*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024845 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24846echo "$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 +000024847 { (exit 1); exit 1; }; } ;;
24848esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024849{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24850echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024851
24852cat >>confdefs.h <<_ACEOF
24853#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24854_ACEOF
24855
24856
24857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024858 { echo "$as_me:$LINENO: result: no value specified" >&5
24859echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024860fi
24861
24862
Guido van Rossumef2255b2000-03-10 22:30:29 +000024863# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024864if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24866echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024867if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024869fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024870{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24871echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024872else
Martin v. Löwis11437992002-04-12 09:54:03 +000024873 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024874{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24875echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024877/* confdefs.h. */
24878_ACEOF
24879cat confdefs.h >>conftest.$ac_ext
24880cat >>conftest.$ac_ext <<_ACEOF
24881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024882$ac_includes_default
24883#include <wchar.h>
24884_ACEOF
24885rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024886if { (ac_try="$ac_compile"
24887case "(($ac_try" in
24888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24889 *) ac_try_echo=$ac_try;;
24890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024894 grep -v '^ *+' conftest.er1 >conftest.err
24895 rm -f conftest.er1
24896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024898 (exit $ac_status); } && {
24899 test -z "$ac_c_werror_flag" ||
24900 test ! -s conftest.err
24901 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 ac_header_compiler=yes
24903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024905sed 's/^/| /' conftest.$ac_ext >&5
24906
Martin v. Löwiseba40652007-08-30 20:10:57 +000024907 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024909
24910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024911{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24912echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024913
24914# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024915{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24916echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024918/* confdefs.h. */
24919_ACEOF
24920cat confdefs.h >>conftest.$ac_ext
24921cat >>conftest.$ac_ext <<_ACEOF
24922/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024923#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024924_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024925if { (ac_try="$ac_cpp conftest.$ac_ext"
24926case "(($ac_try" in
24927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24928 *) ac_try_echo=$ac_try;;
24929esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024931 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024932 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024933 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024934 rm -f conftest.er1
24935 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024937 (exit $ac_status); } >/dev/null && {
24938 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24939 test ! -s conftest.err
24940 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024941 ac_header_preproc=yes
24942else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024944sed 's/^/| /' conftest.$ac_ext >&5
24945
Martin v. Löwis11437992002-04-12 09:54:03 +000024946 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024948
Martin v. Löwis11437992002-04-12 09:54:03 +000024949rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024950{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24951echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024952
24953# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024954case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24955 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024956 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24957echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24958 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24959echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024960 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024961 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024962 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024963 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24964echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24965 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24966echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24967 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24968echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24969 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24970echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24971 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24972echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24973 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24974echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024976## -------------------------------------- ##
24977## Report this to http://bugs.python.org/ ##
24978## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024979_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024980 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024981 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024983{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24984echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024985if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024987else
24988 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024989fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024990{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24991echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024992
24993fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024994if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024995
24996
24997cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024998#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024999_ACEOF
25000
Martin v. Löwisc45929e2002-04-06 10:10:49 +000025001 wchar_h="yes"
25002
Guido van Rossumef2255b2000-03-10 22:30:29 +000025003else
Martin v. Löwis11437992002-04-12 09:54:03 +000025004 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025005
25006fi
25007
Michael W. Hudson54241132001-12-07 15:38:26 +000025008
Martin v. Löwis11437992002-04-12 09:54:03 +000025009
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025010# determine wchar_t size
25011if test "$wchar_h" = yes
25012then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025013 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25014echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25015if test "${ac_cv_type_wchar_t+set}" = set; then
25016 echo $ECHO_N "(cached) $ECHO_C" >&6
25017else
25018 cat >conftest.$ac_ext <<_ACEOF
25019/* confdefs.h. */
25020_ACEOF
25021cat confdefs.h >>conftest.$ac_ext
25022cat >>conftest.$ac_ext <<_ACEOF
25023/* end confdefs.h. */
25024#include <wchar.h>
25025
25026typedef wchar_t ac__type_new_;
25027int
25028main ()
25029{
25030if ((ac__type_new_ *) 0)
25031 return 0;
25032if (sizeof (ac__type_new_))
25033 return 0;
25034 ;
25035 return 0;
25036}
25037_ACEOF
25038rm -f conftest.$ac_objext
25039if { (ac_try="$ac_compile"
25040case "(($ac_try" in
25041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25042 *) ac_try_echo=$ac_try;;
25043esac
25044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25045 (eval "$ac_compile") 2>conftest.er1
25046 ac_status=$?
25047 grep -v '^ *+' conftest.er1 >conftest.err
25048 rm -f conftest.er1
25049 cat conftest.err >&5
25050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25051 (exit $ac_status); } && {
25052 test -z "$ac_c_werror_flag" ||
25053 test ! -s conftest.err
25054 } && test -s conftest.$ac_objext; then
25055 ac_cv_type_wchar_t=yes
25056else
25057 echo "$as_me: failed program was:" >&5
25058sed 's/^/| /' conftest.$ac_ext >&5
25059
25060 ac_cv_type_wchar_t=no
25061fi
25062
25063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25064fi
25065{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25066echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25067
25068# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25071# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025072{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25073echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025074if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025075 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025076else
Martin v. Löwis11437992002-04-12 09:54:03 +000025077 if test "$cross_compiling" = yes; then
25078 # Depending upon the size, compute the lo and hi bounds.
25079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025080/* confdefs.h. */
25081_ACEOF
25082cat confdefs.h >>conftest.$ac_ext
25083cat >>conftest.$ac_ext <<_ACEOF
25084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025085#include <wchar.h>
25086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025087 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025088int
25089main ()
25090{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025091static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025092test_array [0] = 0
25093
25094 ;
25095 return 0;
25096}
25097_ACEOF
25098rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099if { (ac_try="$ac_compile"
25100case "(($ac_try" in
25101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25102 *) ac_try_echo=$ac_try;;
25103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025105 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025107 grep -v '^ *+' conftest.er1 >conftest.err
25108 rm -f conftest.er1
25109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025111 (exit $ac_status); } && {
25112 test -z "$ac_c_werror_flag" ||
25113 test ! -s conftest.err
25114 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025115 ac_lo=0 ac_mid=0
25116 while :; do
25117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025118/* confdefs.h. */
25119_ACEOF
25120cat confdefs.h >>conftest.$ac_ext
25121cat >>conftest.$ac_ext <<_ACEOF
25122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025123#include <wchar.h>
25124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025125 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025126int
25127main ()
25128{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025130test_array [0] = 0
25131
25132 ;
25133 return 0;
25134}
25135_ACEOF
25136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025137if { (ac_try="$ac_compile"
25138case "(($ac_try" in
25139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25140 *) ac_try_echo=$ac_try;;
25141esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025145 grep -v '^ *+' conftest.er1 >conftest.err
25146 rm -f conftest.er1
25147 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025149 (exit $ac_status); } && {
25150 test -z "$ac_c_werror_flag" ||
25151 test ! -s conftest.err
25152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025153 ac_hi=$ac_mid; break
25154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025156sed 's/^/| /' conftest.$ac_ext >&5
25157
Martin v. Löwiseba40652007-08-30 20:10:57 +000025158 ac_lo=`expr $ac_mid + 1`
25159 if test $ac_lo -le $ac_mid; then
25160 ac_lo= ac_hi=
25161 break
25162 fi
25163 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025165
25166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025167 done
25168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025170sed 's/^/| /' conftest.$ac_ext >&5
25171
Martin v. Löwiseba40652007-08-30 20:10:57 +000025172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025173/* confdefs.h. */
25174_ACEOF
25175cat confdefs.h >>conftest.$ac_ext
25176cat >>conftest.$ac_ext <<_ACEOF
25177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025178#include <wchar.h>
25179
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025180 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025181int
25182main ()
25183{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025185test_array [0] = 0
25186
25187 ;
25188 return 0;
25189}
25190_ACEOF
25191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025192if { (ac_try="$ac_compile"
25193case "(($ac_try" in
25194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25195 *) ac_try_echo=$ac_try;;
25196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025200 grep -v '^ *+' conftest.er1 >conftest.err
25201 rm -f conftest.er1
25202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204 (exit $ac_status); } && {
25205 test -z "$ac_c_werror_flag" ||
25206 test ! -s conftest.err
25207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025208 ac_hi=-1 ac_mid=-1
25209 while :; do
25210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025211/* confdefs.h. */
25212_ACEOF
25213cat confdefs.h >>conftest.$ac_ext
25214cat >>conftest.$ac_ext <<_ACEOF
25215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025216#include <wchar.h>
25217
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025218 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025219int
25220main ()
25221{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025223test_array [0] = 0
25224
25225 ;
25226 return 0;
25227}
25228_ACEOF
25229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025230if { (ac_try="$ac_compile"
25231case "(($ac_try" in
25232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25233 *) ac_try_echo=$ac_try;;
25234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025238 grep -v '^ *+' conftest.er1 >conftest.err
25239 rm -f conftest.er1
25240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025242 (exit $ac_status); } && {
25243 test -z "$ac_c_werror_flag" ||
25244 test ! -s conftest.err
25245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025246 ac_lo=$ac_mid; break
25247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025249sed 's/^/| /' conftest.$ac_ext >&5
25250
Martin v. Löwiseba40652007-08-30 20:10:57 +000025251 ac_hi=`expr '(' $ac_mid ')' - 1`
25252 if test $ac_mid -le $ac_hi; then
25253 ac_lo= ac_hi=
25254 break
25255 fi
25256 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025258
25259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 done
25261else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025263sed 's/^/| /' conftest.$ac_ext >&5
25264
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267
25268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025270
25271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025272# Binary search between lo and hi bounds.
25273while test "x$ac_lo" != "x$ac_hi"; do
25274 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025276/* confdefs.h. */
25277_ACEOF
25278cat confdefs.h >>conftest.$ac_ext
25279cat >>conftest.$ac_ext <<_ACEOF
25280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025281#include <wchar.h>
25282
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025283 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025284int
25285main ()
25286{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025288test_array [0] = 0
25289
25290 ;
25291 return 0;
25292}
25293_ACEOF
25294rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025295if { (ac_try="$ac_compile"
25296case "(($ac_try" in
25297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25298 *) ac_try_echo=$ac_try;;
25299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025303 grep -v '^ *+' conftest.er1 >conftest.err
25304 rm -f conftest.er1
25305 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025307 (exit $ac_status); } && {
25308 test -z "$ac_c_werror_flag" ||
25309 test ! -s conftest.err
25310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025311 ac_hi=$ac_mid
25312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025314sed 's/^/| /' conftest.$ac_ext >&5
25315
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025318
25319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025320done
25321case $ac_lo in
25322?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025323'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025325See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025326echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025327See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025328 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025329 else
25330 ac_cv_sizeof_wchar_t=0
25331 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025332esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025333else
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025335/* confdefs.h. */
25336_ACEOF
25337cat confdefs.h >>conftest.$ac_ext
25338cat >>conftest.$ac_ext <<_ACEOF
25339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025340#include <wchar.h>
25341
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025342 typedef wchar_t ac__type_sizeof_;
25343static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25344static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025345#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025346#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025347int
25348main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025349{
Martin v. Löwis11437992002-04-12 09:54:03 +000025350
25351 FILE *f = fopen ("conftest.val", "w");
25352 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025354 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025355 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025356 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025357 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025358 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025359 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025360 }
25361 else
25362 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025363 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025364 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025366 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025367 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025368 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025369
25370 ;
25371 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025372}
Martin v. Löwis11437992002-04-12 09:54:03 +000025373_ACEOF
25374rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025375if { (ac_try="$ac_link"
25376case "(($ac_try" in
25377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25378 *) ac_try_echo=$ac_try;;
25379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025381 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025382 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025385 { (case "(($ac_try" in
25386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25387 *) ac_try_echo=$ac_try;;
25388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025390 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025391 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025393 (exit $ac_status); }; }; then
25394 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025395else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025396 echo "$as_me: program exited with status $ac_status" >&5
25397echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025398sed 's/^/| /' conftest.$ac_ext >&5
25399
Martin v. Löwis11437992002-04-12 09:54:03 +000025400( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025401if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025402 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025403See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025404echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025405See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025406 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025407 else
25408 ac_cv_sizeof_wchar_t=0
25409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025411rm -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 +000025412fi
25413rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025414fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025415{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25416echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025417
25418
25419
Martin v. Löwis11437992002-04-12 09:54:03 +000025420cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025421#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025422_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025423
Michael W. Hudson54241132001-12-07 15:38:26 +000025424
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025425fi
25426
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025427{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25428echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025429have_ucs4_tcl=no
25430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025431/* confdefs.h. */
25432_ACEOF
25433cat confdefs.h >>conftest.$ac_ext
25434cat >>conftest.$ac_ext <<_ACEOF
25435/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025436
25437#include <tcl.h>
25438#if TCL_UTF_MAX != 6
25439# error "NOT UCS4_TCL"
25440#endif
25441int
25442main ()
25443{
25444
25445 ;
25446 return 0;
25447}
25448_ACEOF
25449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025450if { (ac_try="$ac_compile"
25451case "(($ac_try" in
25452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25453 *) ac_try_echo=$ac_try;;
25454esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025458 grep -v '^ *+' conftest.er1 >conftest.err
25459 rm -f conftest.er1
25460 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025462 (exit $ac_status); } && {
25463 test -z "$ac_c_werror_flag" ||
25464 test ! -s conftest.err
25465 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025466
25467
25468cat >>confdefs.h <<\_ACEOF
25469#define HAVE_UCS4_TCL 1
25470_ACEOF
25471
25472 have_ucs4_tcl=yes
25473
25474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025476sed 's/^/| /' conftest.$ac_ext >&5
25477
Martin v. Löwiseba40652007-08-30 20:10:57 +000025478
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025480
25481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025482{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25483echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025484
Skip Montanaro6dead952003-09-25 14:50:04 +000025485# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025486if test "$wchar_h" = yes
25487then
25488 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025489 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25490echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025491 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025492 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025493else
25494
25495 if test "$cross_compiling" = yes; then
25496 ac_cv_wchar_t_signed=yes
25497else
25498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025499/* confdefs.h. */
25500_ACEOF
25501cat confdefs.h >>conftest.$ac_ext
25502cat >>conftest.$ac_ext <<_ACEOF
25503/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025504
25505 #include <wchar.h>
25506 int main()
25507 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025508 /* Success: exit code 0 */
25509 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025510 }
25511
25512_ACEOF
25513rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025514if { (ac_try="$ac_link"
25515case "(($ac_try" in
25516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25517 *) ac_try_echo=$ac_try;;
25518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025520 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025521 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025523 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025524 { (case "(($ac_try" in
25525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25526 *) ac_try_echo=$ac_try;;
25527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025529 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025530 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025532 (exit $ac_status); }; }; then
25533 ac_cv_wchar_t_signed=yes
25534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025535 echo "$as_me: program exited with status $ac_status" >&5
25536echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025537sed 's/^/| /' conftest.$ac_ext >&5
25538
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025539( exit $ac_status )
25540ac_cv_wchar_t_signed=no
25541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025542rm -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 +000025543fi
25544
Martin v. Löwiseba40652007-08-30 20:10:57 +000025545
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025546fi
25547
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025548 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25549echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025550fi
25551
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025552{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25553echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025554# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025555if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025556 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025557else
25558 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025559fi
25560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025561
25562if test $enable_unicode = yes
25563then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025564 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025565 case "$have_ucs4_tcl" in
25566 yes) enable_unicode="ucs4"
25567 ;;
25568 *) enable_unicode="ucs2"
25569 ;;
25570 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025571fi
25572
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025573
25574
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025575case "$enable_unicode" in
25576ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025577 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025578#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025579_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025580
25581 ;;
25582ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025583 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025584#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025585_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025586
25587 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025588*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25589echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25590 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025591esac
25592
Michael W. Hudson54241132001-12-07 15:38:26 +000025593
Martin v. Löwis11437992002-04-12 09:54:03 +000025594
25595
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025596
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025597if test "$enable_unicode" = "no"
25598then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025599 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025600 { echo "$as_me:$LINENO: result: not used" >&5
25601echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025602else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025603 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025604
25605cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025606#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025607_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025608
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025609
25610 # wchar_t is only usable if it maps to an unsigned type
25611 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025612 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025613 then
25614 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025615
Martin v. Löwis11437992002-04-12 09:54:03 +000025616cat >>confdefs.h <<\_ACEOF
25617#define HAVE_USABLE_WCHAR_T 1
25618_ACEOF
25619
25620 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025621#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025622_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025623
25624 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25625 then
25626 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025627 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025628#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025629_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025630
25631 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25632 then
25633 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025634 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025635#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025636_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025637
25638 else
25639 PY_UNICODE_TYPE="no type found"
25640 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025641 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25642echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025643fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025644
25645# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025646{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25647echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025648if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025649 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025651 # See if sys/param.h defines the BYTE_ORDER macro.
25652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025653/* confdefs.h. */
25654_ACEOF
25655cat confdefs.h >>conftest.$ac_ext
25656cat >>conftest.$ac_ext <<_ACEOF
25657/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025658#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025659#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025660
Martin v. Löwis11437992002-04-12 09:54:03 +000025661int
25662main ()
25663{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025664#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25665 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25666 bogus endian macros
25667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025668
25669 ;
25670 return 0;
25671}
25672_ACEOF
25673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025674if { (ac_try="$ac_compile"
25675case "(($ac_try" in
25676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25677 *) ac_try_echo=$ac_try;;
25678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025682 grep -v '^ *+' conftest.er1 >conftest.err
25683 rm -f conftest.er1
25684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025686 (exit $ac_status); } && {
25687 test -z "$ac_c_werror_flag" ||
25688 test ! -s conftest.err
25689 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025690 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025692/* confdefs.h. */
25693_ACEOF
25694cat confdefs.h >>conftest.$ac_ext
25695cat >>conftest.$ac_ext <<_ACEOF
25696/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025697#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025698#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025699
Martin v. Löwis11437992002-04-12 09:54:03 +000025700int
25701main ()
25702{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025703#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025704 not big endian
25705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025706
25707 ;
25708 return 0;
25709}
25710_ACEOF
25711rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025712if { (ac_try="$ac_compile"
25713case "(($ac_try" in
25714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25715 *) ac_try_echo=$ac_try;;
25716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025720 grep -v '^ *+' conftest.er1 >conftest.err
25721 rm -f conftest.er1
25722 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025724 (exit $ac_status); } && {
25725 test -z "$ac_c_werror_flag" ||
25726 test ! -s conftest.err
25727 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025728 ac_cv_c_bigendian=yes
25729else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025731sed 's/^/| /' conftest.$ac_ext >&5
25732
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025735
25736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025739sed 's/^/| /' conftest.$ac_ext >&5
25740
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025741 # It does not; compile a test program.
25742if test "$cross_compiling" = yes; then
25743 # try to guess the endianness by grepping values into an object file
25744 ac_cv_c_bigendian=unknown
25745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025746/* confdefs.h. */
25747_ACEOF
25748cat confdefs.h >>conftest.$ac_ext
25749cat >>conftest.$ac_ext <<_ACEOF
25750/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025751short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25752short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25753void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25754short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25755short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25756void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025757int
25758main ()
25759{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025760 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025761 ;
25762 return 0;
25763}
25764_ACEOF
25765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025766if { (ac_try="$ac_compile"
25767case "(($ac_try" in
25768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25769 *) ac_try_echo=$ac_try;;
25770esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025774 grep -v '^ *+' conftest.er1 >conftest.err
25775 rm -f conftest.er1
25776 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025778 (exit $ac_status); } && {
25779 test -z "$ac_c_werror_flag" ||
25780 test ! -s conftest.err
25781 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025782 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025783 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025785if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25786 if test "$ac_cv_c_bigendian" = unknown; then
25787 ac_cv_c_bigendian=no
25788 else
25789 # finding both strings is unlikely to happen, but who knows?
25790 ac_cv_c_bigendian=unknown
25791 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025792fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025795sed 's/^/| /' conftest.$ac_ext >&5
25796
Martin v. Löwiseba40652007-08-30 20:10:57 +000025797
Martin v. Löwis11437992002-04-12 09:54:03 +000025798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025799
25800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025801else
25802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025803/* confdefs.h. */
25804_ACEOF
25805cat confdefs.h >>conftest.$ac_ext
25806cat >>conftest.$ac_ext <<_ACEOF
25807/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025808$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025809int
25810main ()
25811{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025813 /* Are we little or big endian? From Harbison&Steele. */
25814 union
25815 {
25816 long int l;
25817 char c[sizeof (long int)];
25818 } u;
25819 u.l = 1;
25820 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025821
25822 ;
25823 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025824}
Martin v. Löwis11437992002-04-12 09:54:03 +000025825_ACEOF
25826rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827if { (ac_try="$ac_link"
25828case "(($ac_try" in
25829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25830 *) ac_try_echo=$ac_try;;
25831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025833 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025834 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837 { (case "(($ac_try" in
25838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25839 *) ac_try_echo=$ac_try;;
25840esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025842 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025843 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025845 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025846 ac_cv_c_bigendian=no
25847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025848 echo "$as_me: program exited with status $ac_status" >&5
25849echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025850sed 's/^/| /' conftest.$ac_ext >&5
25851
Martin v. Löwis11437992002-04-12 09:54:03 +000025852( exit $ac_status )
25853ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025855rm -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 +000025856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025857
25858
Martin v. Löwis11437992002-04-12 09:54:03 +000025859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025860
25861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25862fi
25863{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25864echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25865case $ac_cv_c_bigendian in
25866 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025867
25868cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025869#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025870_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025871 ;;
25872 no)
25873 ;;
25874 *)
25875 { { echo "$as_me:$LINENO: error: unknown endianness
25876presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25877echo "$as_me: error: unknown endianness
25878presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025879 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025880esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025881
Michael W. Hudson54241132001-12-07 15:38:26 +000025882
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025883# Check whether right shifting a negative integer extends the sign bit
25884# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025885{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25886echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025887if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025888 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025889else
Martin v. Löwis11437992002-04-12 09:54:03 +000025890
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025891if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025892 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025893else
Martin v. Löwis11437992002-04-12 09:54:03 +000025894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025895/* confdefs.h. */
25896_ACEOF
25897cat confdefs.h >>conftest.$ac_ext
25898cat >>conftest.$ac_ext <<_ACEOF
25899/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025900
25901int main()
25902{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025903 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025904}
25905
Martin v. Löwis11437992002-04-12 09:54:03 +000025906_ACEOF
25907rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025908if { (ac_try="$ac_link"
25909case "(($ac_try" in
25910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25911 *) ac_try_echo=$ac_try;;
25912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025918 { (case "(($ac_try" in
25919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25920 *) ac_try_echo=$ac_try;;
25921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025924 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025926 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025927 ac_cv_rshift_extends_sign=yes
25928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025929 echo "$as_me: program exited with status $ac_status" >&5
25930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025931sed 's/^/| /' conftest.$ac_ext >&5
25932
Martin v. Löwis11437992002-04-12 09:54:03 +000025933( exit $ac_status )
25934ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025936rm -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 +000025937fi
25938
Martin v. Löwiseba40652007-08-30 20:10:57 +000025939
25940fi
25941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025942{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25943echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025944if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025945then
Martin v. Löwis11437992002-04-12 09:54:03 +000025946
25947cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025948#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025949_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025950
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025951fi
25952
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025953# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025954{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25955echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025956if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025958else
Martin v. Löwis11437992002-04-12 09:54:03 +000025959
25960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025961/* confdefs.h. */
25962_ACEOF
25963cat confdefs.h >>conftest.$ac_ext
25964cat >>conftest.$ac_ext <<_ACEOF
25965/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025966#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025967int
25968main ()
25969{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025970
25971 FILE *f = fopen("/dev/null", "r");
25972 flockfile(f);
25973 getc_unlocked(f);
25974 funlockfile(f);
25975
Martin v. Löwis11437992002-04-12 09:54:03 +000025976 ;
25977 return 0;
25978}
25979_ACEOF
25980rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025981if { (ac_try="$ac_link"
25982case "(($ac_try" in
25983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25984 *) ac_try_echo=$ac_try;;
25985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025987 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025989 grep -v '^ *+' conftest.er1 >conftest.err
25990 rm -f conftest.er1
25991 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025993 (exit $ac_status); } && {
25994 test -z "$ac_c_werror_flag" ||
25995 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025996 } && test -s conftest$ac_exeext &&
25997 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025998 ac_cv_have_getc_unlocked=yes
25999else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026001sed 's/^/| /' conftest.$ac_ext >&5
26002
Martin v. Löwiseba40652007-08-30 20:10:57 +000026003 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026005
26006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026007 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026008fi
26009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026010{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26011echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026012if test "$ac_cv_have_getc_unlocked" = yes
26013then
Martin v. Löwis11437992002-04-12 09:54:03 +000026014
26015cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026016#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026017_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026018
26019fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026020
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026021# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026022# save the value of LIBS so we don't actually link Python with readline
26023LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026024
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026025# On some systems we need to link readline to a termcap compatible
26026# library. NOTE: Keep the precedence of listed libraries synchronised
26027# with setup.py.
26028py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026029{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26030echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026031for py_libtermcap in "" ncursesw ncurses curses termcap; do
26032 if test -z "$py_libtermcap"; then
26033 READLINE_LIBS="-lreadline"
26034 else
26035 READLINE_LIBS="-lreadline -l$py_libtermcap"
26036 fi
26037 LIBS="$READLINE_LIBS $LIBS_no_readline"
26038 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026039/* confdefs.h. */
26040_ACEOF
26041cat confdefs.h >>conftest.$ac_ext
26042cat >>conftest.$ac_ext <<_ACEOF
26043/* end confdefs.h. */
26044
Martin v. Löwiseba40652007-08-30 20:10:57 +000026045/* Override any GCC internal prototype to avoid an error.
26046 Use char because int might match the return type of a GCC
26047 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026048#ifdef __cplusplus
26049extern "C"
26050#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026051char readline ();
26052int
26053main ()
26054{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026056 ;
26057 return 0;
26058}
26059_ACEOF
26060rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026061if { (ac_try="$ac_link"
26062case "(($ac_try" in
26063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26064 *) ac_try_echo=$ac_try;;
26065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026068 ac_status=$?
26069 grep -v '^ *+' conftest.er1 >conftest.err
26070 rm -f conftest.er1
26071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026073 (exit $ac_status); } && {
26074 test -z "$ac_c_werror_flag" ||
26075 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026076 } && test -s conftest$ac_exeext &&
26077 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026078 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026080 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026081sed 's/^/| /' conftest.$ac_ext >&5
26082
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026083
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026085
26086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026087 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026088 if test $py_cv_lib_readline = yes; then
26089 break
26090 fi
26091done
26092# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26093#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026094if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026095 { echo "$as_me:$LINENO: result: none" >&5
26096echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026098 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26099echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026100
26101cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026102#define HAVE_LIBREADLINE 1
26103_ACEOF
26104
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026105fi
26106
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026107# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026108{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26109echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026110if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026111 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026112else
26113 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026114LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026115cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026116/* confdefs.h. */
26117_ACEOF
26118cat confdefs.h >>conftest.$ac_ext
26119cat >>conftest.$ac_ext <<_ACEOF
26120/* end confdefs.h. */
26121
Martin v. Löwiseba40652007-08-30 20:10:57 +000026122/* Override any GCC internal prototype to avoid an error.
26123 Use char because int might match the return type of a GCC
26124 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026125#ifdef __cplusplus
26126extern "C"
26127#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026128char rl_callback_handler_install ();
26129int
26130main ()
26131{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026132return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026133 ;
26134 return 0;
26135}
26136_ACEOF
26137rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026138if { (ac_try="$ac_link"
26139case "(($ac_try" in
26140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26141 *) ac_try_echo=$ac_try;;
26142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026144 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026146 grep -v '^ *+' conftest.er1 >conftest.err
26147 rm -f conftest.er1
26148 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026150 (exit $ac_status); } && {
26151 test -z "$ac_c_werror_flag" ||
26152 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026153 } && test -s conftest$ac_exeext &&
26154 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026155 ac_cv_lib_readline_rl_callback_handler_install=yes
26156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026157 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026158sed 's/^/| /' conftest.$ac_ext >&5
26159
Martin v. Löwiseba40652007-08-30 20:10:57 +000026160 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026162
26163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026164 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026165LIBS=$ac_check_lib_save_LIBS
26166fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026167{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26168echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26169if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026170
26171cat >>confdefs.h <<\_ACEOF
26172#define HAVE_RL_CALLBACK 1
26173_ACEOF
26174
26175fi
26176
26177
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026178# check for readline 2.2
26179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026180/* confdefs.h. */
26181_ACEOF
26182cat confdefs.h >>conftest.$ac_ext
26183cat >>conftest.$ac_ext <<_ACEOF
26184/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026185#include <readline/readline.h>
26186_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026187if { (ac_try="$ac_cpp conftest.$ac_ext"
26188case "(($ac_try" in
26189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26190 *) ac_try_echo=$ac_try;;
26191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026193 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026194 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026195 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026196 rm -f conftest.er1
26197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026199 (exit $ac_status); } >/dev/null && {
26200 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26201 test ! -s conftest.err
26202 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026203 have_readline=yes
26204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026206sed 's/^/| /' conftest.$ac_ext >&5
26207
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026208 have_readline=no
26209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026210
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026211rm -f conftest.err conftest.$ac_ext
26212if test $have_readline = yes
26213then
26214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026215/* confdefs.h. */
26216_ACEOF
26217cat confdefs.h >>conftest.$ac_ext
26218cat >>conftest.$ac_ext <<_ACEOF
26219/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026220#include <readline/readline.h>
26221
26222_ACEOF
26223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026224 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026225
26226cat >>confdefs.h <<\_ACEOF
26227#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26228_ACEOF
26229
26230fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026231rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026232
26233 cat >conftest.$ac_ext <<_ACEOF
26234/* confdefs.h. */
26235_ACEOF
26236cat confdefs.h >>conftest.$ac_ext
26237cat >>conftest.$ac_ext <<_ACEOF
26238/* end confdefs.h. */
26239#include <readline/readline.h>
26240
26241_ACEOF
26242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26243 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26244
26245cat >>confdefs.h <<\_ACEOF
26246#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26247_ACEOF
26248
26249fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026250rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026251
26252fi
26253
Martin v. Löwis0daad592001-09-30 21:09:59 +000026254# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026255{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26256echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026257if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026259else
Martin v. Löwis11437992002-04-12 09:54:03 +000026260 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026261LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026263/* confdefs.h. */
26264_ACEOF
26265cat confdefs.h >>conftest.$ac_ext
26266cat >>conftest.$ac_ext <<_ACEOF
26267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026268
Martin v. Löwiseba40652007-08-30 20:10:57 +000026269/* Override any GCC internal prototype to avoid an error.
26270 Use char because int might match the return type of a GCC
26271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026272#ifdef __cplusplus
26273extern "C"
26274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026275char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026276int
26277main ()
26278{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026280 ;
26281 return 0;
26282}
26283_ACEOF
26284rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026285if { (ac_try="$ac_link"
26286case "(($ac_try" in
26287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26288 *) ac_try_echo=$ac_try;;
26289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026293 grep -v '^ *+' conftest.er1 >conftest.err
26294 rm -f conftest.er1
26295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026297 (exit $ac_status); } && {
26298 test -z "$ac_c_werror_flag" ||
26299 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026300 } && test -s conftest$ac_exeext &&
26301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026302 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026305sed 's/^/| /' conftest.$ac_ext >&5
26306
Martin v. Löwiseba40652007-08-30 20:10:57 +000026307 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026309
26310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026312LIBS=$ac_check_lib_save_LIBS
26313fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026314{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26315echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26316if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026317
Martin v. Löwis11437992002-04-12 09:54:03 +000026318cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026319#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026320_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026321
Martin v. Löwis0daad592001-09-30 21:09:59 +000026322fi
26323
Michael W. Hudson54241132001-12-07 15:38:26 +000026324
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026325# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026326{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26327echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026328if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026329 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026330else
26331 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026332LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026333cat >conftest.$ac_ext <<_ACEOF
26334/* confdefs.h. */
26335_ACEOF
26336cat confdefs.h >>conftest.$ac_ext
26337cat >>conftest.$ac_ext <<_ACEOF
26338/* end confdefs.h. */
26339
26340/* Override any GCC internal prototype to avoid an error.
26341 Use char because int might match the return type of a GCC
26342 builtin and then its argument prototype would still apply. */
26343#ifdef __cplusplus
26344extern "C"
26345#endif
26346char rl_completion_display_matches_hook ();
26347int
26348main ()
26349{
26350return rl_completion_display_matches_hook ();
26351 ;
26352 return 0;
26353}
26354_ACEOF
26355rm -f conftest.$ac_objext conftest$ac_exeext
26356if { (ac_try="$ac_link"
26357case "(($ac_try" in
26358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26359 *) ac_try_echo=$ac_try;;
26360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026362 (eval "$ac_link") 2>conftest.er1
26363 ac_status=$?
26364 grep -v '^ *+' conftest.er1 >conftest.err
26365 rm -f conftest.er1
26366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026368 (exit $ac_status); } && {
26369 test -z "$ac_c_werror_flag" ||
26370 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026371 } && test -s conftest$ac_exeext &&
26372 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026373 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026375 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026376sed 's/^/| /' conftest.$ac_ext >&5
26377
26378 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26379fi
26380
26381rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26382 conftest$ac_exeext conftest.$ac_ext
26383LIBS=$ac_check_lib_save_LIBS
26384fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026385{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26386echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26387if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026388
26389cat >>confdefs.h <<\_ACEOF
26390#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26391_ACEOF
26392
26393fi
26394
26395
Martin v. Löwis0daad592001-09-30 21:09:59 +000026396# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026397{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26398echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026399if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026400 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026401else
Martin v. Löwis11437992002-04-12 09:54:03 +000026402 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026403LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026405/* confdefs.h. */
26406_ACEOF
26407cat confdefs.h >>conftest.$ac_ext
26408cat >>conftest.$ac_ext <<_ACEOF
26409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026410
Martin v. Löwiseba40652007-08-30 20:10:57 +000026411/* Override any GCC internal prototype to avoid an error.
26412 Use char because int might match the return type of a GCC
26413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026414#ifdef __cplusplus
26415extern "C"
26416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026417char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026418int
26419main ()
26420{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026421return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026422 ;
26423 return 0;
26424}
26425_ACEOF
26426rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026427if { (ac_try="$ac_link"
26428case "(($ac_try" in
26429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26430 *) ac_try_echo=$ac_try;;
26431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026433 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026435 grep -v '^ *+' conftest.er1 >conftest.err
26436 rm -f conftest.er1
26437 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026439 (exit $ac_status); } && {
26440 test -z "$ac_c_werror_flag" ||
26441 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442 } && test -s conftest$ac_exeext &&
26443 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026444 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026447sed 's/^/| /' conftest.$ac_ext >&5
26448
Martin v. Löwiseba40652007-08-30 20:10:57 +000026449 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026451
26452rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026454LIBS=$ac_check_lib_save_LIBS
26455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026456{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26457echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26458if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026459
Martin v. Löwis11437992002-04-12 09:54:03 +000026460cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026461#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026462_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026463
Guido van Rossum353ae582001-07-10 16:45:32 +000026464fi
26465
Jack Jansendd19cf82001-12-06 22:36:17 +000026466
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026467# also in readline 4.2
26468cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026469/* confdefs.h. */
26470_ACEOF
26471cat confdefs.h >>conftest.$ac_ext
26472cat >>conftest.$ac_ext <<_ACEOF
26473/* end confdefs.h. */
26474#include <readline/readline.h>
26475_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026476if { (ac_try="$ac_cpp conftest.$ac_ext"
26477case "(($ac_try" in
26478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26479 *) ac_try_echo=$ac_try;;
26480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026482 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026483 ac_status=$?
26484 grep -v '^ *+' conftest.er1 >conftest.err
26485 rm -f conftest.er1
26486 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026488 (exit $ac_status); } >/dev/null && {
26489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26490 test ! -s conftest.err
26491 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026492 have_readline=yes
26493else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026494 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026495sed 's/^/| /' conftest.$ac_ext >&5
26496
26497 have_readline=no
26498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026499
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026500rm -f conftest.err conftest.$ac_ext
26501if test $have_readline = yes
26502then
26503 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026504/* confdefs.h. */
26505_ACEOF
26506cat confdefs.h >>conftest.$ac_ext
26507cat >>conftest.$ac_ext <<_ACEOF
26508/* end confdefs.h. */
26509#include <readline/readline.h>
26510
26511_ACEOF
26512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26513 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26514
26515cat >>confdefs.h <<\_ACEOF
26516#define HAVE_RL_CATCH_SIGNAL 1
26517_ACEOF
26518
26519fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026520rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026521
26522fi
26523
Martin v. Löwis82bca632006-02-10 20:49:30 +000026524# End of readline checks: restore LIBS
26525LIBS=$LIBS_no_readline
26526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026527{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26528echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026529if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026530 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026531else
Martin v. Löwis11437992002-04-12 09:54:03 +000026532
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026533if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026534 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026535else
Martin v. Löwis11437992002-04-12 09:54:03 +000026536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026537/* confdefs.h. */
26538_ACEOF
26539cat confdefs.h >>conftest.$ac_ext
26540cat >>conftest.$ac_ext <<_ACEOF
26541/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026542
26543int main()
26544{
26545 int val1 = nice(1);
26546 if (val1 != -1 && val1 == nice(2))
26547 exit(0);
26548 exit(1);
26549}
26550
Martin v. Löwis11437992002-04-12 09:54:03 +000026551_ACEOF
26552rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026553if { (ac_try="$ac_link"
26554case "(($ac_try" in
26555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26556 *) ac_try_echo=$ac_try;;
26557esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026559 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026560 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026563 { (case "(($ac_try" in
26564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26565 *) ac_try_echo=$ac_try;;
26566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026568 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026569 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026571 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026572 ac_cv_broken_nice=yes
26573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026574 echo "$as_me: program exited with status $ac_status" >&5
26575echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026576sed 's/^/| /' conftest.$ac_ext >&5
26577
Martin v. Löwis11437992002-04-12 09:54:03 +000026578( exit $ac_status )
26579ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026581rm -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 +000026582fi
26583
Martin v. Löwiseba40652007-08-30 20:10:57 +000026584
26585fi
26586
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026587{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26588echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026589if test "$ac_cv_broken_nice" = yes
26590then
Martin v. Löwis11437992002-04-12 09:54:03 +000026591
26592cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026593#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026594_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026595
26596fi
26597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026598{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26599echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026600if test "${ac_cv_broken_poll+set}" = set; then
26601 echo $ECHO_N "(cached) $ECHO_C" >&6
26602else
26603 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026604 ac_cv_broken_poll=no
26605else
26606 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026607/* confdefs.h. */
26608_ACEOF
26609cat confdefs.h >>conftest.$ac_ext
26610cat >>conftest.$ac_ext <<_ACEOF
26611/* end confdefs.h. */
26612
26613#include <poll.h>
26614
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026615int main()
26616{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026617 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026618 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026619
26620 close (42);
26621
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026622 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026623 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026624 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026625 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026626 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026627 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026628 return 1;
26629}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026630
26631_ACEOF
26632rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026633if { (ac_try="$ac_link"
26634case "(($ac_try" in
26635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26636 *) ac_try_echo=$ac_try;;
26637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026639 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026640 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026642 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026643 { (case "(($ac_try" in
26644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26645 *) ac_try_echo=$ac_try;;
26646esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026648 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026649 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026651 (exit $ac_status); }; }; then
26652 ac_cv_broken_poll=yes
26653else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026654 echo "$as_me: program exited with status $ac_status" >&5
26655echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026656sed 's/^/| /' conftest.$ac_ext >&5
26657
26658( exit $ac_status )
26659ac_cv_broken_poll=no
26660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026661rm -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 +000026662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026663
26664
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026665fi
26666
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026667{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26668echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026669if test "$ac_cv_broken_poll" = yes
26670then
26671
26672cat >>confdefs.h <<\_ACEOF
26673#define HAVE_BROKEN_POLL 1
26674_ACEOF
26675
26676fi
26677
Brett Cannon43802422005-02-10 20:48:03 +000026678# 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 +000026679# (which is not required by ISO C or UNIX spec) and/or if we support
26680# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026681{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26682echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026683if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026684 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026685else
26686 cat >conftest.$ac_ext <<_ACEOF
26687/* confdefs.h. */
26688_ACEOF
26689cat confdefs.h >>conftest.$ac_ext
26690cat >>conftest.$ac_ext <<_ACEOF
26691/* end confdefs.h. */
26692#include <sys/types.h>
26693#include <$ac_cv_struct_tm>
26694
26695
26696int
26697main ()
26698{
26699static struct tm ac_aggr;
26700if (ac_aggr.tm_zone)
26701return 0;
26702 ;
26703 return 0;
26704}
26705_ACEOF
26706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026707if { (ac_try="$ac_compile"
26708case "(($ac_try" in
26709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26710 *) ac_try_echo=$ac_try;;
26711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026713 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026714 ac_status=$?
26715 grep -v '^ *+' conftest.er1 >conftest.err
26716 rm -f conftest.er1
26717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026719 (exit $ac_status); } && {
26720 test -z "$ac_c_werror_flag" ||
26721 test ! -s conftest.err
26722 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026723 ac_cv_member_struct_tm_tm_zone=yes
26724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026725 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026726sed 's/^/| /' conftest.$ac_ext >&5
26727
Martin v. Löwiseba40652007-08-30 20:10:57 +000026728 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026729/* confdefs.h. */
26730_ACEOF
26731cat confdefs.h >>conftest.$ac_ext
26732cat >>conftest.$ac_ext <<_ACEOF
26733/* end confdefs.h. */
26734#include <sys/types.h>
26735#include <$ac_cv_struct_tm>
26736
26737
26738int
26739main ()
26740{
26741static struct tm ac_aggr;
26742if (sizeof ac_aggr.tm_zone)
26743return 0;
26744 ;
26745 return 0;
26746}
26747_ACEOF
26748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026749if { (ac_try="$ac_compile"
26750case "(($ac_try" in
26751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26752 *) ac_try_echo=$ac_try;;
26753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026755 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026756 ac_status=$?
26757 grep -v '^ *+' conftest.er1 >conftest.err
26758 rm -f conftest.er1
26759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026761 (exit $ac_status); } && {
26762 test -z "$ac_c_werror_flag" ||
26763 test ! -s conftest.err
26764 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026765 ac_cv_member_struct_tm_tm_zone=yes
26766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026767 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026768sed 's/^/| /' conftest.$ac_ext >&5
26769
Martin v. Löwiseba40652007-08-30 20:10:57 +000026770 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026772
26773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026775
26776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026777fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026778{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26779echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26780if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026781
26782cat >>confdefs.h <<_ACEOF
26783#define HAVE_STRUCT_TM_TM_ZONE 1
26784_ACEOF
26785
26786
26787fi
26788
26789if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26790
26791cat >>confdefs.h <<\_ACEOF
26792#define HAVE_TM_ZONE 1
26793_ACEOF
26794
26795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026796 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26797echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026798if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026799 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026800else
26801 cat >conftest.$ac_ext <<_ACEOF
26802/* confdefs.h. */
26803_ACEOF
26804cat confdefs.h >>conftest.$ac_ext
26805cat >>conftest.$ac_ext <<_ACEOF
26806/* end confdefs.h. */
26807#include <time.h>
26808
26809int
26810main ()
26811{
26812#ifndef tzname
26813 (void) tzname;
26814#endif
26815
26816 ;
26817 return 0;
26818}
26819_ACEOF
26820rm -f conftest.$ac_objext
26821if { (ac_try="$ac_compile"
26822case "(($ac_try" in
26823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26824 *) ac_try_echo=$ac_try;;
26825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026827 (eval "$ac_compile") 2>conftest.er1
26828 ac_status=$?
26829 grep -v '^ *+' conftest.er1 >conftest.err
26830 rm -f conftest.er1
26831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026833 (exit $ac_status); } && {
26834 test -z "$ac_c_werror_flag" ||
26835 test ! -s conftest.err
26836 } && test -s conftest.$ac_objext; then
26837 ac_cv_have_decl_tzname=yes
26838else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026839 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026840sed 's/^/| /' conftest.$ac_ext >&5
26841
26842 ac_cv_have_decl_tzname=no
26843fi
26844
26845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26846fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026847{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26848echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26849if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026850
26851cat >>confdefs.h <<_ACEOF
26852#define HAVE_DECL_TZNAME 1
26853_ACEOF
26854
26855
26856else
26857 cat >>confdefs.h <<_ACEOF
26858#define HAVE_DECL_TZNAME 0
26859_ACEOF
26860
26861
26862fi
26863
26864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026865 { echo "$as_me:$LINENO: checking for tzname" >&5
26866echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026867if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026868 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026869else
26870 cat >conftest.$ac_ext <<_ACEOF
26871/* confdefs.h. */
26872_ACEOF
26873cat confdefs.h >>conftest.$ac_ext
26874cat >>conftest.$ac_ext <<_ACEOF
26875/* end confdefs.h. */
26876#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026877#if !HAVE_DECL_TZNAME
26878extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026879#endif
26880
26881int
26882main ()
26883{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026884return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026885 ;
26886 return 0;
26887}
26888_ACEOF
26889rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026890if { (ac_try="$ac_link"
26891case "(($ac_try" in
26892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26893 *) ac_try_echo=$ac_try;;
26894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026896 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026897 ac_status=$?
26898 grep -v '^ *+' conftest.er1 >conftest.err
26899 rm -f conftest.er1
26900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026902 (exit $ac_status); } && {
26903 test -z "$ac_c_werror_flag" ||
26904 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026905 } && test -s conftest$ac_exeext &&
26906 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026907 ac_cv_var_tzname=yes
26908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026909 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026910sed 's/^/| /' conftest.$ac_ext >&5
26911
Martin v. Löwiseba40652007-08-30 20:10:57 +000026912 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026914
26915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026916 conftest$ac_exeext conftest.$ac_ext
26917fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026918{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26919echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026920 if test $ac_cv_var_tzname = yes; then
26921
26922cat >>confdefs.h <<\_ACEOF
26923#define HAVE_TZNAME 1
26924_ACEOF
26925
26926 fi
26927fi
26928
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026929
Martin v. Löwis1d459062005-03-14 21:23:33 +000026930# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026931{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26932echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026933if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026935else
26936
26937if test "$cross_compiling" = yes; then
26938 ac_cv_working_tzset=no
26939else
26940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026941/* confdefs.h. */
26942_ACEOF
26943cat confdefs.h >>conftest.$ac_ext
26944cat >>conftest.$ac_ext <<_ACEOF
26945/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026946
26947#include <stdlib.h>
26948#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026949#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026950
26951#if HAVE_TZNAME
26952extern char *tzname[];
26953#endif
26954
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026955int main()
26956{
Brett Cannon18367812003-09-19 00:59:16 +000026957 /* Note that we need to ensure that not only does tzset(3)
26958 do 'something' with localtime, but it works as documented
26959 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026960 This includes making sure that tzname is set properly if
26961 tm->tm_zone does not exist since it is the alternative way
26962 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026963
26964 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026965 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026966 */
26967
Martin v. Löwis1d459062005-03-14 21:23:33 +000026968 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026969 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26970
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026971 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026972 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026973 if (localtime(&groundhogday)->tm_hour != 0)
26974 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026975#if HAVE_TZNAME
26976 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26977 if (strcmp(tzname[0], "UTC") ||
26978 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26979 exit(1);
26980#endif
Brett Cannon18367812003-09-19 00:59:16 +000026981
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026982 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026983 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026984 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026985 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026986#if HAVE_TZNAME
26987 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26988 exit(1);
26989#endif
Brett Cannon18367812003-09-19 00:59:16 +000026990
26991 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26992 tzset();
26993 if (localtime(&groundhogday)->tm_hour != 11)
26994 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026995#if HAVE_TZNAME
26996 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26997 exit(1);
26998#endif
26999
27000#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000027001 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27002 exit(1);
27003 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27004 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027005#endif
Brett Cannon18367812003-09-19 00:59:16 +000027006
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027007 exit(0);
27008}
27009
27010_ACEOF
27011rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027012if { (ac_try="$ac_link"
27013case "(($ac_try" in
27014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27015 *) ac_try_echo=$ac_try;;
27016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027018 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027019 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027022 { (case "(($ac_try" in
27023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27024 *) ac_try_echo=$ac_try;;
27025esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027027 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027028 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027030 (exit $ac_status); }; }; then
27031 ac_cv_working_tzset=yes
27032else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027033 echo "$as_me: program exited with status $ac_status" >&5
27034echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027035sed 's/^/| /' conftest.$ac_ext >&5
27036
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027037( exit $ac_status )
27038ac_cv_working_tzset=no
27039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027040rm -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 +000027041fi
27042
Martin v. Löwiseba40652007-08-30 20:10:57 +000027043
27044fi
27045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027046{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27047echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027048if test "$ac_cv_working_tzset" = yes
27049then
27050
27051cat >>confdefs.h <<\_ACEOF
27052#define HAVE_WORKING_TZSET 1
27053_ACEOF
27054
27055fi
27056
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027057# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027058{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27059echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027060if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027061 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027062else
27063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027064/* confdefs.h. */
27065_ACEOF
27066cat confdefs.h >>conftest.$ac_ext
27067cat >>conftest.$ac_ext <<_ACEOF
27068/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027069#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027070int
27071main ()
27072{
27073
27074struct stat st;
27075st.st_mtim.tv_nsec = 1;
27076
27077 ;
27078 return 0;
27079}
27080_ACEOF
27081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027082if { (ac_try="$ac_compile"
27083case "(($ac_try" in
27084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27085 *) ac_try_echo=$ac_try;;
27086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027090 grep -v '^ *+' conftest.er1 >conftest.err
27091 rm -f conftest.er1
27092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027094 (exit $ac_status); } && {
27095 test -z "$ac_c_werror_flag" ||
27096 test ! -s conftest.err
27097 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027098 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027101sed 's/^/| /' conftest.$ac_ext >&5
27102
Martin v. Löwiseba40652007-08-30 20:10:57 +000027103 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027104fi
27105
Martin v. Löwiseba40652007-08-30 20:10:57 +000027106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27107fi
27108
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027109{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27110echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027111if test "$ac_cv_stat_tv_nsec" = yes
27112then
27113
27114cat >>confdefs.h <<\_ACEOF
27115#define HAVE_STAT_TV_NSEC 1
27116_ACEOF
27117
27118fi
27119
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027120# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027121{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27122echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027123if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027125else
27126 cat >conftest.$ac_ext <<_ACEOF
27127/* confdefs.h. */
27128_ACEOF
27129cat confdefs.h >>conftest.$ac_ext
27130cat >>conftest.$ac_ext <<_ACEOF
27131/* end confdefs.h. */
27132#include <sys/stat.h>
27133int
27134main ()
27135{
27136
27137struct stat st;
27138st.st_mtimespec.tv_nsec = 1;
27139
27140 ;
27141 return 0;
27142}
27143_ACEOF
27144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027145if { (ac_try="$ac_compile"
27146case "(($ac_try" in
27147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27148 *) ac_try_echo=$ac_try;;
27149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027152 ac_status=$?
27153 grep -v '^ *+' conftest.er1 >conftest.err
27154 rm -f conftest.er1
27155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027157 (exit $ac_status); } && {
27158 test -z "$ac_c_werror_flag" ||
27159 test ! -s conftest.err
27160 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027161 ac_cv_stat_tv_nsec2=yes
27162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027163 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027164sed 's/^/| /' conftest.$ac_ext >&5
27165
Martin v. Löwiseba40652007-08-30 20:10:57 +000027166 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027167fi
27168
Martin v. Löwiseba40652007-08-30 20:10:57 +000027169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27170fi
27171
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027172{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27173echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027174if test "$ac_cv_stat_tv_nsec2" = yes
27175then
27176
27177cat >>confdefs.h <<\_ACEOF
27178#define HAVE_STAT_TV_NSEC2 1
27179_ACEOF
27180
27181fi
27182
Jack Jansen666b1e72001-10-31 12:11:48 +000027183# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027184{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27185echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027186if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027187 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027188else
Martin v. Löwis11437992002-04-12 09:54:03 +000027189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027190/* confdefs.h. */
27191_ACEOF
27192cat confdefs.h >>conftest.$ac_ext
27193cat >>conftest.$ac_ext <<_ACEOF
27194/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027195#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027196int
27197main ()
27198{
Jack Jansen666b1e72001-10-31 12:11:48 +000027199
27200 int rtn;
27201 rtn = mvwdelch(0,0,0);
27202
Martin v. Löwis11437992002-04-12 09:54:03 +000027203 ;
27204 return 0;
27205}
27206_ACEOF
27207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027208if { (ac_try="$ac_compile"
27209case "(($ac_try" in
27210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27211 *) ac_try_echo=$ac_try;;
27212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027216 grep -v '^ *+' conftest.er1 >conftest.err
27217 rm -f conftest.er1
27218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027220 (exit $ac_status); } && {
27221 test -z "$ac_c_werror_flag" ||
27222 test ! -s conftest.err
27223 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027224 ac_cv_mvwdelch_is_expression=yes
27225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027227sed 's/^/| /' conftest.$ac_ext >&5
27228
Martin v. Löwiseba40652007-08-30 20:10:57 +000027229 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027230fi
27231
Martin v. Löwiseba40652007-08-30 20:10:57 +000027232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27233fi
27234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027235{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27236echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027237
27238if test "$ac_cv_mvwdelch_is_expression" = yes
27239then
Martin v. Löwis11437992002-04-12 09:54:03 +000027240
27241cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027242#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027243_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027244
27245fi
27246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027247{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27248echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027249if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027251else
Martin v. Löwis11437992002-04-12 09:54:03 +000027252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027253/* confdefs.h. */
27254_ACEOF
27255cat confdefs.h >>conftest.$ac_ext
27256cat >>conftest.$ac_ext <<_ACEOF
27257/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027258#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027259int
27260main ()
27261{
Jack Jansen666b1e72001-10-31 12:11:48 +000027262
27263 WINDOW *w;
27264 w->_flags = 0;
27265
Martin v. Löwis11437992002-04-12 09:54:03 +000027266 ;
27267 return 0;
27268}
27269_ACEOF
27270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027271if { (ac_try="$ac_compile"
27272case "(($ac_try" in
27273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27274 *) ac_try_echo=$ac_try;;
27275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027279 grep -v '^ *+' conftest.er1 >conftest.err
27280 rm -f conftest.er1
27281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027283 (exit $ac_status); } && {
27284 test -z "$ac_c_werror_flag" ||
27285 test ! -s conftest.err
27286 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027287 ac_cv_window_has_flags=yes
27288else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027290sed 's/^/| /' conftest.$ac_ext >&5
27291
Martin v. Löwiseba40652007-08-30 20:10:57 +000027292 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027293fi
27294
Martin v. Löwiseba40652007-08-30 20:10:57 +000027295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27296fi
27297
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027298{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27299echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027300
Jack Jansen666b1e72001-10-31 12:11:48 +000027301
27302if test "$ac_cv_window_has_flags" = yes
27303then
Martin v. Löwis11437992002-04-12 09:54:03 +000027304
27305cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027306#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027307_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027308
27309fi
27310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027311{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27312echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027313cat >conftest.$ac_ext <<_ACEOF
27314/* confdefs.h. */
27315_ACEOF
27316cat confdefs.h >>conftest.$ac_ext
27317cat >>conftest.$ac_ext <<_ACEOF
27318/* end confdefs.h. */
27319#include <curses.h>
27320int
27321main ()
27322{
27323void *x=is_term_resized
27324 ;
27325 return 0;
27326}
27327_ACEOF
27328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027329if { (ac_try="$ac_compile"
27330case "(($ac_try" in
27331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27332 *) ac_try_echo=$ac_try;;
27333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027335 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027336 ac_status=$?
27337 grep -v '^ *+' conftest.er1 >conftest.err
27338 rm -f conftest.er1
27339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027341 (exit $ac_status); } && {
27342 test -z "$ac_c_werror_flag" ||
27343 test ! -s conftest.err
27344 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027345
27346cat >>confdefs.h <<\_ACEOF
27347#define HAVE_CURSES_IS_TERM_RESIZED 1
27348_ACEOF
27349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027350 { echo "$as_me:$LINENO: result: yes" >&5
27351echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027352else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027353 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027354sed 's/^/| /' conftest.$ac_ext >&5
27355
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027356 { echo "$as_me:$LINENO: result: no" >&5
27357echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027358
27359fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027360
Martin v. Löwiseba40652007-08-30 20:10:57 +000027361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027363{ echo "$as_me:$LINENO: checking for resize_term" >&5
27364echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027365cat >conftest.$ac_ext <<_ACEOF
27366/* confdefs.h. */
27367_ACEOF
27368cat confdefs.h >>conftest.$ac_ext
27369cat >>conftest.$ac_ext <<_ACEOF
27370/* end confdefs.h. */
27371#include <curses.h>
27372int
27373main ()
27374{
27375void *x=resize_term
27376 ;
27377 return 0;
27378}
27379_ACEOF
27380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027381if { (ac_try="$ac_compile"
27382case "(($ac_try" in
27383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27384 *) ac_try_echo=$ac_try;;
27385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027387 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027388 ac_status=$?
27389 grep -v '^ *+' conftest.er1 >conftest.err
27390 rm -f conftest.er1
27391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027393 (exit $ac_status); } && {
27394 test -z "$ac_c_werror_flag" ||
27395 test ! -s conftest.err
27396 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027397
27398cat >>confdefs.h <<\_ACEOF
27399#define HAVE_CURSES_RESIZE_TERM 1
27400_ACEOF
27401
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027402 { echo "$as_me:$LINENO: result: yes" >&5
27403echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027405 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027406sed 's/^/| /' conftest.$ac_ext >&5
27407
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027408 { echo "$as_me:$LINENO: result: no" >&5
27409echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027410
27411fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027412
Martin v. Löwiseba40652007-08-30 20:10:57 +000027413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27414
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027415{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27416echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027417cat >conftest.$ac_ext <<_ACEOF
27418/* confdefs.h. */
27419_ACEOF
27420cat confdefs.h >>conftest.$ac_ext
27421cat >>conftest.$ac_ext <<_ACEOF
27422/* end confdefs.h. */
27423#include <curses.h>
27424int
27425main ()
27426{
27427void *x=resizeterm
27428 ;
27429 return 0;
27430}
27431_ACEOF
27432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027433if { (ac_try="$ac_compile"
27434case "(($ac_try" in
27435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27436 *) ac_try_echo=$ac_try;;
27437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027439 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027440 ac_status=$?
27441 grep -v '^ *+' conftest.er1 >conftest.err
27442 rm -f conftest.er1
27443 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027445 (exit $ac_status); } && {
27446 test -z "$ac_c_werror_flag" ||
27447 test ! -s conftest.err
27448 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027449
27450cat >>confdefs.h <<\_ACEOF
27451#define HAVE_CURSES_RESIZETERM 1
27452_ACEOF
27453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027454 { echo "$as_me:$LINENO: result: yes" >&5
27455echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027457 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027458sed 's/^/| /' conftest.$ac_ext >&5
27459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027460 { echo "$as_me:$LINENO: result: no" >&5
27461echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027462
27463fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027464
Martin v. Löwiseba40652007-08-30 20:10:57 +000027465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027467{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27468echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027469
27470if test -r /dev/ptmx
27471then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027472 { echo "$as_me:$LINENO: result: yes" >&5
27473echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027474
27475cat >>confdefs.h <<\_ACEOF
27476#define HAVE_DEV_PTMX 1
27477_ACEOF
27478
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027480 { echo "$as_me:$LINENO: result: no" >&5
27481echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027482fi
27483
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027484{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27485echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027486
27487if test -r /dev/ptc
27488then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027489 { echo "$as_me:$LINENO: result: yes" >&5
27490echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027491
27492cat >>confdefs.h <<\_ACEOF
27493#define HAVE_DEV_PTC 1
27494_ACEOF
27495
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027497 { echo "$as_me:$LINENO: result: no" >&5
27498echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027499fi
27500
Mark Dickinson82864d12009-11-15 16:18:58 +000027501if test "$have_long_long" = yes
27502then
27503 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27504echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27505 if test "${ac_cv_have_long_long_format+set}" = set; then
27506 echo $ECHO_N "(cached) $ECHO_C" >&6
27507else
27508 if test "$cross_compiling" = yes; then
27509 ac_cv_have_long_long_format=no
27510else
27511 cat >conftest.$ac_ext <<_ACEOF
27512/* confdefs.h. */
27513_ACEOF
27514cat confdefs.h >>conftest.$ac_ext
27515cat >>conftest.$ac_ext <<_ACEOF
27516/* end confdefs.h. */
27517
27518 #include <stdio.h>
27519 #include <stddef.h>
27520 #include <string.h>
27521
27522 #ifdef HAVE_SYS_TYPES_H
27523 #include <sys/types.h>
27524 #endif
27525
27526 int main()
27527 {
27528 char buffer[256];
27529
27530 if (sprintf(buffer, "%lld", (long long)123) < 0)
27531 return 1;
27532 if (strcmp(buffer, "123"))
27533 return 1;
27534
27535 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27536 return 1;
27537 if (strcmp(buffer, "-123"))
27538 return 1;
27539
27540 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27541 return 1;
27542 if (strcmp(buffer, "123"))
27543 return 1;
27544
27545 return 0;
27546 }
27547
27548_ACEOF
27549rm -f conftest$ac_exeext
27550if { (ac_try="$ac_link"
27551case "(($ac_try" in
27552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27553 *) ac_try_echo=$ac_try;;
27554esac
27555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27556 (eval "$ac_link") 2>&5
27557 ac_status=$?
27558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27560 { (case "(($ac_try" in
27561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27562 *) ac_try_echo=$ac_try;;
27563esac
27564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27565 (eval "$ac_try") 2>&5
27566 ac_status=$?
27567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27568 (exit $ac_status); }; }; then
27569 ac_cv_have_long_long_format=yes
27570else
27571 echo "$as_me: program exited with status $ac_status" >&5
27572echo "$as_me: failed program was:" >&5
27573sed 's/^/| /' conftest.$ac_ext >&5
27574
27575( exit $ac_status )
27576ac_cv_have_long_long_format=no
27577fi
27578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27579fi
27580
27581
27582
27583fi
27584
27585 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27586echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27587fi
27588
Mark Dickinson5ce84742009-12-31 20:48:04 +000027589if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027590then
27591
27592cat >>confdefs.h <<\_ACEOF
27593#define PY_FORMAT_LONG_LONG "ll"
27594_ACEOF
27595
27596fi
27597
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027598if test $ac_sys_system = Darwin
27599then
27600 LIBS="$LIBS -framework CoreFoundation"
27601fi
27602
Mark Dickinson82864d12009-11-15 16:18:58 +000027603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027604{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27605echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027606if test "${ac_cv_have_size_t_format+set}" = set; then
27607 echo $ECHO_N "(cached) $ECHO_C" >&6
27608else
27609 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027610 ac_cv_have_size_t_format="cross -- assuming yes"
27611
Brett Cannon09d12362006-05-11 05:11:33 +000027612else
27613 cat >conftest.$ac_ext <<_ACEOF
27614/* confdefs.h. */
27615_ACEOF
27616cat confdefs.h >>conftest.$ac_ext
27617cat >>conftest.$ac_ext <<_ACEOF
27618/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027619
Brett Cannon09d12362006-05-11 05:11:33 +000027620#include <stdio.h>
27621#include <stddef.h>
27622#include <string.h>
27623
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027624#ifdef HAVE_SYS_TYPES_H
27625#include <sys/types.h>
27626#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027627
27628#ifdef HAVE_SSIZE_T
27629typedef ssize_t Py_ssize_t;
27630#elif SIZEOF_VOID_P == SIZEOF_LONG
27631typedef long Py_ssize_t;
27632#else
27633typedef int Py_ssize_t;
27634#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027635
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027636int main()
27637{
27638 char buffer[256];
27639
Brett Cannon09d12362006-05-11 05:11:33 +000027640 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27641 return 1;
27642
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027643 if (strcmp(buffer, "123"))
27644 return 1;
27645
27646 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27647 return 1;
27648
27649 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027650 return 1;
27651
27652 return 0;
27653}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027654
Brett Cannon09d12362006-05-11 05:11:33 +000027655_ACEOF
27656rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027657if { (ac_try="$ac_link"
27658case "(($ac_try" in
27659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27660 *) ac_try_echo=$ac_try;;
27661esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027663 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027664 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027667 { (case "(($ac_try" in
27668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27669 *) ac_try_echo=$ac_try;;
27670esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027672 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027673 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027675 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027676 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027677else
27678 echo "$as_me: program exited with status $ac_status" >&5
27679echo "$as_me: failed program was:" >&5
27680sed 's/^/| /' conftest.$ac_ext >&5
27681
27682( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027683ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027684fi
27685rm -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 +000027686fi
27687
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027688
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027689fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027690{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27691echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027692if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027693
27694cat >>confdefs.h <<\_ACEOF
27695#define PY_FORMAT_SIZE_T "z"
27696_ACEOF
27697
27698fi
27699
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027700{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27701echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027702if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027704else
Martin v. Löwis11437992002-04-12 09:54:03 +000027705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027706/* confdefs.h. */
27707_ACEOF
27708cat confdefs.h >>conftest.$ac_ext
27709cat >>conftest.$ac_ext <<_ACEOF
27710/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027711
27712#ifdef HAVE_SYS_TYPES_H
27713#include <sys/types.h>
27714#endif
27715#ifdef HAVE_SYS_SOCKET_H
27716#include <sys/socket.h>
27717#endif
27718
27719
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027720typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027721int
27722main ()
27723{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027724if ((ac__type_new_ *) 0)
27725 return 0;
27726if (sizeof (ac__type_new_))
27727 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027728 ;
27729 return 0;
27730}
27731_ACEOF
27732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027733if { (ac_try="$ac_compile"
27734case "(($ac_try" in
27735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27736 *) ac_try_echo=$ac_try;;
27737esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027741 grep -v '^ *+' conftest.er1 >conftest.err
27742 rm -f conftest.er1
27743 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027745 (exit $ac_status); } && {
27746 test -z "$ac_c_werror_flag" ||
27747 test ! -s conftest.err
27748 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027749 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027750else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027752sed 's/^/| /' conftest.$ac_ext >&5
27753
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027754 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756
27757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027758fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027759{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27760echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27761if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027762 :
27763else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027764
Martin v. Löwis01c04012002-11-11 14:58:44 +000027765cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027766#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027767_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027768
27769fi
27770
Michael W. Hudson54241132001-12-07 15:38:26 +000027771
Michael W. Hudson54241132001-12-07 15:38:26 +000027772
27773
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027774for h in `(cd $srcdir;echo Python/thread_*.h)`
27775do
27776 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27777done
27778
Michael W. Hudson54241132001-12-07 15:38:26 +000027779
Neal Norwitzd24499d2005-12-18 21:36:39 +000027780SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027781{ echo "$as_me:$LINENO: checking for build directories" >&5
27782echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027783for dir in $SRCDIRS; do
27784 if test ! -d $dir; then
27785 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027786 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027787done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027788{ echo "$as_me:$LINENO: result: done" >&5
27789echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027790
Guido van Rossum627b2d71993-12-24 10:39:16 +000027791# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027792ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027793
Martin v. Löwis11437992002-04-12 09:54:03 +000027794cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027795# This file is a shell script that caches the results of configure
27796# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027797# scripts and configure runs, see configure's option --config-cache.
27798# It is not useful on other systems. If it contains results you don't
27799# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027800#
Martin v. Löwis11437992002-04-12 09:54:03 +000027801# config.status only pays attention to the cache file if you give it
27802# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027803#
Skip Montanaro6dead952003-09-25 14:50:04 +000027804# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027805# loading this file, other *unset* `ac_cv_foo' will be assigned the
27806# following values.
27807
27808_ACEOF
27809
Guido van Rossumf78abae1997-01-21 22:02:36 +000027810# The following way of writing the cache mishandles newlines in values,
27811# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027812# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027813# Ultrix sh set writes to stderr and can't be redirected directly,
27814# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027815(
27816 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27817 eval ac_val=\$$ac_var
27818 case $ac_val in #(
27819 *${as_nl}*)
27820 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027821 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27822echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027823 esac
27824 case $ac_var in #(
27825 _ | IFS | as_nl) ;; #(
27826 *) $as_unset $ac_var ;;
27827 esac ;;
27828 esac
27829 done
27830
Martin v. Löwis11437992002-04-12 09:54:03 +000027831 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027832 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27833 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027834 # `set' does not quote correctly, so add quotes (double-quote
27835 # substitution turns \\\\ into \\, and sed turns \\ into \).
27836 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027837 "s/'/'\\\\''/g;
27838 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027839 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027840 *)
27841 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027842 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027844 esac |
27845 sort
27846) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027847 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027848 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027849 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027850 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27852 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027853 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27854 :end' >>confcache
27855if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27856 if test -w "$cache_file"; then
27857 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027858 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27859echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027860 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027861 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027862 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27863echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027864 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027865fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027866rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027868test "x$prefix" = xNONE && prefix=$ac_default_prefix
27869# Let make expand exec_prefix.
27870test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027872DEFS=-DHAVE_CONFIG_H
27873
Skip Montanaro6dead952003-09-25 14:50:04 +000027874ac_libobjs=
27875ac_ltlibobjs=
27876for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27877 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027878 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027879 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027880 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27881 # will be set to the directory where LIBOBJS objects are built.
27882 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27883 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027884done
27885LIBOBJS=$ac_libobjs
27886
27887LTLIBOBJS=$ac_ltlibobjs
27888
27889
Martin v. Löwis11437992002-04-12 09:54:03 +000027890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027891: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027892ac_clean_files_save=$ac_clean_files
27893ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027894{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27895echo "$as_me: creating $CONFIG_STATUS" >&6;}
27896cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027897#! $SHELL
27898# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027899# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027900# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027901# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027902
Martin v. Löwis11437992002-04-12 09:54:03 +000027903debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027904ac_cs_recheck=false
27905ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027906SHELL=\${CONFIG_SHELL-$SHELL}
27907_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027909cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027910## --------------------- ##
27911## M4sh Initialization. ##
27912## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027913
Martin v. Löwiseba40652007-08-30 20:10:57 +000027914# Be more Bourne compatible
27915DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027916if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27917 emulate sh
27918 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027919 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027920 # is contrary to our usage. Disable this feature.
27921 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027922 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027923else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027924 case `(set -o) 2>/dev/null` in
27925 *posix*) set -o posix ;;
27926esac
27927
Martin v. Löwis11437992002-04-12 09:54:03 +000027928fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027929
Skip Montanaro6dead952003-09-25 14:50:04 +000027930
Martin v. Löwis11437992002-04-12 09:54:03 +000027931
27932
Martin v. Löwiseba40652007-08-30 20:10:57 +000027933# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027934# Avoid depending upon Character Ranges.
27935as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27936as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27937as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27938as_cr_digits='0123456789'
27939as_cr_alnum=$as_cr_Letters$as_cr_digits
27940
27941# The user is always right.
27942if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027943 echo "#! /bin/sh" >conf$$.sh
27944 echo "exit 0" >>conf$$.sh
27945 chmod +x conf$$.sh
27946 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27947 PATH_SEPARATOR=';'
27948 else
27949 PATH_SEPARATOR=:
27950 fi
27951 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027952fi
27953
Martin v. Löwiseba40652007-08-30 20:10:57 +000027954# Support unset when possible.
27955if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27956 as_unset=unset
27957else
27958 as_unset=false
27959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027960
Martin v. Löwiseba40652007-08-30 20:10:57 +000027961
27962# IFS
27963# We need space, tab and new line, in precisely that order. Quoting is
27964# there to prevent editors from complaining about space-tab.
27965# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27966# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027967as_nl='
27968'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027969IFS=" "" $as_nl"
27970
27971# Find who we are. Look in the path if we contain no directory separator.
27972case $0 in
27973 *[\\/]* ) as_myself=$0 ;;
27974 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027975for as_dir in $PATH
27976do
27977 IFS=$as_save_IFS
27978 test -z "$as_dir" && as_dir=.
27979 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27980done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027981IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027982
Martin v. Löwiseba40652007-08-30 20:10:57 +000027983 ;;
27984esac
27985# We did not find ourselves, most probably we were run as `sh COMMAND'
27986# in which case we are not to be found in the path.
27987if test "x$as_myself" = x; then
27988 as_myself=$0
27989fi
27990if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027991 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027992 { (exit 1); exit 1; }
27993fi
27994
27995# Work around bugs in pre-3.0 UWIN ksh.
27996for as_var in ENV MAIL MAILPATH
27997do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27998done
27999PS1='$ '
28000PS2='> '
28001PS4='+ '
28002
28003# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028004for as_var in \
28005 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28006 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28007 LC_TELEPHONE LC_TIME
28008do
28009 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28010 eval $as_var=C; export $as_var
28011 else
28012 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28013 fi
28014done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028015
28016# Required to use basename.
28017if expr a : '\(a\)' >/dev/null 2>&1 &&
28018 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28019 as_expr=expr
28020else
28021 as_expr=false
28022fi
28023
28024if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28025 as_basename=basename
28026else
28027 as_basename=false
28028fi
28029
28030
28031# Name of the executable.
28032as_me=`$as_basename -- "$0" ||
28033$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28034 X"$0" : 'X\(//\)$' \| \
28035 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028036echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028037 sed '/^.*\/\([^/][^/]*\)\/*$/{
28038 s//\1/
28039 q
28040 }
28041 /^X\/\(\/\/\)$/{
28042 s//\1/
28043 q
28044 }
28045 /^X\/\(\/\).*/{
28046 s//\1/
28047 q
28048 }
28049 s/.*/./; q'`
28050
28051# CDPATH.
28052$as_unset CDPATH
28053
28054
28055
Martin v. Löwis11437992002-04-12 09:54:03 +000028056 as_lineno_1=$LINENO
28057 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028058 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028059 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028060
Martin v. Löwis11437992002-04-12 09:54:03 +000028061 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28062 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028063 # line-number line after each line using $LINENO; the second 'sed'
28064 # does the real work. The second script uses 'N' to pair each
28065 # line-number line with the line containing $LINENO, and appends
28066 # trailing '-' during substitution so that $LINENO is not a special
28067 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028068 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028069 # scripts with optimization help from Paolo Bonzini. Blame Lee
28070 # E. McMahon (1931-1989) for sed's syntax. :-)
28071 sed -n '
28072 p
28073 /[$]LINENO/=
28074 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028075 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028076 s/[$]LINENO.*/&-/
28077 t lineno
28078 b
28079 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028080 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028081 :loop
28082 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028083 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028084 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028085 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028086 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028087 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028088 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028089
Martin v. Löwis11437992002-04-12 09:54:03 +000028090 # Don't try to exec as it changes $[0], causing all sort of problems
28091 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028092 # original and so on. Autoconf is especially sensitive to this).
28093 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028094 # Exit status is that of the last command.
28095 exit
28096}
28097
28098
Martin v. Löwiseba40652007-08-30 20:10:57 +000028099if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28100 as_dirname=dirname
28101else
28102 as_dirname=false
28103fi
28104
28105ECHO_C= ECHO_N= ECHO_T=
28106case `echo -n x` in
28107-n*)
28108 case `echo 'x\c'` in
28109 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28110 *) ECHO_C='\c';;
28111 esac;;
28112*)
28113 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028115
Martin v. Löwiseba40652007-08-30 20:10:57 +000028116if expr a : '\(a\)' >/dev/null 2>&1 &&
28117 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028118 as_expr=expr
28119else
28120 as_expr=false
28121fi
28122
28123rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028124if test -d conf$$.dir; then
28125 rm -f conf$$.dir/conf$$.file
28126else
28127 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028128 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028130echo >conf$$.file
28131if ln -s conf$$.file conf$$ 2>/dev/null; then
28132 as_ln_s='ln -s'
28133 # ... but there are two gotchas:
28134 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28135 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28136 # In both cases, we have to default to `cp -p'.
28137 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028138 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028139elif ln conf$$.file conf$$ 2>/dev/null; then
28140 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028141else
28142 as_ln_s='cp -p'
28143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028144rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28145rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028146
Skip Montanaro6dead952003-09-25 14:50:04 +000028147if mkdir -p . 2>/dev/null; then
28148 as_mkdir_p=:
28149else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028150 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028151 as_mkdir_p=false
28152fi
28153
Martin v. Löwiseba40652007-08-30 20:10:57 +000028154if test -x / >/dev/null 2>&1; then
28155 as_test_x='test -x'
28156else
28157 if ls -dL / >/dev/null 2>&1; then
28158 as_ls_L_option=L
28159 else
28160 as_ls_L_option=
28161 fi
28162 as_test_x='
28163 eval sh -c '\''
28164 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028165 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028166 else
28167 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028168 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028169 esac;
28170 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28171 ???[sx]*):;;*)false;;esac;fi
28172 '\'' sh
28173 '
28174fi
28175as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028176
28177# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028178as_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 +000028179
28180# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028181as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028182
28183
Martin v. Löwis11437992002-04-12 09:54:03 +000028184exec 6>&1
28185
Martin v. Löwiseba40652007-08-30 20:10:57 +000028186# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028187# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028188# values after options handling.
28189ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028190This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028191generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028192
28193 CONFIG_FILES = $CONFIG_FILES
28194 CONFIG_HEADERS = $CONFIG_HEADERS
28195 CONFIG_LINKS = $CONFIG_LINKS
28196 CONFIG_COMMANDS = $CONFIG_COMMANDS
28197 $ $0 $@
28198
Martin v. Löwiseba40652007-08-30 20:10:57 +000028199on `(hostname || uname -n) 2>/dev/null | sed 1q`
28200"
28201
Martin v. Löwis11437992002-04-12 09:54:03 +000028202_ACEOF
28203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028204cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028205# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028206config_files="$ac_config_files"
28207config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028208
Martin v. Löwiseba40652007-08-30 20:10:57 +000028209_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028210
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028211cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028212ac_cs_usage="\
28213\`$as_me' instantiates files from templates according to the
28214current configuration.
28215
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028216Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028217
28218 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028219 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028220 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028221 -d, --debug don't remove temporary files
28222 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028223 --file=FILE[:TEMPLATE]
28224 instantiate the configuration file FILE
28225 --header=FILE[:TEMPLATE]
28226 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028227
28228Configuration files:
28229$config_files
28230
28231Configuration headers:
28232$config_headers
28233
28234Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028235
Martin v. Löwiseba40652007-08-30 20:10:57 +000028236_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028237cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028238ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028239python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028240configured by $0, generated by GNU Autoconf 2.61,
28241 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028243Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028244This config.status script is free software; the Free Software Foundation
28245gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028246
28247ac_pwd='$ac_pwd'
28248srcdir='$srcdir'
28249INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028250_ACEOF
28251
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028252cat >>$CONFIG_STATUS <<\_ACEOF
28253# If no file are specified by the user, then we need to provide default
28254# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028255ac_need_defaults=:
28256while test $# != 0
28257do
28258 case $1 in
28259 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028260 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28261 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028262 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028263 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028264 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028265 ac_option=$1
28266 ac_optarg=$2
28267 ac_shift=shift
28268 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028269 esac
28270
Skip Montanaro6dead952003-09-25 14:50:04 +000028271 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028272 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028273 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28274 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028275 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028276 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028277 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028278 debug=: ;;
28279 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028280 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028281 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028282 ac_need_defaults=false;;
28283 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028284 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028285 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028286 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028287 --he | --h)
28288 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028289 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028290Try \`$0 --help' for more information." >&2
28291 { (exit 1); exit 1; }; };;
28292 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028293 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28295 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28296 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028297
28298 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028299 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028300Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028301 { (exit 1); exit 1; }; } ;;
28302
Martin v. Löwiseba40652007-08-30 20:10:57 +000028303 *) ac_config_targets="$ac_config_targets $1"
28304 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028305
28306 esac
28307 shift
28308done
28309
Skip Montanaro6dead952003-09-25 14:50:04 +000028310ac_configure_extra_args=
28311
28312if $ac_cs_silent; then
28313 exec 6>/dev/null
28314 ac_configure_extra_args="$ac_configure_extra_args --silent"
28315fi
28316
28317_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028318cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028319if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028320 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28321 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028322 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028323 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028324fi
28325
Martin v. Löwis11437992002-04-12 09:54:03 +000028326_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028327cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028328exec 5>>config.log
28329{
28330 echo
28331 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28332## Running $as_me. ##
28333_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028334 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028335} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028336
Martin v. Löwiseba40652007-08-30 20:10:57 +000028337_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028338cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028339_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028340
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028341cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028342
28343# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028344for ac_config_target in $ac_config_targets
28345do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028346 case $ac_config_target in
28347 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28348 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28349 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28350 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028351 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28352 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028353 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28354 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028355 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028357 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28358echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028359 { (exit 1); exit 1; }; };;
28360 esac
28361done
28362
Martin v. Löwiseba40652007-08-30 20:10:57 +000028363
Martin v. Löwis11437992002-04-12 09:54:03 +000028364# If the user did not use the arguments to specify the items to instantiate,
28365# then the envvar interface is used. Set only those that are not.
28366# We use the long form for the default assignment because of an extremely
28367# bizarre bug on SunOS 4.1.3.
28368if $ac_need_defaults; then
28369 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28370 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28371fi
28372
Skip Montanaro6dead952003-09-25 14:50:04 +000028373# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028374# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028375# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028376# Hook for its removal unless debugging.
28377# Note that there is a small window in which the directory will not be cleaned:
28378# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028379$debug ||
28380{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028381 tmp=
28382 trap 'exit_status=$?
28383 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28384' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028385 trap '{ (exit 1); exit 1; }' 1 2 13 15
28386}
Martin v. Löwis11437992002-04-12 09:54:03 +000028387# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028388
Martin v. Löwis11437992002-04-12 09:54:03 +000028389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028390 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028391 test -n "$tmp" && test -d "$tmp"
28392} ||
28393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028394 tmp=./conf$$-$RANDOM
28395 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028396} ||
28397{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028398 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028399 { (exit 1); exit 1; }
28400}
28401
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028402#
28403# Set up the sed scripts for CONFIG_FILES section.
28404#
28405
28406# No need to generate the scripts if there are no CONFIG_FILES.
28407# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028408if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028409
28410_ACEOF
28411
Martin v. Löwiseba40652007-08-30 20:10:57 +000028412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028413
Martin v. Löwiseba40652007-08-30 20:10:57 +000028414ac_delim='%!_!# '
28415for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028416 cat >conf$$subs.sed <<_ACEOF
28417SHELL!$SHELL$ac_delim
28418PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28419PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28420PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28421PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28422PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28423PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28424exec_prefix!$exec_prefix$ac_delim
28425prefix!$prefix$ac_delim
28426program_transform_name!$program_transform_name$ac_delim
28427bindir!$bindir$ac_delim
28428sbindir!$sbindir$ac_delim
28429libexecdir!$libexecdir$ac_delim
28430datarootdir!$datarootdir$ac_delim
28431datadir!$datadir$ac_delim
28432sysconfdir!$sysconfdir$ac_delim
28433sharedstatedir!$sharedstatedir$ac_delim
28434localstatedir!$localstatedir$ac_delim
28435includedir!$includedir$ac_delim
28436oldincludedir!$oldincludedir$ac_delim
28437docdir!$docdir$ac_delim
28438infodir!$infodir$ac_delim
28439htmldir!$htmldir$ac_delim
28440dvidir!$dvidir$ac_delim
28441pdfdir!$pdfdir$ac_delim
28442psdir!$psdir$ac_delim
28443libdir!$libdir$ac_delim
28444localedir!$localedir$ac_delim
28445mandir!$mandir$ac_delim
28446DEFS!$DEFS$ac_delim
28447ECHO_C!$ECHO_C$ac_delim
28448ECHO_N!$ECHO_N$ac_delim
28449ECHO_T!$ECHO_T$ac_delim
28450LIBS!$LIBS$ac_delim
28451build_alias!$build_alias$ac_delim
28452host_alias!$host_alias$ac_delim
28453target_alias!$target_alias$ac_delim
28454VERSION!$VERSION$ac_delim
28455SOVERSION!$SOVERSION$ac_delim
28456CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28457UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28458ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028459LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028460PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28461PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28462PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28463PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28464PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28465FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28466FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28467FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28468FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28469FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28470MACHDEP!$MACHDEP$ac_delim
28471SGI_ABI!$SGI_ABI$ac_delim
28472EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28473EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28474CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28475EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28476CC!$CC$ac_delim
28477CFLAGS!$CFLAGS$ac_delim
28478LDFLAGS!$LDFLAGS$ac_delim
28479CPPFLAGS!$CPPFLAGS$ac_delim
28480ac_ct_CC!$ac_ct_CC$ac_delim
28481EXEEXT!$EXEEXT$ac_delim
28482OBJEXT!$OBJEXT$ac_delim
28483CXX!$CXX$ac_delim
28484MAINCC!$MAINCC$ac_delim
28485CPP!$CPP$ac_delim
28486GREP!$GREP$ac_delim
28487EGREP!$EGREP$ac_delim
28488BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28489LIBRARY!$LIBRARY$ac_delim
28490LDLIBRARY!$LDLIBRARY$ac_delim
28491DLLLIBRARY!$DLLLIBRARY$ac_delim
28492BLDLIBRARY!$BLDLIBRARY$ac_delim
28493LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28494INSTSONAME!$INSTSONAME$ac_delim
28495RUNSHARED!$RUNSHARED$ac_delim
28496LINKCC!$LINKCC$ac_delim
28497GNULD!$GNULD$ac_delim
28498RANLIB!$RANLIB$ac_delim
28499AR!$AR$ac_delim
28500ARFLAGS!$ARFLAGS$ac_delim
28501SVNVERSION!$SVNVERSION$ac_delim
28502INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28503INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28504INSTALL_DATA!$INSTALL_DATA$ac_delim
28505LN!$LN$ac_delim
28506OPT!$OPT$ac_delim
28507BASECFLAGS!$BASECFLAGS$ac_delim
28508UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28509OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28510LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28511SO!$SO$ac_delim
28512LDSHARED!$LDSHARED$ac_delim
28513BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028514_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028516 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 +000028517 break
28518 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028519 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28520echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028521 { (exit 1); exit 1; }; }
28522 else
28523 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028524 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028525done
28526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028527ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28528if test -n "$ac_eof"; then
28529 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28530 ac_eof=`expr $ac_eof + 1`
28531fi
28532
28533cat >>$CONFIG_STATUS <<_ACEOF
28534cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28535/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028536_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028537sed '
28538s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28539s/^/s,@/; s/!/@,|#_!!_#|/
28540:n
28541t n
28542s/'"$ac_delim"'$/,g/; t
28543s/$/\\/; p
28544N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28545' >>$CONFIG_STATUS <conf$$subs.sed
28546rm -f conf$$subs.sed
28547cat >>$CONFIG_STATUS <<_ACEOF
28548CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028549_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028550
28551
28552ac_delim='%!_!# '
28553for ac_last_try in false false false false false :; do
28554 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028555CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028556LINKFORSHARED!$LINKFORSHARED$ac_delim
28557CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28558SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028559PKG_CONFIG!$PKG_CONFIG$ac_delim
28560LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028561USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28562SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28563USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28564LDLAST!$LDLAST$ac_delim
28565THREADOBJ!$THREADOBJ$ac_delim
28566DLINCLDIR!$DLINCLDIR$ac_delim
28567DYNLOADFILE!$DYNLOADFILE$ac_delim
28568MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28569TRUE!$TRUE$ac_delim
28570LIBOBJS!$LIBOBJS$ac_delim
28571HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28572HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28573HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28574HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28575HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28576LIBM!$LIBM$ac_delim
28577LIBC!$LIBC$ac_delim
28578UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28579THREADHEADERS!$THREADHEADERS$ac_delim
28580SRCDIRS!$SRCDIRS$ac_delim
28581LTLIBOBJS!$LTLIBOBJS$ac_delim
28582_ACEOF
28583
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028584 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028585 break
28586 elif $ac_last_try; then
28587 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28588echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028589 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028590 else
28591 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28592 fi
28593done
28594
28595ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28596if test -n "$ac_eof"; then
28597 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28598 ac_eof=`expr $ac_eof + 1`
28599fi
28600
28601cat >>$CONFIG_STATUS <<_ACEOF
28602cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28603/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028604_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028605sed '
28606s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28607s/^/s,@/; s/!/@,|#_!!_#|/
28608:n
28609t n
28610s/'"$ac_delim"'$/,g/; t
28611s/$/\\/; p
28612N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28613' >>$CONFIG_STATUS <conf$$subs.sed
28614rm -f conf$$subs.sed
28615cat >>$CONFIG_STATUS <<_ACEOF
28616:end
28617s/|#_!!_#|//g
28618CEOF$ac_eof
28619_ACEOF
28620
Martin v. Löwiseba40652007-08-30 20:10:57 +000028621
28622# VPATH may cause trouble with some makes, so we remove $(srcdir),
28623# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28624# trailing colons and then remove the whole line if VPATH becomes empty
28625# (actually we leave an empty line to preserve line numbers).
28626if test "x$srcdir" = x.; then
28627 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28628s/:*\$(srcdir):*/:/
28629s/:*\${srcdir}:*/:/
28630s/:*@srcdir@:*/:/
28631s/^\([^=]*=[ ]*\):*/\1/
28632s/:*$//
28633s/^[^=]*=[ ]*$//
28634}'
28635fi
28636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028637cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028638fi # test -n "$CONFIG_FILES"
28639
Martin v. Löwiseba40652007-08-30 20:10:57 +000028640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028641for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028642do
28643 case $ac_tag in
28644 :[FHLC]) ac_mode=$ac_tag; continue;;
28645 esac
28646 case $ac_mode$ac_tag in
28647 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028648 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28649echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028650 { (exit 1); exit 1; }; };;
28651 :[FH]-) ac_tag=-:-;;
28652 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28653 esac
28654 ac_save_IFS=$IFS
28655 IFS=:
28656 set x $ac_tag
28657 IFS=$ac_save_IFS
28658 shift
28659 ac_file=$1
28660 shift
28661
28662 case $ac_mode in
28663 :L) ac_source=$1;;
28664 :[FH])
28665 ac_file_inputs=
28666 for ac_f
28667 do
28668 case $ac_f in
28669 -) ac_f="$tmp/stdin";;
28670 *) # Look for the file first in the build tree, then in the source tree
28671 # (if the path is not absolute). The absolute path cannot be DOS-style,
28672 # because $ac_f cannot contain `:'.
28673 test -f "$ac_f" ||
28674 case $ac_f in
28675 [\\/$]*) false;;
28676 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28677 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028678 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28679echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028680 { (exit 1); exit 1; }; };;
28681 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028682 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028683 done
28684
28685 # Let's still pretend it is `configure' which instantiates (i.e., don't
28686 # use $as_me), people would be surprised to read:
28687 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028688 configure_input="Generated from "`IFS=:
28689 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028690 if test x"$ac_file" != x-; then
28691 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028692 { echo "$as_me:$LINENO: creating $ac_file" >&5
28693echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028694 fi
28695
28696 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028697 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028698 esac
28699 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028700 esac
28701
Martin v. Löwiseba40652007-08-30 20:10:57 +000028702 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028703$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028704 X"$ac_file" : 'X\(//\)[^/]' \| \
28705 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028706 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028707echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028708 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28709 s//\1/
28710 q
28711 }
28712 /^X\(\/\/\)[^/].*/{
28713 s//\1/
28714 q
28715 }
28716 /^X\(\/\/\)$/{
28717 s//\1/
28718 q
28719 }
28720 /^X\(\/\).*/{
28721 s//\1/
28722 q
28723 }
28724 s/.*/./; q'`
28725 { as_dir="$ac_dir"
28726 case $as_dir in #(
28727 -*) as_dir=./$as_dir;;
28728 esac
28729 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028730 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028731 while :; do
28732 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028733 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028734 *) as_qdir=$as_dir;;
28735 esac
28736 as_dirs="'$as_qdir' $as_dirs"
28737 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028738$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028739 X"$as_dir" : 'X\(//\)[^/]' \| \
28740 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028741 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028742echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028743 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28744 s//\1/
28745 q
28746 }
28747 /^X\(\/\/\)[^/].*/{
28748 s//\1/
28749 q
28750 }
28751 /^X\(\/\/\)$/{
28752 s//\1/
28753 q
28754 }
28755 /^X\(\/\).*/{
28756 s//\1/
28757 q
28758 }
28759 s/.*/./; q'`
28760 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028761 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028762 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028763 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28764echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028765 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028766 ac_builddir=.
28767
Martin v. Löwiseba40652007-08-30 20:10:57 +000028768case "$ac_dir" in
28769.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28770*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028771 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028772 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028773 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028774 case $ac_top_builddir_sub in
28775 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28776 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28777 esac ;;
28778esac
28779ac_abs_top_builddir=$ac_pwd
28780ac_abs_builddir=$ac_pwd$ac_dir_suffix
28781# for backward compatibility:
28782ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028783
28784case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028785 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028786 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028787 ac_top_srcdir=$ac_top_builddir_sub
28788 ac_abs_top_srcdir=$ac_pwd ;;
28789 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028790 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028791 ac_top_srcdir=$srcdir
28792 ac_abs_top_srcdir=$srcdir ;;
28793 *) # Relative name.
28794 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28795 ac_top_srcdir=$ac_top_build_prefix$srcdir
28796 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028797esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028798ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028799
Martin v. Löwis11437992002-04-12 09:54:03 +000028800
Martin v. Löwiseba40652007-08-30 20:10:57 +000028801 case $ac_mode in
28802 :F)
28803 #
28804 # CONFIG_FILE
28805 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028806
28807 case $INSTALL in
28808 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028809 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028810 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028811_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028813cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028814# If the template does not know about datarootdir, expand it.
28815# FIXME: This hack should be removed a few years after 2.60.
28816ac_datarootdir_hack=; ac_datarootdir_seen=
28817
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028818case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028819 p
28820 q
28821}
28822/@datadir@/p
28823/@docdir@/p
28824/@infodir@/p
28825/@localedir@/p
28826/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028827' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028828*datarootdir*) ac_datarootdir_seen=yes;;
28829*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028830 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28831echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028832_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028833cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028834 ac_datarootdir_hack='
28835 s&@datadir@&$datadir&g
28836 s&@docdir@&$docdir&g
28837 s&@infodir@&$infodir&g
28838 s&@localedir@&$localedir&g
28839 s&@mandir@&$mandir&g
28840 s&\\\${datarootdir}&$datarootdir&g' ;;
28841esac
28842_ACEOF
28843
28844# Neutralize VPATH when `$srcdir' = `.'.
28845# Shell code in configure.ac might set extrasub.
28846# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028847cat >>$CONFIG_STATUS <<_ACEOF
28848 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028849$extrasub
28850_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028851cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028852:t
28853/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028854s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028855s&@top_builddir@&$ac_top_builddir_sub&;t t
28856s&@srcdir@&$ac_srcdir&;t t
28857s&@abs_srcdir@&$ac_abs_srcdir&;t t
28858s&@top_srcdir@&$ac_top_srcdir&;t t
28859s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28860s&@builddir@&$ac_builddir&;t t
28861s&@abs_builddir@&$ac_abs_builddir&;t t
28862s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28863s&@INSTALL@&$ac_INSTALL&;t t
28864$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028865" $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 +000028866
Martin v. Löwiseba40652007-08-30 20:10:57 +000028867test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28868 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28869 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028870 { echo "$as_me:$LINENO: 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." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028872echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028873which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028874
Martin v. Löwiseba40652007-08-30 20:10:57 +000028875 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028876 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028877 -) cat "$tmp/out"; rm -f "$tmp/out";;
28878 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28879 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028880 ;;
28881 :H)
28882 #
28883 # CONFIG_HEADER
28884 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028885_ACEOF
28886
28887# Transform confdefs.h into a sed script `conftest.defines', that
28888# substitutes the proper values into config.h.in to produce config.h.
28889rm -f conftest.defines conftest.tail
28890# First, append a space to every undef/define line, to ease matching.
28891echo 's/$/ /' >conftest.defines
28892# Then, protect against being on the right side of a sed subst, or in
28893# an unquoted here document, in config.status. If some macros were
28894# called several times there might be several #defines for the same
28895# symbol, which is useless. But do not sort them, since the last
28896# AC_DEFINE must be honored.
28897ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28898# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28899# NAME is the cpp macro being defined, VALUE is the value it is being given.
28900# PARAMS is the parameter list in the macro definition--in most cases, it's
28901# just an empty string.
28902ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28903ac_dB='\\)[ (].*,\\1define\\2'
28904ac_dC=' '
28905ac_dD=' ,'
28906
28907uniq confdefs.h |
28908 sed -n '
28909 t rset
28910 :rset
28911 s/^[ ]*#[ ]*define[ ][ ]*//
28912 t ok
28913 d
28914 :ok
28915 s/[\\&,]/\\&/g
28916 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28917 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28918 ' >>conftest.defines
28919
28920# Remove the space that was appended to ease matching.
28921# Then replace #undef with comments. This is necessary, for
28922# example, in the case of _POSIX_SOURCE, which is predefined and required
28923# on some systems where configure will not decide to define it.
28924# (The regexp can be short, since the line contains either #define or #undef.)
28925echo 's/ $//
28926s,^[ #]*u.*,/* & */,' >>conftest.defines
28927
28928# Break up conftest.defines:
28929ac_max_sed_lines=50
28930
28931# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28932# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28933# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28934# et cetera.
28935ac_in='$ac_file_inputs'
28936ac_out='"$tmp/out1"'
28937ac_nxt='"$tmp/out2"'
28938
28939while :
28940do
28941 # Write a here document:
28942 cat >>$CONFIG_STATUS <<_ACEOF
28943 # First, check the format of the line:
28944 cat >"\$tmp/defines.sed" <<\\CEOF
28945/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28946/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28947b
28948:def
28949_ACEOF
28950 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28951 echo 'CEOF
28952 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28953 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28954 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28955 grep . conftest.tail >/dev/null || break
28956 rm -f conftest.defines
28957 mv conftest.tail conftest.defines
28958done
28959rm -f conftest.defines conftest.tail
28960
28961echo "ac_result=$ac_in" >>$CONFIG_STATUS
28962cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028963 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028964 echo "/* $configure_input */" >"$tmp/config.h"
28965 cat "$ac_result" >>"$tmp/config.h"
28966 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28967 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28968echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028969 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028970 rm -f $ac_file
28971 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028972 fi
28973 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028974 echo "/* $configure_input */"
28975 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028976 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028977 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028978 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028979
Martin v. Löwiseba40652007-08-30 20:10:57 +000028980
28981 esac
28982
28983done # for ac_tag
28984
Guido van Rossum627b2d71993-12-24 10:39:16 +000028985
Martin v. Löwis11437992002-04-12 09:54:03 +000028986{ (exit 0); exit 0; }
28987_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028988chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028989ac_clean_files=$ac_clean_files_save
28990
28991
28992# configure is writing to config.log, and then calls config.status.
28993# config.status does its own redirection, appending to config.log.
28994# Unfortunately, on DOS this fails, as config.log is still kept open
28995# by configure, so config.status won't be able to write to it; its
28996# output is simply discarded. So we exec the FD to /dev/null,
28997# effectively closing config.log, so it can be properly (re)opened and
28998# appended to by config.status. When coming back to configure, we
28999# need to make the FD available again.
29000if test "$no_create" != yes; then
29001 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029002 ac_config_status_args=
29003 test "$silent" = yes &&
29004 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029005 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029006 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029007 exec 5>>config.log
29008 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29009 # would make configure fail if this is the last instruction.
29010 $ac_cs_success || { (exit 1); exit 1; }
29011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029012
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029013
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029014echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029015if test ! -f Modules/Setup
29016then
29017 cp $srcdir/Modules/Setup.dist Modules/Setup
29018fi
29019
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029020echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029021if test ! -f Modules/Setup.local
29022then
29023 echo "# Edit this file for local setup changes" >Modules/Setup.local
29024fi
29025
29026echo "creating Makefile"
29027$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29028 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029029 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029030
29031case $ac_sys_system in
29032BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029033 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029034
29035 Support for BeOS is deprecated as of Python 2.6.
29036 See PEP 11 for the gory details.
29037 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029038echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029039
29040 Support for BeOS is deprecated as of Python 2.6.
29041 See PEP 11 for the gory details.
29042 " >&2;}
29043 ;;
29044*) ;;
29045esac
29046
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029047mv config.c Modules