blob: 72be336e47d4edb2afe51946f0303c9a664263ef [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002# From configure.in Revision: 78154 .
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.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002124 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002125 define_xopen_source=no
2126 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2127 # also defined. This can be overridden by defining _BSD_SOURCE
2128 # As this has a different meaning on Linux, only define it on OpenBSD
2129
2130cat >>confdefs.h <<\_ACEOF
2131#define _BSD_SOURCE 1
2132_ACEOF
2133
2134 ;;
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002135 OpenBSD/4.[4])
2136 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2137 # also defined. This can be overridden by defining _BSD_SOURCE
2138 # As this has a different meaning on Linux, only define it on OpenBSD
2139
2140cat >>confdefs.h <<\_ACEOF
2141#define _BSD_SOURCE 1
2142_ACEOF
2143
2144 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002145 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2146 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2147 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002148 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 +00002149 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002150 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2151 # of union __?sigval. Reported by Stuart Bishop.
2152 SunOS/5.6)
2153 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002154 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2155 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002156 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002157 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002158 define_xopen_source=no;;
2159 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002160 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002161 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002162 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002163 # On FreeBSD 4, the math functions C89 does not cover are never defined
2164 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2165 FreeBSD/4.*)
2166 define_xopen_source=no;;
2167 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2168 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2169 # identifies itself as Darwin/7.*
2170 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2171 # disables platform specific features beyond repair.
2172 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2173 # has no effect, don't bother defining them
2174 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002175 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002176 Darwin/1[0-9].*)
2177 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002178 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2179 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2180 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002181 AIX/4)
2182 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002183 AIX/5)
2184 if test `uname -r` -eq 1; then
2185 define_xopen_source=no
2186 fi
2187 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002188 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2189 # defining NI_NUMERICHOST.
2190 QNX/6.3.2)
2191 define_xopen_source=no
2192 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002193
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002194esac
2195
2196if test $define_xopen_source = yes
2197then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002198 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2199 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002200 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2201 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002202 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002203 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002204
2205cat >>confdefs.h <<\_ACEOF
2206#define _XOPEN_SOURCE 500
2207_ACEOF
2208
2209 ;;
2210 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211
2212cat >>confdefs.h <<\_ACEOF
2213#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002214_ACEOF
2215
Skip Montanarof0d5f792004-08-15 14:08:23 +00002216 ;;
2217 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002218
2219 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2220 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2221 # several APIs are not declared. Since this is also needed in some
2222 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002223 # except for Solaris 10, where it must not be defined,
2224 # as it implies XPG4.2
2225 case $ac_sys_system/$ac_sys_release in
2226 SunOS/5.10)
2227 ;;
2228 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002229
2230cat >>confdefs.h <<\_ACEOF
2231#define _XOPEN_SOURCE_EXTENDED 1
2232_ACEOF
2233
Martin v. Löwis7dece662005-11-26 11:38:24 +00002234 ;;
2235 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002236
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002237
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002238cat >>confdefs.h <<\_ACEOF
2239#define _POSIX_C_SOURCE 200112L
2240_ACEOF
2241
2242
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002243fi
2244
Guido van Rossum91922671997-10-09 20:24:13 +00002245#
2246# SGI compilers allow the specification of the both the ABI and the
2247# ISA on the command line. Depending on the values of these switches,
2248# different and often incompatable code will be generated.
2249#
2250# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2251# thus supply support for various ABI/ISA combinations. The MACHDEP
2252# variable is also adjusted.
2253#
2254
2255if test ! -z "$SGI_ABI"
2256then
2257 CC="cc $SGI_ABI"
2258 LDFLAGS="$SGI_ABI $LDFLAGS"
2259 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2260fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002261{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2262echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002263
Jack Jansen83f898c2002-12-30 22:23:40 +00002264# And add extra plat-mac for darwin
2265
Jack Jansen7b59b422003-03-17 15:44:10 +00002266
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2268echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002269if test -z "$EXTRAPLATDIR"
2270then
2271 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002272 darwin)
2273 EXTRAPLATDIR="\$(PLATMACDIRS)"
2274 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2275 ;;
2276 *)
2277 EXTRAPLATDIR=""
2278 EXTRAMACHDEPPATH=""
2279 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002280 esac
2281fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002282{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2283echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002284
Jack Jansen6b08a402004-06-03 12:41:45 +00002285# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2286# it may influence the way we can build extensions, so distutils
2287# needs to check it
2288
Ronald Oussoren988117f2006-04-29 11:31:35 +00002289
Jack Jansen6b08a402004-06-03 12:41:45 +00002290CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002291EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002293{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2294echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002295ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002296{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2297echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002298
Guido van Rossum627b2d71993-12-24 10:39:16 +00002299# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002300
2301# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2302# for debug/optimization stuff. BASECFLAGS is for flags that are required
2303# just to get things to compile and link. Users are free to override OPT
2304# when running configure or make. The build should not break if they do.
2305# BASECFLAGS should generally not be messed with, however.
2306
2307# XXX shouldn't some/most/all of this code be merged with the stuff later
2308# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002309{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2310echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002313if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002314 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002315 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002316 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002317 without_gcc=yes;;
2318 yes) CC=gcc
2319 without_gcc=no;;
2320 *) CC=$withval
2321 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002322 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002323else
Martin v. Löwis11437992002-04-12 09:54:03 +00002324
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002325 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002326 AIX*) CC=cc_r
2327 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002328 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002329 case $BE_HOST_CPU in
2330 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002331 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002332 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002333 BASECFLAGS="$BASECFLAGS -export pragma"
2334 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002335 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002336 ;;
2337 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002338 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002339 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002340 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002341 ;;
2342 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002343 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2344echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002345 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002346 ;;
2347 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002348 AR="\$(srcdir)/Modules/ar_beos"
2349 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002350 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002351 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002352 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002353fi
2354
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002355{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2356echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002357
Guido van Rossum8b131c51995-03-09 14:10:13 +00002358# If the user switches compilers, we can't believe the cache
2359if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2360then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002361 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002362(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363echo "$as_me: 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)" >&2;}
2365 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002366fi
2367
Martin v. Löwis11437992002-04-12 09:54:03 +00002368ac_ext=c
2369ac_cpp='$CPP $CPPFLAGS'
2370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2372ac_compiler_gnu=$ac_cv_c_compiler_gnu
2373if test -n "$ac_tool_prefix"; then
2374 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2375set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002376{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002378if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002380else
2381 if test -n "$CC"; then
2382 ac_cv_prog_CC="$CC" # Let the user override the test.
2383else
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 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 +00002391 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002392 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002393 break 2
2394 fi
2395done
2396done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
Jack Jansendd19cf82001-12-06 22:36:17 +00002399fi
2400fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002401CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002402if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 { echo "$as_me:$LINENO: result: $CC" >&5
2404echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002406 { echo "$as_me:$LINENO: result: no" >&5
2407echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408fi
2409
Martin v. Löwiseba40652007-08-30 20:10:57 +00002410
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412if test -z "$ac_cv_prog_CC"; then
2413 ac_ct_CC=$CC
2414 # Extract the first word of "gcc", so it can be a program name with args.
2415set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002416{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2417echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002418if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002420else
2421 if test -n "$ac_ct_CC"; then
2422 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2423else
2424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2425for as_dir in $PATH
2426do
2427 IFS=$as_save_IFS
2428 test -z "$as_dir" && as_dir=.
2429 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 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 +00002431 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 break 2
2434 fi
2435done
2436done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002437IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439fi
2440fi
2441ac_ct_CC=$ac_cv_prog_ac_ct_CC
2442if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002443 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2444echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002446 { echo "$as_me:$LINENO: result: no" >&5
2447echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448fi
2449
Martin v. Löwiseba40652007-08-30 20:10:57 +00002450 if test "x$ac_ct_CC" = x; then
2451 CC=""
2452 else
2453 case $cross_compiling:$ac_tool_warned in
2454yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002455{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2456whose name does not start with the host triplet. If you think this
2457configuration is useful to you, please write to autoconf@gnu.org." >&5
2458echo "$as_me: 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." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461ac_tool_warned=yes ;;
2462esac
2463 CC=$ac_ct_CC
2464 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002465else
2466 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002467fi
2468
Jack Jansendd19cf82001-12-06 22:36:17 +00002469if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470 if test -n "$ac_tool_prefix"; then
2471 # 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 +00002472set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002473{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2474echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002475if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002476 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002477else
2478 if test -n "$CC"; then
2479 ac_cv_prog_CC="$CC" # Let the user override the test.
2480else
Martin v. Löwis11437992002-04-12 09:54:03 +00002481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2482for as_dir in $PATH
2483do
2484 IFS=$as_save_IFS
2485 test -z "$as_dir" && as_dir=.
2486 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487 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 +00002488 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002489 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 break 2
2491 fi
2492done
2493done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002495
2496fi
2497fi
2498CC=$ac_cv_prog_CC
2499if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002500 { echo "$as_me:$LINENO: result: $CC" >&5
2501echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002502else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002503 { echo "$as_me:$LINENO: result: no" >&5
2504echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002505fi
2506
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002509fi
2510if test -z "$CC"; then
2511 # Extract the first word of "cc", so it can be a program name with args.
2512set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002513{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2514echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002515if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002516 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002517else
2518 if test -n "$CC"; then
2519 ac_cv_prog_CC="$CC" # Let the user override the test.
2520else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002521 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523for as_dir in $PATH
2524do
2525 IFS=$as_save_IFS
2526 test -z "$as_dir" && as_dir=.
2527 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002528 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 +00002529 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2530 ac_prog_rejected=yes
2531 continue
2532 fi
2533 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 break 2
2536 fi
2537done
2538done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002541if test $ac_prog_rejected = yes; then
2542 # We found a bogon in the path, so make sure we never use it.
2543 set dummy $ac_cv_prog_CC
2544 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002546 # We chose a different compiler from the bogus one.
2547 # However, it has the same basename, so the bogon will be chosen
2548 # first if we set CC to just the basename; use the full file name.
2549 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002551 fi
2552fi
2553fi
2554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002555CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002556if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002557 { echo "$as_me:$LINENO: result: $CC" >&5
2558echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002560 { echo "$as_me:$LINENO: result: no" >&5
2561echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002562fi
2563
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565fi
2566if test -z "$CC"; then
2567 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 do
2570 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2571set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002572{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2573echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002574if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002576else
2577 if test -n "$CC"; then
2578 ac_cv_prog_CC="$CC" # Let the user override the test.
2579else
Martin v. Löwis11437992002-04-12 09:54:03 +00002580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2581for as_dir in $PATH
2582do
2583 IFS=$as_save_IFS
2584 test -z "$as_dir" && as_dir=.
2585 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586 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 +00002587 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002588 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002591done
2592done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002594
2595fi
2596fi
2597CC=$ac_cv_prog_CC
2598if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002599 { echo "$as_me:$LINENO: result: $CC" >&5
2600echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002602 { echo "$as_me:$LINENO: result: no" >&5
2603echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002604fi
2605
Martin v. Löwiseba40652007-08-30 20:10:57 +00002606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 test -n "$CC" && break
2608 done
2609fi
2610if test -z "$CC"; then
2611 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002612 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002613do
2614 # Extract the first word of "$ac_prog", so it can be a program name with args.
2615set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002616{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2617echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002618if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002619 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002620else
2621 if test -n "$ac_ct_CC"; then
2622 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2623else
2624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2625for as_dir in $PATH
2626do
2627 IFS=$as_save_IFS
2628 test -z "$as_dir" && as_dir=.
2629 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630 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 +00002631 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002632 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 break 2
2634 fi
2635done
2636done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639fi
2640fi
2641ac_ct_CC=$ac_cv_prog_ac_ct_CC
2642if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002643 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2644echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002646 { echo "$as_me:$LINENO: result: no" >&5
2647echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002649
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 test -n "$ac_ct_CC" && break
2652done
Michael W. Hudson54241132001-12-07 15:38:26 +00002653
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654 if test "x$ac_ct_CC" = x; then
2655 CC=""
2656 else
2657 case $cross_compiling:$ac_tool_warned in
2658yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2660whose name does not start with the host triplet. If you think this
2661configuration is useful to you, please write to autoconf@gnu.org." >&5
2662echo "$as_me: 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." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002665ac_tool_warned=yes ;;
2666esac
2667 CC=$ac_ct_CC
2668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002669fi
2670
2671fi
2672
2673
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002674test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002675See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002676echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002677See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002679
2680# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002681echo "$as_me:$LINENO: checking for C compiler version" >&5
2682ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683{ (ac_try="$ac_compiler --version >&5"
2684case "(($ac_try" in
2685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2686 *) ac_try_echo=$ac_try;;
2687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693{ (ac_try="$ac_compiler -v >&5"
2694case "(($ac_try" in
2695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696 *) ac_try_echo=$ac_try;;
2697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002699 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703{ (ac_try="$ac_compiler -V >&5"
2704case "(($ac_try" in
2705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706 *) ac_try_echo=$ac_try;;
2707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002709 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 (exit $ac_status); }
2713
2714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002715/* confdefs.h. */
2716_ACEOF
2717cat confdefs.h >>conftest.$ac_ext
2718cat >>conftest.$ac_ext <<_ACEOF
2719/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002720
Martin v. Löwis11437992002-04-12 09:54:03 +00002721int
2722main ()
2723{
2724
2725 ;
2726 return 0;
2727}
2728_ACEOF
2729ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002730ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002731# Try to create an executable without -o first, disregard a.out.
2732# It will help us diagnose broken compilers, and finding out an intuition
2733# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002734{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2735echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2736ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2737#
2738# List of possible output files, starting from the most likely.
2739# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2740# only as a last resort. b.out is created by i960 compilers.
2741ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2742#
2743# The IRIX 6 linker writes into existing files which may not be
2744# executable, retaining their permissions. Remove them first so a
2745# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746ac_rmfiles=
2747for ac_file in $ac_files
2748do
2749 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002750 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002751 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2752 esac
2753done
2754rm -f $ac_rmfiles
2755
2756if { (ac_try="$ac_link_default"
2757case "(($ac_try" in
2758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2759 *) ac_try_echo=$ac_try;;
2760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002762 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2767# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2768# in a Makefile. We should not override ac_cv_exeext if it was cached,
2769# so that the user can short-circuit this test for compilers unknown to
2770# Autoconf.
2771for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002772do
2773 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002775 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002776 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002777 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002778 # We found the default executable, but exeext='' is most
2779 # certainly right.
2780 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002781 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2783 then :; else
2784 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2785 fi
2786 # We set ac_cv_exeext here because the later test for it is not
2787 # safe: cross compilers may not add the suffix if given an `-o'
2788 # argument, so we may need to know it at that point already.
2789 # Even if this section looks crufty: it has the advantage of
2790 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002791 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002792 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002793 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 esac
2795done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796test "$ac_cv_exeext" = no && ac_cv_exeext=
2797
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002798else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002799 ac_file=''
2800fi
2801
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002802{ echo "$as_me:$LINENO: result: $ac_file" >&5
2803echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002806sed 's/^/| /' conftest.$ac_ext >&5
2807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002808{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002809See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002811See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002813fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002814
Martin v. Löwis11437992002-04-12 09:54:03 +00002815ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002816
Martin v. Löwiseba40652007-08-30 20:10:57 +00002817# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002818# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002819{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2820echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2822# If not cross compiling, check that we can run a simple program.
2823if test "$cross_compiling" != yes; then
2824 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825 { (case "(($ac_try" in
2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827 *) ac_try_echo=$ac_try;;
2828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002830 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 (exit $ac_status); }; }; then
2834 cross_compiling=no
2835 else
2836 if test "$cross_compiling" = maybe; then
2837 cross_compiling=yes
2838 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002839 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002840If you meant to cross compile, use \`--host'.
2841See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842echo "$as_me: 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." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002845 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 fi
2847 fi
2848fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002849{ echo "$as_me:$LINENO: result: yes" >&5
2850echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002853ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002854# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002855# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2857echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2858{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2859echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002861{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2862echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002863if { (ac_try="$ac_link"
2864case "(($ac_try" in
2865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2866 *) ac_try_echo=$ac_try;;
2867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002869 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 (exit $ac_status); }; then
2873 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2874# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2875# work properly (i.e., refer to `conftest.exe'), while it won't with
2876# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002877for ac_file in conftest.exe conftest conftest.*; do
2878 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002880 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002881 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002882 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 * ) break;;
2884 esac
2885done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002886else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002887 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002888See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002889echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002890See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002892fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002893
Martin v. Löwis11437992002-04-12 09:54:03 +00002894rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2896echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002897
2898rm -f conftest.$ac_ext
2899EXEEXT=$ac_cv_exeext
2900ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2902echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002903if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002904 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002905else
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002907/* confdefs.h. */
2908_ACEOF
2909cat confdefs.h >>conftest.$ac_ext
2910cat >>conftest.$ac_ext <<_ACEOF
2911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
Martin v. Löwis11437992002-04-12 09:54:03 +00002913int
2914main ()
2915{
2916
2917 ;
2918 return 0;
2919}
2920_ACEOF
2921rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922if { (ac_try="$ac_compile"
2923case "(($ac_try" in
2924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2925 *) ac_try_echo=$ac_try;;
2926esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002928 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002929 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002931 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002932 for ac_file in conftest.o conftest.obj conftest.*; do
2933 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2937 break;;
2938 esac
2939done
2940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002942sed 's/^/| /' conftest.$ac_ext >&5
2943
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002944{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002945See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002946echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002947See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002948 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002949fi
2950
2951rm -f conftest.$ac_cv_objext conftest.$ac_ext
2952fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002953{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2954echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002955OBJEXT=$ac_cv_objext
2956ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2958echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002961else
2962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969int
2970main ()
2971{
2972#ifndef __GNUC__
2973 choke me
2974#endif
2975
2976 ;
2977 return 0;
2978}
2979_ACEOF
2980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002981if { (ac_try="$ac_compile"
2982case "(($ac_try" in
2983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2984 *) ac_try_echo=$ac_try;;
2985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002989 grep -v '^ *+' conftest.er1 >conftest.err
2990 rm -f conftest.er1
2991 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002993 (exit $ac_status); } && {
2994 test -z "$ac_c_werror_flag" ||
2995 test ! -s conftest.err
2996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 ac_compiler_gnu=yes
2998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003000sed 's/^/| /' conftest.$ac_ext >&5
3001
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003006ac_cv_c_compiler_gnu=$ac_compiler_gnu
3007
3008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003009{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3010echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3011GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003012ac_test_CFLAGS=${CFLAGS+set}
3013ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003014{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3015echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003016if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003018else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003019 ac_save_c_werror_flag=$ac_c_werror_flag
3020 ac_c_werror_flag=yes
3021 ac_cv_prog_cc_g=no
3022 CFLAGS="-g"
3023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003024/* confdefs.h. */
3025_ACEOF
3026cat confdefs.h >>conftest.$ac_ext
3027cat >>conftest.$ac_ext <<_ACEOF
3028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003029
Martin v. Löwis11437992002-04-12 09:54:03 +00003030int
3031main ()
3032{
3033
3034 ;
3035 return 0;
3036}
3037_ACEOF
3038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003039if { (ac_try="$ac_compile"
3040case "(($ac_try" in
3041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3042 *) ac_try_echo=$ac_try;;
3043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003047 grep -v '^ *+' conftest.er1 >conftest.err
3048 rm -f conftest.er1
3049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003051 (exit $ac_status); } && {
3052 test -z "$ac_c_werror_flag" ||
3053 test ! -s conftest.err
3054 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003055 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003058sed 's/^/| /' conftest.$ac_ext >&5
3059
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060 CFLAGS=""
3061 cat >conftest.$ac_ext <<_ACEOF
3062/* confdefs.h. */
3063_ACEOF
3064cat confdefs.h >>conftest.$ac_ext
3065cat >>conftest.$ac_ext <<_ACEOF
3066/* end confdefs.h. */
3067
3068int
3069main ()
3070{
3071
3072 ;
3073 return 0;
3074}
3075_ACEOF
3076rm -f conftest.$ac_objext
3077if { (ac_try="$ac_compile"
3078case "(($ac_try" in
3079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3080 *) ac_try_echo=$ac_try;;
3081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003083 (eval "$ac_compile") 2>conftest.er1
3084 ac_status=$?
3085 grep -v '^ *+' conftest.er1 >conftest.err
3086 rm -f conftest.er1
3087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003089 (exit $ac_status); } && {
3090 test -z "$ac_c_werror_flag" ||
3091 test ! -s conftest.err
3092 } && test -s conftest.$ac_objext; then
3093 :
3094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003095 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096sed 's/^/| /' conftest.$ac_ext >&5
3097
3098 ac_c_werror_flag=$ac_save_c_werror_flag
3099 CFLAGS="-g"
3100 cat >conftest.$ac_ext <<_ACEOF
3101/* confdefs.h. */
3102_ACEOF
3103cat confdefs.h >>conftest.$ac_ext
3104cat >>conftest.$ac_ext <<_ACEOF
3105/* end confdefs.h. */
3106
3107int
3108main ()
3109{
3110
3111 ;
3112 return 0;
3113}
3114_ACEOF
3115rm -f conftest.$ac_objext
3116if { (ac_try="$ac_compile"
3117case "(($ac_try" in
3118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3119 *) ac_try_echo=$ac_try;;
3120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003122 (eval "$ac_compile") 2>conftest.er1
3123 ac_status=$?
3124 grep -v '^ *+' conftest.er1 >conftest.err
3125 rm -f conftest.er1
3126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128 (exit $ac_status); } && {
3129 test -z "$ac_c_werror_flag" ||
3130 test ! -s conftest.err
3131 } && test -s conftest.$ac_objext; then
3132 ac_cv_prog_cc_g=yes
3133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003134 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003135sed 's/^/| /' conftest.$ac_ext >&5
3136
3137
Guido van Rossum627b2d71993-12-24 10:39:16 +00003138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139
3140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142
3143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3144fi
3145
3146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3147 ac_c_werror_flag=$ac_save_c_werror_flag
3148fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003149{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3150echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003151if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003152 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003153elif test $ac_cv_prog_cc_g = yes; then
3154 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003155 CFLAGS="-g -O2"
3156 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003157 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003158 fi
3159else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003160 if test "$GCC" = yes; then
3161 CFLAGS="-O2"
3162 else
3163 CFLAGS=
3164 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003165fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003166{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3167echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003169 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003170else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003172ac_save_CC=$CC
3173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003174/* confdefs.h. */
3175_ACEOF
3176cat confdefs.h >>conftest.$ac_ext
3177cat >>conftest.$ac_ext <<_ACEOF
3178/* end confdefs.h. */
3179#include <stdarg.h>
3180#include <stdio.h>
3181#include <sys/types.h>
3182#include <sys/stat.h>
3183/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3184struct buf { int x; };
3185FILE * (*rcsopen) (struct buf *, struct stat *, int);
3186static char *e (p, i)
3187 char **p;
3188 int i;
3189{
3190 return p[i];
3191}
3192static char *f (char * (*g) (char **, int), char **p, ...)
3193{
3194 char *s;
3195 va_list v;
3196 va_start (v,p);
3197 s = g (p, va_arg (v,int));
3198 va_end (v);
3199 return s;
3200}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003201
3202/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3203 function prototypes and stuff, but not '\xHH' hex character constants.
3204 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003205 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003206 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3207 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003209int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3210
Martin v. Löwiseba40652007-08-30 20:10:57 +00003211/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3212 inside strings and character constants. */
3213#define FOO(x) 'x'
3214int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3215
Skip Montanaro6dead952003-09-25 14:50:04 +00003216int test (int i, double x);
3217struct s1 {int (*f) (int a);};
3218struct s2 {int (*f) (double a);};
3219int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3220int argc;
3221char **argv;
3222int
3223main ()
3224{
3225return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3226 ;
3227 return 0;
3228}
3229_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3231 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003232do
3233 CC="$ac_save_CC $ac_arg"
3234 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003235if { (ac_try="$ac_compile"
3236case "(($ac_try" in
3237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3238 *) ac_try_echo=$ac_try;;
3239esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003241 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003243 grep -v '^ *+' conftest.er1 >conftest.err
3244 rm -f conftest.er1
3245 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003247 (exit $ac_status); } && {
3248 test -z "$ac_c_werror_flag" ||
3249 test ! -s conftest.err
3250 } && test -s conftest.$ac_objext; then
3251 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003254sed 's/^/| /' conftest.$ac_ext >&5
3255
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256
Skip Montanaro6dead952003-09-25 14:50:04 +00003257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258
3259rm -f core conftest.err conftest.$ac_objext
3260 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003261done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003263CC=$ac_save_CC
3264
3265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266# AC_CACHE_VAL
3267case "x$ac_cv_prog_cc_c89" in
3268 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003269 { echo "$as_me:$LINENO: result: none needed" >&5
3270echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003272 { echo "$as_me:$LINENO: result: unsupported" >&5
3273echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003274 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003276 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3277echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003278esac
3279
Skip Montanaro6dead952003-09-25 14:50:04 +00003280
Martin v. Löwis11437992002-04-12 09:54:03 +00003281ac_ext=c
3282ac_cpp='$CPP $CPPFLAGS'
3283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3285ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003287
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003288
3289
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003290{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3291echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003292
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003295 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296
3297 case $withval in
3298 no) with_cxx_main=no
3299 MAINCC='$(CC)';;
3300 yes) with_cxx_main=yes
3301 MAINCC='$(CXX)';;
3302 *) with_cxx_main=yes
3303 MAINCC=$withval
3304 if test -z "$CXX"
3305 then
3306 CXX=$withval
3307 fi;;
3308 esac
3309else
3310
3311 with_cxx_main=no
3312 MAINCC='$(CC)'
3313
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314fi
3315
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003316{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3317echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003318
3319preset_cxx="$CXX"
3320if test -z "$CXX"
3321then
3322 case "$CC" in
3323 gcc) # Extract the first word of "g++", so it can be a program name with args.
3324set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003327if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003328 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003329else
3330 case $CXX in
3331 [\\/]* | ?:[\\/]*)
3332 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3333 ;;
3334 *)
3335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3336for as_dir in notfound
3337do
3338 IFS=$as_save_IFS
3339 test -z "$as_dir" && as_dir=.
3340 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003341 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 +00003342 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003344 break 2
3345 fi
3346done
3347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003348IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003349
3350 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3351 ;;
3352esac
3353fi
3354CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003355if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003356 { echo "$as_me:$LINENO: result: $CXX" >&5
3357echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003359 { echo "$as_me:$LINENO: result: no" >&5
3360echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003362
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003363 ;;
3364 cc) # Extract the first word of "c++", so it can be a program name with args.
3365set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003368if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003369 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003370else
3371 case $CXX in
3372 [\\/]* | ?:[\\/]*)
3373 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3374 ;;
3375 *)
3376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3377for as_dir in notfound
3378do
3379 IFS=$as_save_IFS
3380 test -z "$as_dir" && as_dir=.
3381 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003382 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 +00003383 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003384 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003385 break 2
3386 fi
3387done
3388done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003389IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390
3391 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3392 ;;
3393esac
3394fi
3395CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003396if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003397 { echo "$as_me:$LINENO: result: $CXX" >&5
3398echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003400 { echo "$as_me:$LINENO: result: no" >&5
3401echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003403
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003404 ;;
3405 esac
3406 if test "$CXX" = "notfound"
3407 then
3408 CXX=""
3409 fi
3410fi
3411if test -z "$CXX"
3412then
3413 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3414do
3415 # Extract the first word of "$ac_prog", so it can be a program name with args.
3416set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003417{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3418echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003419if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003420 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421else
3422 if test -n "$CXX"; then
3423 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3424else
3425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3426for as_dir in $PATH
3427do
3428 IFS=$as_save_IFS
3429 test -z "$as_dir" && as_dir=.
3430 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003431 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 +00003432 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003433 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003434 break 2
3435 fi
3436done
3437done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003439
3440fi
3441fi
3442CXX=$ac_cv_prog_CXX
3443if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003444 { echo "$as_me:$LINENO: result: $CXX" >&5
3445echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003447 { echo "$as_me:$LINENO: result: no" >&5
3448echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003449fi
3450
Martin v. Löwiseba40652007-08-30 20:10:57 +00003451
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003452 test -n "$CXX" && break
3453done
3454test -n "$CXX" || CXX="notfound"
3455
3456 if test "$CXX" = "notfound"
3457 then
3458 CXX=""
3459 fi
3460fi
3461if test "$preset_cxx" != "$CXX"
3462then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003463 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003464
3465 By default, distutils will build C++ extension modules with \"$CXX\".
3466 If this is not intended, then set CXX on the configure command line.
3467 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003468echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003469
3470 By default, distutils will build C++ extension modules with \"$CXX\".
3471 If this is not intended, then set CXX on the configure command line.
3472 " >&2;}
3473fi
3474
3475
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003476# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
3478ac_ext=c
3479ac_cpp='$CPP $CPPFLAGS'
3480ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3481ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3482ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003483{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3484echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003485# On Suns, sometimes $CPP names a directory.
3486if test -n "$CPP" && test -d "$CPP"; then
3487 CPP=
3488fi
3489if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003491 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003492else
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 # Double quotes because CPP needs to be expanded
3494 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3495 do
3496 ac_preproc_ok=false
3497for ac_c_preproc_warn_flag in '' yes
3498do
3499 # Use a header file that comes with gcc, so configuring glibc
3500 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003501 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3502 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003503 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # not just through cpp. "Syntax error" is here to catch this case.
3505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003506/* confdefs.h. */
3507_ACEOF
3508cat confdefs.h >>conftest.$ac_ext
3509cat >>conftest.$ac_ext <<_ACEOF
3510/* end confdefs.h. */
3511#ifdef __STDC__
3512# include <limits.h>
3513#else
3514# include <assert.h>
3515#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003516 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003517_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518if { (ac_try="$ac_cpp conftest.$ac_ext"
3519case "(($ac_try" in
3520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3521 *) ac_try_echo=$ac_try;;
3522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003526 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 rm -f conftest.er1
3528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003530 (exit $ac_status); } >/dev/null && {
3531 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3532 test ! -s conftest.err
3533 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003534 :
3535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003537sed 's/^/| /' conftest.$ac_ext >&5
3538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 # Broken: fails on valid input.
3540continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003542
Martin v. Löwis11437992002-04-12 09:54:03 +00003543rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003544
Martin v. Löwiseba40652007-08-30 20:10:57 +00003545 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 # can be detected and how.
3547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003548/* confdefs.h. */
3549_ACEOF
3550cat confdefs.h >>conftest.$ac_ext
3551cat >>conftest.$ac_ext <<_ACEOF
3552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003553#include <ac_nonexistent.h>
3554_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003555if { (ac_try="$ac_cpp conftest.$ac_ext"
3556case "(($ac_try" in
3557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3558 *) ac_try_echo=$ac_try;;
3559esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003561 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003563 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003564 rm -f conftest.er1
3565 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003567 (exit $ac_status); } >/dev/null && {
3568 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3569 test ! -s conftest.err
3570 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 # Broken: success on invalid input.
3572continue
3573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003575sed 's/^/| /' conftest.$ac_ext >&5
3576
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 # Passes both tests.
3578ac_preproc_ok=:
3579break
3580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582rm -f conftest.err conftest.$ac_ext
3583
3584done
3585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3586rm -f conftest.err conftest.$ac_ext
3587if $ac_preproc_ok; then
3588 break
3589fi
3590
3591 done
3592 ac_cv_prog_CPP=$CPP
3593
3594fi
3595 CPP=$ac_cv_prog_CPP
3596else
3597 ac_cv_prog_CPP=$CPP
3598fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599{ echo "$as_me:$LINENO: result: $CPP" >&5
3600echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601ac_preproc_ok=false
3602for ac_c_preproc_warn_flag in '' yes
3603do
3604 # Use a header file that comes with gcc, so configuring glibc
3605 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003606 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3607 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 # On the NeXT, cc -E runs the code through the compiler's parser,
3609 # not just through cpp. "Syntax error" is here to catch this case.
3610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003611/* confdefs.h. */
3612_ACEOF
3613cat confdefs.h >>conftest.$ac_ext
3614cat >>conftest.$ac_ext <<_ACEOF
3615/* end confdefs.h. */
3616#ifdef __STDC__
3617# include <limits.h>
3618#else
3619# include <assert.h>
3620#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003621 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003622_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623if { (ac_try="$ac_cpp conftest.$ac_ext"
3624case "(($ac_try" in
3625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3626 *) ac_try_echo=$ac_try;;
3627esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003631 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 rm -f conftest.er1
3633 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003635 (exit $ac_status); } >/dev/null && {
3636 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3637 test ! -s conftest.err
3638 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 :
3640else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003642sed 's/^/| /' conftest.$ac_ext >&5
3643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 # Broken: fails on valid input.
3645continue
3646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648rm -f conftest.err conftest.$ac_ext
3649
Martin v. Löwiseba40652007-08-30 20:10:57 +00003650 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 # can be detected and how.
3652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003653/* confdefs.h. */
3654_ACEOF
3655cat confdefs.h >>conftest.$ac_ext
3656cat >>conftest.$ac_ext <<_ACEOF
3657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003658#include <ac_nonexistent.h>
3659_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003660if { (ac_try="$ac_cpp conftest.$ac_ext"
3661case "(($ac_try" in
3662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3663 *) ac_try_echo=$ac_try;;
3664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003666 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003668 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 rm -f conftest.er1
3670 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672 (exit $ac_status); } >/dev/null && {
3673 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3674 test ! -s conftest.err
3675 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 # Broken: success on invalid input.
3677continue
3678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003680sed 's/^/| /' conftest.$ac_ext >&5
3681
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 # Passes both tests.
3683ac_preproc_ok=:
3684break
3685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687rm -f conftest.err conftest.$ac_ext
3688
3689done
3690# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3691rm -f conftest.err conftest.$ac_ext
3692if $ac_preproc_ok; then
3693 :
3694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003695 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003696See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003697echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003698See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003700fi
3701
3702ac_ext=c
3703ac_cpp='$CPP $CPPFLAGS'
3704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3706ac_compiler_gnu=$ac_cv_c_compiler_gnu
3707
3708
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3710echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003711if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003712 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003714 # Extract the first word of "grep ggrep" to use in msg output
3715if test -z "$GREP"; then
3716set dummy grep ggrep; ac_prog_name=$2
3717if test "${ac_cv_path_GREP+set}" = set; then
3718 echo $ECHO_N "(cached) $ECHO_C" >&6
3719else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003720 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003721# Loop through the user's path and test for each of PROGNAME-LIST
3722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003723for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
3727 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003728 for ac_exec_ext in '' $ac_executable_extensions; do
3729 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3730 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3731 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732 # Check for GNU $ac_path_GREP
3733case `"$ac_path_GREP" --version 2>&1` in
3734*GNU*)
3735 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3736*)
3737 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003738 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003739 while :
3740 do
3741 cat "conftest.in" "conftest.in" >"conftest.tmp"
3742 mv "conftest.tmp" "conftest.in"
3743 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003744 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003745 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3746 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3747 ac_count=`expr $ac_count + 1`
3748 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3749 # Best one so far, save it but keep looking for a better one
3750 ac_cv_path_GREP="$ac_path_GREP"
3751 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003752 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753 # 10*(2^10) chars as input seems more than enough
3754 test $ac_count -gt 10 && break
3755 done
3756 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3757esac
3758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003759
3760 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761 done
3762done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003763
3764done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003765IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003766
3767
3768fi
3769
3770GREP="$ac_cv_path_GREP"
3771if test -z "$GREP"; then
3772 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3773echo "$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 +00003774 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003775fi
3776
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777else
3778 ac_cv_path_GREP=$GREP
3779fi
3780
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003783{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3784echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 GREP="$ac_cv_path_GREP"
3786
3787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003788{ echo "$as_me:$LINENO: checking for egrep" >&5
3789echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792else
3793 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3794 then ac_cv_path_EGREP="$GREP -E"
3795 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003796 # Extract the first word of "egrep" to use in msg output
3797if test -z "$EGREP"; then
3798set dummy egrep; ac_prog_name=$2
3799if test "${ac_cv_path_EGREP+set}" = set; then
3800 echo $ECHO_N "(cached) $ECHO_C" >&6
3801else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003802 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003803# Loop through the user's path and test for each of PROGNAME-LIST
3804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003805for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3806do
3807 IFS=$as_save_IFS
3808 test -z "$as_dir" && as_dir=.
3809 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003810 for ac_exec_ext in '' $ac_executable_extensions; do
3811 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3812 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3813 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814 # Check for GNU $ac_path_EGREP
3815case `"$ac_path_EGREP" --version 2>&1` in
3816*GNU*)
3817 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3818*)
3819 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003820 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821 while :
3822 do
3823 cat "conftest.in" "conftest.in" >"conftest.tmp"
3824 mv "conftest.tmp" "conftest.in"
3825 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003826 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3828 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3829 ac_count=`expr $ac_count + 1`
3830 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3831 # Best one so far, save it but keep looking for a better one
3832 ac_cv_path_EGREP="$ac_path_EGREP"
3833 ac_path_EGREP_max=$ac_count
3834 fi
3835 # 10*(2^10) chars as input seems more than enough
3836 test $ac_count -gt 10 && break
3837 done
3838 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3839esac
3840
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003841
3842 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843 done
3844done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003845
3846done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003848
3849
3850fi
3851
3852EGREP="$ac_cv_path_EGREP"
3853if test -z "$EGREP"; then
3854 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3855echo "$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 +00003856 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003857fi
3858
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859else
3860 ac_cv_path_EGREP=$EGREP
3861fi
3862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003863
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864 fi
3865fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003866{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3867echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003869
3870
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003871
3872{ echo "$as_me:$LINENO: checking for AIX" >&5
3873echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3874cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003875/* confdefs.h. */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003880#ifdef _AIX
3881 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003882#endif
3883
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003884_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3886 $EGREP "yes" >/dev/null 2>&1; then
3887 { echo "$as_me:$LINENO: result: yes" >&5
3888echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003889cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003890#define _ALL_SOURCE 1
3891_ACEOF
3892
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003893else
3894 { echo "$as_me:$LINENO: result: no" >&5
3895echo "${ECHO_T}no" >&6; }
3896fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003897rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003898
3899
3900
3901# Check for unsupported systems
3902case $ac_sys_system/$ac_sys_release in
3903atheos*|Linux*/1*)
3904 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3905 echo See README for details.
3906 exit 1;;
3907esac
3908
3909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003910{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3911echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003912
3913# Check whether --with-suffix was given.
3914if test "${with_suffix+set}" = set; then
3915 withval=$with_suffix;
3916 case $withval in
3917 no) EXEEXT=;;
3918 yes) EXEEXT=.exe;;
3919 *) EXEEXT=$withval;;
3920 esac
3921fi
3922
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003923{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3924echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003925
3926# Test whether we're running on a non-case-sensitive system, in which
3927# case we give a warning if no ext is given
3928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003929{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3930echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003931if test ! -d CaseSensitiveTestDir; then
3932mkdir CaseSensitiveTestDir
3933fi
3934
3935if test -d casesensitivetestdir
3936then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003937 { echo "$as_me:$LINENO: result: yes" >&5
3938echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003939 BUILDEXEEXT=.exe
3940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003941 { echo "$as_me:$LINENO: result: no" >&5
3942echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003943 BUILDEXEEXT=$EXEEXT
3944fi
3945rmdir CaseSensitiveTestDir
3946
3947case $MACHDEP in
3948bsdos*)
3949 case $CC in
3950 gcc) CC="$CC -D_HAVE_BSDI";;
3951 esac;;
3952esac
3953
3954case $ac_sys_system in
3955hp*|HP*)
3956 case $CC in
3957 cc|*/cc) CC="$CC -Ae";;
3958 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003959SunOS*)
3960 # Some functions have a prototype only with that define, e.g. confstr
3961
3962cat >>confdefs.h <<\_ACEOF
3963#define __EXTENSIONS__ 1
3964_ACEOF
3965
3966 ;;
3967esac
3968
3969
3970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003971{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3972echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003973if test -z "$LIBRARY"
3974then
3975 LIBRARY='libpython$(VERSION).a'
3976fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003977{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3978echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003979
3980# LDLIBRARY is the name of the library to link against (as opposed to the
3981# name of the library into which to insert object files). BLDLIBRARY is also
3982# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3983# is blank as the main program is not linked directly against LDLIBRARY.
3984# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3985# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3986# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3987# DLLLIBRARY is the shared (i.e., DLL) library.
3988#
3989# RUNSHARED is used to run shared python without installed libraries
3990#
3991# INSTSONAME is the name of the shared library that will be use to install
3992# on the system - some systems like version suffix, others don't
3993
3994
3995
3996
3997
3998
3999LDLIBRARY="$LIBRARY"
4000BLDLIBRARY='$(LDLIBRARY)'
4001INSTSONAME='$(LDLIBRARY)'
4002DLLLIBRARY=''
4003LDLIBRARYDIR=''
4004RUNSHARED=''
4005
4006# LINKCC is the command that links the python executable -- default is $(CC).
4007# If CXX is set, and if it is needed to link a main function that was
4008# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4009# python might then depend on the C++ runtime
4010# This is altered for AIX in order to build the export list before
4011# linking.
4012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004013{ echo "$as_me:$LINENO: checking LINKCC" >&5
4014echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004015if test -z "$LINKCC"
4016then
4017 LINKCC='$(PURIFY) $(MAINCC)'
4018 case $ac_sys_system in
4019 AIX*)
4020 exp_extra="\"\""
4021 if test $ac_sys_release -ge 5 -o \
4022 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4023 exp_extra="."
4024 fi
4025 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004026 QNX*)
4027 # qcc must be used because the other compilers do not
4028 # support -N.
4029 LINKCC=qcc;;
4030 esac
4031fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004032{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4033echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004034
4035# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4036# make sure we default having it set to "no": this is used by
4037# distutils.unixccompiler to know if it should add --enable-new-dtags
4038# to linker command lines, and failing to detect GNU ld simply results
4039# in the same bahaviour as before.
4040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004041{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4042echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004043ac_prog=ld
4044if test "$GCC" = yes; then
4045 ac_prog=`$CC -print-prog-name=ld`
4046fi
4047case `"$ac_prog" -V 2>&1 < /dev/null` in
4048 *GNU*)
4049 GNULD=yes;;
4050 *)
4051 GNULD=no;;
4052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004053{ echo "$as_me:$LINENO: result: $GNULD" >&5
4054echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004055
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004056{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4057echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004058# Check whether --enable-shared was given.
4059if test "${enable_shared+set}" = set; then
4060 enableval=$enable_shared;
4061fi
4062
4063
4064if test -z "$enable_shared"
4065then
4066 case $ac_sys_system in
4067 CYGWIN* | atheos*)
4068 enable_shared="yes";;
4069 *)
4070 enable_shared="no";;
4071 esac
4072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4074echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004076{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4077echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004078# Check whether --enable-profiling was given.
4079if test "${enable_profiling+set}" = set; then
4080 enableval=$enable_profiling; ac_save_cc="$CC"
4081 CC="$CC -pg"
4082 if test "$cross_compiling" = yes; then
4083 ac_enable_profiling="no"
4084else
4085 cat >conftest.$ac_ext <<_ACEOF
4086/* confdefs.h. */
4087_ACEOF
4088cat confdefs.h >>conftest.$ac_ext
4089cat >>conftest.$ac_ext <<_ACEOF
4090/* end confdefs.h. */
4091int main() { return 0; }
4092_ACEOF
4093rm -f conftest$ac_exeext
4094if { (ac_try="$ac_link"
4095case "(($ac_try" in
4096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097 *) ac_try_echo=$ac_try;;
4098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004100 (eval "$ac_link") 2>&5
4101 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4104 { (case "(($ac_try" in
4105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4106 *) ac_try_echo=$ac_try;;
4107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004109 (eval "$ac_try") 2>&5
4110 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004112 (exit $ac_status); }; }; then
4113 ac_enable_profiling="yes"
4114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004115 echo "$as_me: program exited with status $ac_status" >&5
4116echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004117sed 's/^/| /' conftest.$ac_ext >&5
4118
4119( exit $ac_status )
4120ac_enable_profiling="no"
4121fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4123fi
4124
4125
4126 CC="$ac_save_cc"
4127fi
4128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004129{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4130echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004131
4132case "$ac_enable_profiling" in
4133 "yes")
4134 BASECFLAGS="-pg $BASECFLAGS"
4135 LDFLAGS="-pg $LDFLAGS"
4136 ;;
4137esac
4138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004139{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4140echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004141
4142# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4143# library that we build, but we do not want to link against it (we
4144# will find it with a -framework option). For this reason there is an
4145# extra variable BLDLIBRARY against which Python and the extension
4146# modules are linked, BLDLIBRARY. This is normally the same as
4147# LDLIBRARY, but empty for MacOSX framework builds.
4148if test "$enable_framework"
4149then
4150 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4151 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4152 BLDLIBRARY=''
4153else
4154 BLDLIBRARY='$(LDLIBRARY)'
4155fi
4156
4157# Other platforms follow
4158if test $enable_shared = "yes"; then
4159
4160cat >>confdefs.h <<\_ACEOF
4161#define Py_ENABLE_SHARED 1
4162_ACEOF
4163
4164 case $ac_sys_system in
4165 BeOS*)
4166 LDLIBRARY='libpython$(VERSION).so'
4167 ;;
4168 CYGWIN*)
4169 LDLIBRARY='libpython$(VERSION).dll.a'
4170 DLLLIBRARY='libpython$(VERSION).dll'
4171 ;;
4172 SunOS*)
4173 LDLIBRARY='libpython$(VERSION).so'
4174 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4176 INSTSONAME="$LDLIBRARY".$SOVERSION
4177 ;;
4178 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4179 LDLIBRARY='libpython$(VERSION).so'
4180 BLDLIBRARY='-L. -lpython$(VERSION)'
4181 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4182 case $ac_sys_system in
4183 FreeBSD*)
4184 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4185 ;;
4186 esac
4187 INSTSONAME="$LDLIBRARY".$SOVERSION
4188 ;;
4189 hp*|HP*)
4190 case `uname -m` in
4191 ia64)
4192 LDLIBRARY='libpython$(VERSION).so'
4193 ;;
4194 *)
4195 LDLIBRARY='libpython$(VERSION).sl'
4196 ;;
4197 esac
4198 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4199 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4200 ;;
4201 OSF*)
4202 LDLIBRARY='libpython$(VERSION).so'
4203 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4204 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4205 ;;
4206 atheos*)
4207 LDLIBRARY='libpython$(VERSION).so'
4208 BLDLIBRARY='-L. -lpython$(VERSION)'
4209 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4210 ;;
4211 Darwin*)
4212 LDLIBRARY='libpython$(VERSION).dylib'
4213 BLDLIBRARY='-L. -lpython$(VERSION)'
4214 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4215 ;;
4216
4217 esac
4218else # shared is disabled
4219 case $ac_sys_system in
4220 CYGWIN*)
4221 BLDLIBRARY='$(LIBRARY)'
4222 LDLIBRARY='libpython$(VERSION).dll.a'
4223 ;;
4224 esac
4225fi
4226
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004227{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4228echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004229
4230if test -n "$ac_tool_prefix"; then
4231 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4232set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004233{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4234echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004235if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004236 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004237else
4238 if test -n "$RANLIB"; then
4239 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4240else
4241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4242for as_dir in $PATH
4243do
4244 IFS=$as_save_IFS
4245 test -z "$as_dir" && as_dir=.
4246 for ac_exec_ext in '' $ac_executable_extensions; do
4247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4248 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004250 break 2
4251 fi
4252done
4253done
4254IFS=$as_save_IFS
4255
4256fi
4257fi
4258RANLIB=$ac_cv_prog_RANLIB
4259if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4261echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004262else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004263 { echo "$as_me:$LINENO: result: no" >&5
4264echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004265fi
4266
4267
4268fi
4269if test -z "$ac_cv_prog_RANLIB"; then
4270 ac_ct_RANLIB=$RANLIB
4271 # Extract the first word of "ranlib", so it can be a program name with args.
4272set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004275if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004276 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004277else
4278 if test -n "$ac_ct_RANLIB"; then
4279 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4280else
4281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282for as_dir in $PATH
4283do
4284 IFS=$as_save_IFS
4285 test -z "$as_dir" && as_dir=.
4286 for ac_exec_ext in '' $ac_executable_extensions; do
4287 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4288 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004289 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004290 break 2
4291 fi
4292done
4293done
4294IFS=$as_save_IFS
4295
4296fi
4297fi
4298ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4299if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004300 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4301echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004303 { echo "$as_me:$LINENO: result: no" >&5
4304echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004305fi
4306
4307 if test "x$ac_ct_RANLIB" = x; then
4308 RANLIB=":"
4309 else
4310 case $cross_compiling:$ac_tool_warned in
4311yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004312{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4313whose name does not start with the host triplet. If you think this
4314configuration is useful to you, please write to autoconf@gnu.org." >&5
4315echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4316whose name does not start with the host triplet. If you think this
4317configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004318ac_tool_warned=yes ;;
4319esac
4320 RANLIB=$ac_ct_RANLIB
4321 fi
4322else
4323 RANLIB="$ac_cv_prog_RANLIB"
4324fi
4325
4326
4327for ac_prog in ar aal
4328do
4329 # Extract the first word of "$ac_prog", so it can be a program name with args.
4330set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004333if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004334 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004335else
4336 if test -n "$AR"; then
4337 ac_cv_prog_AR="$AR" # Let the user override the test.
4338else
4339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in $PATH
4341do
4342 IFS=$as_save_IFS
4343 test -z "$as_dir" && as_dir=.
4344 for ac_exec_ext in '' $ac_executable_extensions; do
4345 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4346 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004347 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004348 break 2
4349 fi
4350done
4351done
4352IFS=$as_save_IFS
4353
4354fi
4355fi
4356AR=$ac_cv_prog_AR
4357if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004358 { echo "$as_me:$LINENO: result: $AR" >&5
4359echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004361 { echo "$as_me:$LINENO: result: no" >&5
4362echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004363fi
4364
4365
4366 test -n "$AR" && break
4367done
4368test -n "$AR" || AR="ar"
4369
4370
4371# tweak ARFLAGS only if the user didn't set it on the command line
4372
4373if test -z "$ARFLAGS"
4374then
4375 ARFLAGS="rc"
4376fi
4377
4378
4379# Extract the first word of "svnversion", so it can be a program name with args.
4380set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004383if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004384 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004385else
4386 if test -n "$SVNVERSION"; then
4387 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4388else
4389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH
4391do
4392 IFS=$as_save_IFS
4393 test -z "$as_dir" && as_dir=.
4394 for ac_exec_ext in '' $ac_executable_extensions; do
4395 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4396 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004398 break 2
4399 fi
4400done
4401done
4402IFS=$as_save_IFS
4403
4404 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4405fi
4406fi
4407SVNVERSION=$ac_cv_prog_SVNVERSION
4408if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004409 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4410echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004412 { echo "$as_me:$LINENO: result: no" >&5
4413echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004414fi
4415
4416
4417if test $SVNVERSION = found
4418then
4419 SVNVERSION="svnversion \$(srcdir)"
4420else
4421 SVNVERSION="echo Unversioned directory"
4422fi
4423
4424case $MACHDEP in
4425bsdos*|hp*|HP*)
4426 # install -d does not work on BSDI or HP-UX
4427 if test -z "$INSTALL"
4428 then
4429 INSTALL="${srcdir}/install-sh -c"
4430 fi
4431esac
4432ac_aux_dir=
4433for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4434 if test -f "$ac_dir/install-sh"; then
4435 ac_aux_dir=$ac_dir
4436 ac_install_sh="$ac_aux_dir/install-sh -c"
4437 break
4438 elif 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/shtool"; then
4443 ac_aux_dir=$ac_dir
4444 ac_install_sh="$ac_aux_dir/shtool install -c"
4445 break
4446 fi
4447done
4448if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004449 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4450echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004451 { (exit 1); exit 1; }; }
4452fi
4453
4454# These three variables are undocumented and unsupported,
4455# and are intended to be withdrawn in a future Autoconf release.
4456# They can cause serious problems if a builder's source tree is in a directory
4457# whose full name contains unusual characters.
4458ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4459ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4460ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4461
4462
4463# Find a good install program. We prefer a C program (faster),
4464# so one script is as good as another. But avoid the broken or
4465# incompatible versions:
4466# SysV /etc/install, /usr/sbin/install
4467# SunOS /usr/etc/install
4468# IRIX /sbin/install
4469# AIX /bin/install
4470# AmigaOS /C/install, which installs bootblocks on floppy discs
4471# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4472# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4473# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4474# OS/2's system install, which has a completely different semantic
4475# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004476{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4477echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004478if test -z "$INSTALL"; then
4479if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004480 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004481else
4482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4483for as_dir in $PATH
4484do
4485 IFS=$as_save_IFS
4486 test -z "$as_dir" && as_dir=.
4487 # Account for people who put trailing slashes in PATH elements.
4488case $as_dir/ in
4489 ./ | .// | /cC/* | \
4490 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4491 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4492 /usr/ucb/* ) ;;
4493 *)
4494 # OSF1 and SCO ODT 3.0 have their own names for install.
4495 # Don't use installbsd from OSF since it installs stuff as root
4496 # by default.
4497 for ac_prog in ginstall scoinst install; do
4498 for ac_exec_ext in '' $ac_executable_extensions; do
4499 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4500 if test $ac_prog = install &&
4501 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4502 # AIX install. It has an incompatible calling convention.
4503 :
4504 elif test $ac_prog = install &&
4505 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4506 # program-specific install script used by HP pwplus--don't use.
4507 :
4508 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004509 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4510 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004511 fi
4512 fi
4513 done
4514 done
4515 ;;
4516esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004517done
4518IFS=$as_save_IFS
4519
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004520
4521fi
4522 if test "${ac_cv_path_install+set}" = set; then
4523 INSTALL=$ac_cv_path_install
4524 else
4525 # As a last resort, use the slow shell script. Don't cache a
4526 # value for INSTALL within a source directory, because that will
4527 # break other packages using the cache if that directory is
4528 # removed, or if the value is a relative name.
4529 INSTALL=$ac_install_sh
4530 fi
4531fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004532{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4533echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004534
4535# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4536# It thinks the first close brace ends the variable substitution.
4537test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4538
4539test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4540
4541test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4542
4543
4544# Not every filesystem supports hard links
4545
4546if test -z "$LN" ; then
4547 case $ac_sys_system in
4548 BeOS*) LN="ln -s";;
4549 CYGWIN*) LN="ln -s";;
4550 atheos*) LN="ln -s";;
4551 *) LN=ln;;
4552 esac
4553fi
4554
4555# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004556{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4557echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004558
4559# Check whether --with-pydebug was given.
4560if test "${with_pydebug+set}" = set; then
4561 withval=$with_pydebug;
4562if test "$withval" != no
4563then
4564
4565cat >>confdefs.h <<\_ACEOF
4566#define Py_DEBUG 1
4567_ACEOF
4568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004569 { echo "$as_me:$LINENO: result: yes" >&5
4570echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004571 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004572else { echo "$as_me:$LINENO: result: no" >&5
4573echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004574fi
4575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004576 { echo "$as_me:$LINENO: result: no" >&5
4577echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004578fi
4579
4580
4581# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4582# merged with this chunk of code?
4583
4584# Optimizer/debugger flags
4585# ------------------------
4586# (The following bit of code is complicated enough - please keep things
4587# indented properly. Just pretend you're editing Python code. ;-)
4588
4589# There are two parallel sets of case statements below, one that checks to
4590# see if OPT was set and one that does BASECFLAGS setting based upon
4591# compiler and platform. BASECFLAGS tweaks need to be made even if the
4592# user set OPT.
4593
4594# tweak OPT based on compiler and platform, only if the user didn't set
4595# it on the command line
4596
4597if test -z "$OPT"
4598then
4599 case $GCC in
4600 yes)
4601 if test "$CC" != 'g++' ; then
4602 STRICT_PROTO="-Wstrict-prototypes"
4603 fi
4604 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4605 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4606 WRAP="-fwrapv"
4607 fi
4608 case $ac_cv_prog_cc_g in
4609 yes)
4610 if test "$Py_DEBUG" = 'true' ; then
4611 # Optimization messes up debuggers, so turn it off for
4612 # debug builds.
4613 OPT="-g -Wall $STRICT_PROTO"
4614 else
4615 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4616 fi
4617 ;;
4618 *)
4619 OPT="-O3 -Wall $STRICT_PROTO"
4620 ;;
4621 esac
4622 case $ac_sys_system in
4623 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4624 ;;
4625 esac
4626 ;;
4627
4628 *)
4629 OPT="-O"
4630 ;;
4631 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004632fi
4633
4634
4635
4636# The -arch flags for universal builds on OSX
4637UNIVERSAL_ARCH_FLAGS=
4638
4639
4640# tweak BASECFLAGS based on compiler and platform
4641case $GCC in
4642yes)
4643 # Python violates C99 rules, by casting between incompatible
4644 # pointer types. GCC may generate bad code as a result of that,
4645 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004646 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4647echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004648 ac_save_cc="$CC"
4649 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004650 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4651 echo $ECHO_N "(cached) $ECHO_C" >&6
4652else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653 cat >conftest.$ac_ext <<_ACEOF
4654/* confdefs.h. */
4655_ACEOF
4656cat confdefs.h >>conftest.$ac_ext
4657cat >>conftest.$ac_ext <<_ACEOF
4658/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004659
4660int
4661main ()
4662{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004663int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664 ;
4665 return 0;
4666}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004667_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004668rm -f conftest.$ac_objext
4669if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004670case "(($ac_try" in
4671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4672 *) ac_try_echo=$ac_try;;
4673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004675 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004676 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004677 grep -v '^ *+' conftest.er1 >conftest.err
4678 rm -f conftest.er1
4679 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004681 (exit $ac_status); } && {
4682 test -z "$ac_c_werror_flag" ||
4683 test ! -s conftest.err
4684 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004685 ac_cv_no_strict_aliasing_ok=yes
4686else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004687 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004688sed 's/^/| /' conftest.$ac_ext >&5
4689
Gregory P. Smith373469a2009-11-01 21:03:38 +00004690 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004691fi
4692
Gregory P. Smith373469a2009-11-01 21:03:38 +00004693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004694fi
4695
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004696 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004697 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4698echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004699 if test $ac_cv_no_strict_aliasing_ok = yes
4700 then
4701 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4702 fi
4703
4704 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4705 # support. Without this, treatment of subnormals doesn't follow
4706 # the standard.
4707 case $ac_sys_machine in
4708 alpha*)
4709 BASECFLAGS="$BASECFLAGS -mieee"
4710 ;;
4711 esac
4712
4713 case $ac_sys_system in
4714 SCO_SV*)
4715 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4716 ;;
4717 # is there any other compiler on Darwin besides gcc?
4718 Darwin*)
4719 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4720 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004721 if test "${CC}" = gcc
4722 then
4723 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4724echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4725 case "${UNIVERSALSDK}" in
4726 */MacOSX10.4u.sdk)
4727 # Build using 10.4 SDK, force usage of gcc when the
4728 # compiler is gcc, otherwise the user will get very
4729 # confusing error messages when building on OSX 10.6
4730 CC=gcc-4.0
4731 CPP=cpp-4.0
4732 ;;
4733 esac
4734 { echo "$as_me:$LINENO: result: $CC" >&5
4735echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004736 fi
4737
4738 # Calculate the right deployment target for this build.
4739 #
4740 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4741 if test ${cur_target} '>' 10.2; then
4742 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004743 if test ${enable_universalsdk}; then
4744 if test "${UNIVERSAL_ARCHS}" = "all"; then
4745 # Ensure that the default platform for a
4746 # 4-way universal build is OSX 10.5,
4747 # that's the first OS release where
4748 # 4-way builds make sense.
4749 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004750
4751 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4752 cur_target='10.5'
4753
4754 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4755 cur_target='10.5'
4756
4757 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4758 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004759 fi
4760 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004761 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004762 # On Intel macs default to a deployment
4763 # target of 10.4, that's the first OSX
4764 # release with Intel support.
4765 cur_target="10.4"
4766 fi
4767 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004768 fi
4769 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4770
4771 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4772 # environment with a value that is the same as what we'll use
4773 # in the Makefile to ensure that we'll get the same compiler
4774 # environment during configure and build time.
4775 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4776 export MACOSX_DEPLOYMENT_TARGET
4777 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4778
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004779 if test "${enable_universalsdk}"; then
4780 UNIVERSAL_ARCH_FLAGS=""
4781 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4782 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4783 ARCH_RUN_32BIT=""
4784 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4785
4786
4787 # You have to use different flags on various versions of
4788 # OSX to extract PPC code from an universal binary, basically
4789 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4790 # newer.
4791 # Because '-arch pp7400' works on OSX 10.5 or higher this
4792 # test is only present in the '32-bit' branch, all other
4793 # branches require OSX 10.5 to compile.
4794
4795 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4796echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4797 FN="test.$$"
4798 cat >${FN}.c <<-EOF
4799 int main() { return 0; }
4800EOF
4801 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4802 if test $? != 0 ; then
4803 rm ${FN} ${FN}.c
4804 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4805echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4806 else
4807 lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
4808 if test $? != 0 ; then
4809 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4810 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4811echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4812 else
4813 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4814echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4815 fi
4816 rm -f ${FN} ${FN}.c ${FN}.out
4817 fi
4818
4819 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4820 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4821 LIPO_32BIT_FLAGS=""
4822 ARCH_RUN_32BIT="true"
4823
4824 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4825 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4826 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004827 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004828
4829 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4830 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4831 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004832 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004833
4834 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4835 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4836 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004837 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004838
4839 else
4840 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4841echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4842 { (exit 1); exit 1; }; }
4843
4844 fi
4845
4846
4847 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4848 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4849 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4850 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4851 CPPFLAGS="-isysroot ${UNIVERSALSDK}"
4852 fi
4853
4854 fi
4855
4856
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004857 ;;
4858 OSF*)
4859 BASECFLAGS="$BASECFLAGS -mieee"
4860 ;;
4861 esac
4862 ;;
4863
4864*)
4865 case $ac_sys_system in
4866 OpenUNIX*|UnixWare*)
4867 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4868 ;;
4869 OSF*)
4870 BASECFLAGS="$BASECFLAGS -ieee -std"
4871 ;;
4872 SCO_SV*)
4873 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4874 ;;
4875 esac
4876 ;;
4877esac
4878
4879if test "$Py_DEBUG" = 'true'; then
4880 :
4881else
4882 OPT="-DNDEBUG $OPT"
4883fi
4884
4885if test "$ac_arch_flags"
4886then
4887 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4888fi
4889
4890# disable check for icc since it seems to pass, but generates a warning
4891if test "$CC" = icc
4892then
4893 ac_cv_opt_olimit_ok=no
4894fi
4895
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004896{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4897echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004899 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004900else
4901 ac_save_cc="$CC"
4902CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004903cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004904/* confdefs.h. */
4905_ACEOF
4906cat confdefs.h >>conftest.$ac_ext
4907cat >>conftest.$ac_ext <<_ACEOF
4908/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004909
4910int
4911main ()
4912{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004913int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004914 ;
4915 return 0;
4916}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004918rm -f conftest.$ac_objext
4919if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004920case "(($ac_try" in
4921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4922 *) ac_try_echo=$ac_try;;
4923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004925 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004926 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004927 grep -v '^ *+' conftest.er1 >conftest.err
4928 rm -f conftest.er1
4929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004931 (exit $ac_status); } && {
4932 test -z "$ac_c_werror_flag" ||
4933 test ! -s conftest.err
4934 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004935 ac_cv_opt_olimit_ok=yes
4936else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004937 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938sed 's/^/| /' conftest.$ac_ext >&5
4939
Gregory P. Smith373469a2009-11-01 21:03:38 +00004940 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004941fi
4942
Gregory P. Smith373469a2009-11-01 21:03:38 +00004943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004944CC="$ac_save_cc"
4945fi
4946
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004947{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4948echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004949if test $ac_cv_opt_olimit_ok = yes; then
4950 case $ac_sys_system in
4951 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4952 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4953 # environment?
4954 Darwin*)
4955 ;;
4956 *)
4957 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4958 ;;
4959 esac
4960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004961 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4962echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004963 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965else
4966 ac_save_cc="$CC"
4967 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004968 cat >conftest.$ac_ext <<_ACEOF
4969/* confdefs.h. */
4970_ACEOF
4971cat confdefs.h >>conftest.$ac_ext
4972cat >>conftest.$ac_ext <<_ACEOF
4973/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004974
4975int
4976main ()
4977{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004979 ;
4980 return 0;
4981}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004983rm -f conftest.$ac_objext
4984if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985case "(($ac_try" in
4986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4987 *) ac_try_echo=$ac_try;;
4988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004990 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004991 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004992 grep -v '^ *+' conftest.er1 >conftest.err
4993 rm -f conftest.er1
4994 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004996 (exit $ac_status); } && {
4997 test -z "$ac_c_werror_flag" ||
4998 test ! -s conftest.err
4999 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005000 ac_cv_olimit_ok=yes
5001else
Gregory P. Smith373469a2009-11-01 21:03:38 +00005002 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003sed 's/^/| /' conftest.$ac_ext >&5
5004
Gregory P. Smith373469a2009-11-01 21:03:38 +00005005 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006fi
5007
Gregory P. Smith373469a2009-11-01 21:03:38 +00005008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005009 CC="$ac_save_cc"
5010fi
5011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005012 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5013echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014 if test $ac_cv_olimit_ok = yes; then
5015 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5016 fi
5017fi
5018
5019# Check whether GCC supports PyArg_ParseTuple format
5020if test "$GCC" = "yes"
5021then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005022 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5023echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005024 save_CFLAGS=$CFLAGS
5025 CFLAGS="$CFLAGS -Werror"
5026 cat >conftest.$ac_ext <<_ACEOF
5027/* confdefs.h. */
5028_ACEOF
5029cat confdefs.h >>conftest.$ac_ext
5030cat >>conftest.$ac_ext <<_ACEOF
5031/* end confdefs.h. */
5032
5033 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5034
5035int
5036main ()
5037{
5038
5039 ;
5040 return 0;
5041}
5042_ACEOF
5043rm -f conftest.$ac_objext
5044if { (ac_try="$ac_compile"
5045case "(($ac_try" in
5046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5047 *) ac_try_echo=$ac_try;;
5048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050 (eval "$ac_compile") 2>conftest.er1
5051 ac_status=$?
5052 grep -v '^ *+' conftest.er1 >conftest.err
5053 rm -f conftest.er1
5054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056 (exit $ac_status); } && {
5057 test -z "$ac_c_werror_flag" ||
5058 test ! -s conftest.err
5059 } && test -s conftest.$ac_objext; then
5060
5061cat >>confdefs.h <<\_ACEOF
5062#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5063_ACEOF
5064
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005065 { echo "$as_me:$LINENO: result: yes" >&5
5066echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005068 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005071 { echo "$as_me:$LINENO: result: no" >&5
5072echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005073
5074fi
5075
5076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5077 CFLAGS=$save_CFLAGS
5078fi
5079
5080# On some compilers, pthreads are available without further options
5081# (e.g. MacOS X). On some of these systems, the compiler will not
5082# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5083# So we have to see first whether pthreads are available without
5084# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005085{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5086echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005087if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005088 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089else
5090 if test "$cross_compiling" = yes; then
5091 ac_cv_pthread_is_default=no
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
5094/* confdefs.h. */
5095_ACEOF
5096cat confdefs.h >>conftest.$ac_ext
5097cat >>conftest.$ac_ext <<_ACEOF
5098/* end confdefs.h. */
5099
5100#include <pthread.h>
5101
5102void* routine(void* p){return NULL;}
5103
5104int main(){
5105 pthread_t p;
5106 if(pthread_create(&p,NULL,routine,NULL)!=0)
5107 return 1;
5108 (void)pthread_detach(p);
5109 return 0;
5110}
5111
5112_ACEOF
5113rm -f conftest$ac_exeext
5114if { (ac_try="$ac_link"
5115case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005120 (eval "$ac_link") 2>&5
5121 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5124 { (case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005129 (eval "$ac_try") 2>&5
5130 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005132 (exit $ac_status); }; }; then
5133
5134 ac_cv_pthread_is_default=yes
5135 ac_cv_kthread=no
5136 ac_cv_pthread=no
5137
5138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005139 echo "$as_me: program exited with status $ac_status" >&5
5140echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141sed 's/^/| /' conftest.$ac_ext >&5
5142
5143( exit $ac_status )
5144ac_cv_pthread_is_default=no
5145fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5147fi
5148
5149
5150
5151fi
5152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005153{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5154echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005155
5156
5157if test $ac_cv_pthread_is_default = yes
5158then
5159 ac_cv_kpthread=no
5160else
5161# -Kpthread, if available, provides the right #defines
5162# and linker options to make pthread_create available
5163# Some compilers won't report that they do not support -Kpthread,
5164# so we need to run a program to see whether it really made the
5165# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005166{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5167echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005168if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005169 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005170else
5171 ac_save_cc="$CC"
5172CC="$CC -Kpthread"
5173if test "$cross_compiling" = yes; then
5174 ac_cv_kpthread=no
5175else
5176 cat >conftest.$ac_ext <<_ACEOF
5177/* confdefs.h. */
5178_ACEOF
5179cat confdefs.h >>conftest.$ac_ext
5180cat >>conftest.$ac_ext <<_ACEOF
5181/* end confdefs.h. */
5182
5183#include <pthread.h>
5184
5185void* routine(void* p){return NULL;}
5186
5187int main(){
5188 pthread_t p;
5189 if(pthread_create(&p,NULL,routine,NULL)!=0)
5190 return 1;
5191 (void)pthread_detach(p);
5192 return 0;
5193}
5194
5195_ACEOF
5196rm -f conftest$ac_exeext
5197if { (ac_try="$ac_link"
5198case "(($ac_try" in
5199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5200 *) ac_try_echo=$ac_try;;
5201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203 (eval "$ac_link") 2>&5
5204 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5207 { (case "(($ac_try" in
5208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5209 *) ac_try_echo=$ac_try;;
5210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212 (eval "$ac_try") 2>&5
5213 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215 (exit $ac_status); }; }; then
5216 ac_cv_kpthread=yes
5217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005218 echo "$as_me: program exited with status $ac_status" >&5
5219echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220sed 's/^/| /' conftest.$ac_ext >&5
5221
5222( exit $ac_status )
5223ac_cv_kpthread=no
5224fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5226fi
5227
5228
5229CC="$ac_save_cc"
5230fi
5231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005232{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5233echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234fi
5235
5236if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5237then
5238# -Kthread, if available, provides the right #defines
5239# and linker options to make pthread_create available
5240# Some compilers won't report that they do not support -Kthread,
5241# so we need to run a program to see whether it really made the
5242# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005243{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5244echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005245if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005246 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005247else
5248 ac_save_cc="$CC"
5249CC="$CC -Kthread"
5250if test "$cross_compiling" = yes; then
5251 ac_cv_kthread=no
5252else
5253 cat >conftest.$ac_ext <<_ACEOF
5254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
5259
5260#include <pthread.h>
5261
5262void* routine(void* p){return NULL;}
5263
5264int main(){
5265 pthread_t p;
5266 if(pthread_create(&p,NULL,routine,NULL)!=0)
5267 return 1;
5268 (void)pthread_detach(p);
5269 return 0;
5270}
5271
5272_ACEOF
5273rm -f conftest$ac_exeext
5274if { (ac_try="$ac_link"
5275case "(($ac_try" in
5276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5277 *) ac_try_echo=$ac_try;;
5278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280 (eval "$ac_link") 2>&5
5281 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5284 { (case "(($ac_try" in
5285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5286 *) ac_try_echo=$ac_try;;
5287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289 (eval "$ac_try") 2>&5
5290 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292 (exit $ac_status); }; }; then
5293 ac_cv_kthread=yes
5294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005295 echo "$as_me: program exited with status $ac_status" >&5
5296echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297sed 's/^/| /' conftest.$ac_ext >&5
5298
5299( exit $ac_status )
5300ac_cv_kthread=no
5301fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5303fi
5304
5305
5306CC="$ac_save_cc"
5307fi
5308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005309{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5310echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311fi
5312
5313if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5314then
5315# -pthread, if available, provides the right #defines
5316# and linker options to make pthread_create available
5317# Some compilers won't report that they do not support -pthread,
5318# so we need to run a program to see whether it really made the
5319# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005320{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5321echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005322if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005323 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005324else
5325 ac_save_cc="$CC"
5326CC="$CC -pthread"
5327if test "$cross_compiling" = yes; then
5328 ac_cv_pthread=no
5329else
5330 cat >conftest.$ac_ext <<_ACEOF
5331/* confdefs.h. */
5332_ACEOF
5333cat confdefs.h >>conftest.$ac_ext
5334cat >>conftest.$ac_ext <<_ACEOF
5335/* end confdefs.h. */
5336
5337#include <pthread.h>
5338
5339void* routine(void* p){return NULL;}
5340
5341int main(){
5342 pthread_t p;
5343 if(pthread_create(&p,NULL,routine,NULL)!=0)
5344 return 1;
5345 (void)pthread_detach(p);
5346 return 0;
5347}
5348
5349_ACEOF
5350rm -f conftest$ac_exeext
5351if { (ac_try="$ac_link"
5352case "(($ac_try" in
5353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5354 *) ac_try_echo=$ac_try;;
5355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357 (eval "$ac_link") 2>&5
5358 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5361 { (case "(($ac_try" in
5362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5363 *) ac_try_echo=$ac_try;;
5364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366 (eval "$ac_try") 2>&5
5367 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369 (exit $ac_status); }; }; then
5370 ac_cv_pthread=yes
5371else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005372 echo "$as_me: program exited with status $ac_status" >&5
5373echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374sed 's/^/| /' conftest.$ac_ext >&5
5375
5376( exit $ac_status )
5377ac_cv_pthread=no
5378fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5380fi
5381
5382
5383CC="$ac_save_cc"
5384fi
5385
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005386{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5387echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388fi
5389
5390# If we have set a CC compiler flag for thread support then
5391# check if it works for CXX, too.
5392ac_cv_cxx_thread=no
5393if test ! -z "$CXX"
5394then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005395{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5396echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005397ac_save_cxx="$CXX"
5398
5399if test "$ac_cv_kpthread" = "yes"
5400then
5401 CXX="$CXX -Kpthread"
5402 ac_cv_cxx_thread=yes
5403elif test "$ac_cv_kthread" = "yes"
5404then
5405 CXX="$CXX -Kthread"
5406 ac_cv_cxx_thread=yes
5407elif test "$ac_cv_pthread" = "yes"
5408then
5409 CXX="$CXX -pthread"
5410 ac_cv_cxx_thread=yes
5411fi
5412
5413if test $ac_cv_cxx_thread = yes
5414then
5415 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5416 $CXX -c conftest.$ac_ext 2>&5
5417 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5418 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5419 then
5420 ac_cv_cxx_thread=yes
5421 else
5422 ac_cv_cxx_thread=no
5423 fi
5424 rm -fr conftest*
5425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005426{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5427echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428fi
5429CXX="$ac_save_cxx"
5430
5431
5432# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005433{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5434echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005436 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437else
5438 cat >conftest.$ac_ext <<_ACEOF
5439/* confdefs.h. */
5440_ACEOF
5441cat confdefs.h >>conftest.$ac_ext
5442cat >>conftest.$ac_ext <<_ACEOF
5443/* end confdefs.h. */
5444#include <stdlib.h>
5445#include <stdarg.h>
5446#include <string.h>
5447#include <float.h>
5448
5449int
5450main ()
5451{
5452
5453 ;
5454 return 0;
5455}
5456_ACEOF
5457rm -f conftest.$ac_objext
5458if { (ac_try="$ac_compile"
5459case "(($ac_try" in
5460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5461 *) ac_try_echo=$ac_try;;
5462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 (eval "$ac_compile") 2>conftest.er1
5465 ac_status=$?
5466 grep -v '^ *+' conftest.er1 >conftest.err
5467 rm -f conftest.er1
5468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470 (exit $ac_status); } && {
5471 test -z "$ac_c_werror_flag" ||
5472 test ! -s conftest.err
5473 } && test -s conftest.$ac_objext; then
5474 ac_cv_header_stdc=yes
5475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005476 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005477sed 's/^/| /' conftest.$ac_ext >&5
5478
5479 ac_cv_header_stdc=no
5480fi
5481
5482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5483
5484if test $ac_cv_header_stdc = yes; then
5485 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5486 cat >conftest.$ac_ext <<_ACEOF
5487/* confdefs.h. */
5488_ACEOF
5489cat confdefs.h >>conftest.$ac_ext
5490cat >>conftest.$ac_ext <<_ACEOF
5491/* end confdefs.h. */
5492#include <string.h>
5493
5494_ACEOF
5495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5496 $EGREP "memchr" >/dev/null 2>&1; then
5497 :
5498else
5499 ac_cv_header_stdc=no
5500fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00005501rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502
5503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5507 cat >conftest.$ac_ext <<_ACEOF
5508/* confdefs.h. */
5509_ACEOF
5510cat confdefs.h >>conftest.$ac_ext
5511cat >>conftest.$ac_ext <<_ACEOF
5512/* end confdefs.h. */
5513#include <stdlib.h>
5514
5515_ACEOF
5516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5517 $EGREP "free" >/dev/null 2>&1; then
5518 :
5519else
5520 ac_cv_header_stdc=no
5521fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00005522rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005523
5524fi
5525
5526if test $ac_cv_header_stdc = yes; then
5527 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5528 if test "$cross_compiling" = yes; then
5529 :
5530else
5531 cat >conftest.$ac_ext <<_ACEOF
5532/* confdefs.h. */
5533_ACEOF
5534cat confdefs.h >>conftest.$ac_ext
5535cat >>conftest.$ac_ext <<_ACEOF
5536/* end confdefs.h. */
5537#include <ctype.h>
5538#include <stdlib.h>
5539#if ((' ' & 0x0FF) == 0x020)
5540# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5541# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5542#else
5543# define ISLOWER(c) \
5544 (('a' <= (c) && (c) <= 'i') \
5545 || ('j' <= (c) && (c) <= 'r') \
5546 || ('s' <= (c) && (c) <= 'z'))
5547# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5548#endif
5549
5550#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5551int
5552main ()
5553{
5554 int i;
5555 for (i = 0; i < 256; i++)
5556 if (XOR (islower (i), ISLOWER (i))
5557 || toupper (i) != TOUPPER (i))
5558 return 2;
5559 return 0;
5560}
5561_ACEOF
5562rm -f conftest$ac_exeext
5563if { (ac_try="$ac_link"
5564case "(($ac_try" in
5565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5566 *) ac_try_echo=$ac_try;;
5567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005569 (eval "$ac_link") 2>&5
5570 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5573 { (case "(($ac_try" in
5574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5575 *) ac_try_echo=$ac_try;;
5576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005578 (eval "$ac_try") 2>&5
5579 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005581 (exit $ac_status); }; }; then
5582 :
5583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005584 echo "$as_me: program exited with status $ac_status" >&5
5585echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586sed 's/^/| /' conftest.$ac_ext >&5
5587
5588( exit $ac_status )
5589ac_cv_header_stdc=no
5590fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5592fi
5593
5594
5595fi
5596fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005597{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5598echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005599if test $ac_cv_header_stdc = yes; then
5600
5601cat >>confdefs.h <<\_ACEOF
5602#define STDC_HEADERS 1
5603_ACEOF
5604
5605fi
5606
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005607# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5618 inttypes.h stdint.h unistd.h
5619do
5620as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5621{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5623if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5624 echo $ECHO_N "(cached) $ECHO_C" >&6
5625else
5626 cat >conftest.$ac_ext <<_ACEOF
5627/* confdefs.h. */
5628_ACEOF
5629cat confdefs.h >>conftest.$ac_ext
5630cat >>conftest.$ac_ext <<_ACEOF
5631/* end confdefs.h. */
5632$ac_includes_default
5633
5634#include <$ac_header>
5635_ACEOF
5636rm -f conftest.$ac_objext
5637if { (ac_try="$ac_compile"
5638case "(($ac_try" in
5639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5640 *) ac_try_echo=$ac_try;;
5641esac
5642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5643 (eval "$ac_compile") 2>conftest.er1
5644 ac_status=$?
5645 grep -v '^ *+' conftest.er1 >conftest.err
5646 rm -f conftest.er1
5647 cat conftest.err >&5
5648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649 (exit $ac_status); } && {
5650 test -z "$ac_c_werror_flag" ||
5651 test ! -s conftest.err
5652 } && test -s conftest.$ac_objext; then
5653 eval "$as_ac_Header=yes"
5654else
5655 echo "$as_me: failed program was:" >&5
5656sed 's/^/| /' conftest.$ac_ext >&5
5657
5658 eval "$as_ac_Header=no"
5659fi
5660
5661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5662fi
5663ac_res=`eval echo '${'$as_ac_Header'}'`
5664 { echo "$as_me:$LINENO: result: $ac_res" >&5
5665echo "${ECHO_T}$ac_res" >&6; }
5666if test `eval echo '${'$as_ac_Header'}'` = yes; then
5667 cat >>confdefs.h <<_ACEOF
5668#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5669_ACEOF
5670
5671fi
5672
5673done
5674
5675
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005676
Martin v. Löwis11437992002-04-12 09:54:03 +00005677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
Anthony Baxter8a560de2004-10-13 15:30:56 +00005712
Martin v. Löwisc3001752005-01-23 09:27:24 +00005713
Martin v. Löwis11017b12006-01-14 18:12:57 +00005714
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005715
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005716
5717
5718
5719
5720
5721
5722
5723
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005724
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005725
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005726
5727
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005728
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005729
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005730
5731
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005732for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5733fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005734ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005735shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005736unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005737sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5738sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005739sys/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 +00005740sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005741sys/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 +00005742sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005743bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005744do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005745as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005746if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5748echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005752ac_res=`eval echo '${'$as_ac_Header'}'`
5753 { echo "$as_me:$LINENO: result: $ac_res" >&5
5754echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005755else
Martin v. Löwis11437992002-04-12 09:54:03 +00005756 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005757{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5758echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005760/* confdefs.h. */
5761_ACEOF
5762cat confdefs.h >>conftest.$ac_ext
5763cat >>conftest.$ac_ext <<_ACEOF
5764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005765$ac_includes_default
5766#include <$ac_header>
5767_ACEOF
5768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005769if { (ac_try="$ac_compile"
5770case "(($ac_try" in
5771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5772 *) ac_try_echo=$ac_try;;
5773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 grep -v '^ *+' conftest.er1 >conftest.err
5778 rm -f conftest.er1
5779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781 (exit $ac_status); } && {
5782 test -z "$ac_c_werror_flag" ||
5783 test ! -s conftest.err
5784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005786else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005788sed 's/^/| /' conftest.$ac_ext >&5
5789
Martin v. Löwiseba40652007-08-30 20:10:57 +00005790 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792
5793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005794{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5795echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005796
5797# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005798{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5799echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005801/* confdefs.h. */
5802_ACEOF
5803cat confdefs.h >>conftest.$ac_ext
5804cat >>conftest.$ac_ext <<_ACEOF
5805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005806#include <$ac_header>
5807_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005808if { (ac_try="$ac_cpp conftest.$ac_ext"
5809case "(($ac_try" in
5810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5811 *) ac_try_echo=$ac_try;;
5812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005814 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005816 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 rm -f conftest.er1
5818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005820 (exit $ac_status); } >/dev/null && {
5821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5822 test ! -s conftest.err
5823 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005824 ac_header_preproc=yes
5825else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005827sed 's/^/| /' conftest.$ac_ext >&5
5828
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831
Martin v. Löwis11437992002-04-12 09:54:03 +00005832rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005833{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5834echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005835
5836# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5838 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005839 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5840echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5841 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5842echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005843 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005844 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005845 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005846 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5847echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5848 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5849echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5850 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5851echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5852 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5853echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5854 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5855echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5856 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5857echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005858 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005859## -------------------------------------- ##
5860## Report this to http://bugs.python.org/ ##
5861## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005862_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005863 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005864 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005866{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005868if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005869 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005870else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005871 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005872fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005873ac_res=`eval echo '${'$as_ac_Header'}'`
5874 { echo "$as_me:$LINENO: result: $ac_res" >&5
5875echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005876
5877fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005878if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005880#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005881_ACEOF
5882
5883fi
5884
Guido van Rossum627b2d71993-12-24 10:39:16 +00005885done
5886
Martin v. Löwis11437992002-04-12 09:54:03 +00005887
5888
5889
5890
5891
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005892ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005893for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005894 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5895{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5896echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005899else
Martin v. Löwis11437992002-04-12 09:54:03 +00005900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005901/* confdefs.h. */
5902_ACEOF
5903cat confdefs.h >>conftest.$ac_ext
5904cat >>conftest.$ac_ext <<_ACEOF
5905/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005906#include <sys/types.h>
5907#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005908
Martin v. Löwis11437992002-04-12 09:54:03 +00005909int
5910main ()
5911{
5912if ((DIR *) 0)
5913return 0;
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919if { (ac_try="$ac_compile"
5920case "(($ac_try" in
5921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5922 *) ac_try_echo=$ac_try;;
5923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005927 grep -v '^ *+' conftest.er1 >conftest.err
5928 rm -f conftest.er1
5929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931 (exit $ac_status); } && {
5932 test -z "$ac_c_werror_flag" ||
5933 test ! -s conftest.err
5934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005935 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Martin v. Löwiseba40652007-08-30 20:10:57 +00005940 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005942
5943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005944fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005945ac_res=`eval echo '${'$as_ac_Header'}'`
5946 { echo "$as_me:$LINENO: result: $ac_res" >&5
5947echo "${ECHO_T}$ac_res" >&6; }
5948if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005949 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005950#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005951_ACEOF
5952
5953ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005954fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005955
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956done
5957# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5958if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005959 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5960echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005961if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963else
Martin v. Löwis11437992002-04-12 09:54:03 +00005964 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005966/* confdefs.h. */
5967_ACEOF
5968cat confdefs.h >>conftest.$ac_ext
5969cat >>conftest.$ac_ext <<_ACEOF
5970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005971
Martin v. Löwiseba40652007-08-30 20:10:57 +00005972/* Override any GCC internal prototype to avoid an error.
5973 Use char because int might match the return type of a GCC
5974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005975#ifdef __cplusplus
5976extern "C"
5977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005978char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005979int
5980main ()
5981{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005983 ;
5984 return 0;
5985}
5986_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005987for ac_lib in '' dir; do
5988 if test -z "$ac_lib"; then
5989 ac_res="none required"
5990 else
5991 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005993 fi
5994 rm -f conftest.$ac_objext conftest$ac_exeext
5995if { (ac_try="$ac_link"
5996case "(($ac_try" in
5997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5998 *) ac_try_echo=$ac_try;;
5999esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006001 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006002 ac_status=$?
6003 grep -v '^ *+' conftest.er1 >conftest.err
6004 rm -f conftest.er1
6005 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006007 (exit $ac_status); } && {
6008 test -z "$ac_c_werror_flag" ||
6009 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006010 } && test -s conftest$ac_exeext &&
6011 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006012 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006014 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006015sed 's/^/| /' conftest.$ac_ext >&5
6016
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017
Brett Cannon19fab762007-06-02 03:02:29 +00006018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019
6020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6021 conftest$ac_exeext
6022 if test "${ac_cv_search_opendir+set}" = set; then
6023 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025done
6026if test "${ac_cv_search_opendir+set}" = set; then
6027 :
6028else
6029 ac_cv_search_opendir=no
6030fi
6031rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006032LIBS=$ac_func_search_save_LIBS
6033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006034{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6035echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036ac_res=$ac_cv_search_opendir
6037if test "$ac_res" != no; then
6038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006040fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006041
Michael W. Hudson54241132001-12-07 15:38:26 +00006042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006043 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6044echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006045if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006047else
6048 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006050/* confdefs.h. */
6051_ACEOF
6052cat confdefs.h >>conftest.$ac_ext
6053cat >>conftest.$ac_ext <<_ACEOF
6054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006055
Martin v. Löwiseba40652007-08-30 20:10:57 +00006056/* Override any GCC internal prototype to avoid an error.
6057 Use char because int might match the return type of a GCC
6058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006059#ifdef __cplusplus
6060extern "C"
6061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006062char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006063int
6064main ()
6065{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006066return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006067 ;
6068 return 0;
6069}
6070_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006071for ac_lib in '' x; do
6072 if test -z "$ac_lib"; then
6073 ac_res="none required"
6074 else
6075 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006076 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext
6079if { (ac_try="$ac_link"
6080case "(($ac_try" in
6081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6082 *) ac_try_echo=$ac_try;;
6083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006086 ac_status=$?
6087 grep -v '^ *+' conftest.er1 >conftest.err
6088 rm -f conftest.er1
6089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006091 (exit $ac_status); } && {
6092 test -z "$ac_c_werror_flag" ||
6093 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006094 } && test -s conftest$ac_exeext &&
6095 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006096 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006098 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006099sed 's/^/| /' conftest.$ac_ext >&5
6100
Martin v. Löwiseba40652007-08-30 20:10:57 +00006101
Brett Cannon19fab762007-06-02 03:02:29 +00006102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006103
6104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6105 conftest$ac_exeext
6106 if test "${ac_cv_search_opendir+set}" = set; then
6107 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006109done
6110if test "${ac_cv_search_opendir+set}" = set; then
6111 :
6112else
6113 ac_cv_search_opendir=no
6114fi
6115rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006116LIBS=$ac_func_search_save_LIBS
6117fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006118{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6119echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006120ac_res=$ac_cv_search_opendir
6121if test "$ac_res" != no; then
6122 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006124fi
6125
6126fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006127
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006128{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6129echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006131 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132else
6133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006134/* confdefs.h. */
6135_ACEOF
6136cat confdefs.h >>conftest.$ac_ext
6137cat >>conftest.$ac_ext <<_ACEOF
6138/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140int
6141main ()
6142{
6143return makedev(0, 0);
6144 ;
6145 return 0;
6146}
6147_ACEOF
6148rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149if { (ac_try="$ac_link"
6150case "(($ac_try" in
6151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6152 *) ac_try_echo=$ac_try;;
6153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006157 grep -v '^ *+' conftest.er1 >conftest.err
6158 rm -f conftest.er1
6159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161 (exit $ac_status); } && {
6162 test -z "$ac_c_werror_flag" ||
6163 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006164 } && test -s conftest$ac_exeext &&
6165 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166 ac_cv_header_sys_types_h_makedev=yes
6167else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006169sed 's/^/| /' conftest.$ac_ext >&5
6170
Martin v. Löwiseba40652007-08-30 20:10:57 +00006171 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006173
6174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176
6177fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006178{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6179echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180
6181if test $ac_cv_header_sys_types_h_makedev = no; then
6182if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006183 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6184echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006186 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006188{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6189echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190else
6191 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006192{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6193echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006195/* confdefs.h. */
6196_ACEOF
6197cat confdefs.h >>conftest.$ac_ext
6198cat >>conftest.$ac_ext <<_ACEOF
6199/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200$ac_includes_default
6201#include <sys/mkdev.h>
6202_ACEOF
6203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204if { (ac_try="$ac_compile"
6205case "(($ac_try" in
6206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6207 *) ac_try_echo=$ac_try;;
6208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006212 grep -v '^ *+' conftest.er1 >conftest.err
6213 rm -f conftest.er1
6214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216 (exit $ac_status); } && {
6217 test -z "$ac_c_werror_flag" ||
6218 test ! -s conftest.err
6219 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220 ac_header_compiler=yes
6221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006223sed 's/^/| /' conftest.$ac_ext >&5
6224
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227
6228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006229{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6230echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231
6232# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006233{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6234echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006236/* confdefs.h. */
6237_ACEOF
6238cat confdefs.h >>conftest.$ac_ext
6239cat >>conftest.$ac_ext <<_ACEOF
6240/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241#include <sys/mkdev.h>
6242_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006243if { (ac_try="$ac_cpp conftest.$ac_ext"
6244case "(($ac_try" in
6245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6246 *) ac_try_echo=$ac_try;;
6247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006249 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006251 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252 rm -f conftest.er1
6253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006255 (exit $ac_status); } >/dev/null && {
6256 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6257 test ! -s conftest.err
6258 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006259 ac_header_preproc=yes
6260else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006262sed 's/^/| /' conftest.$ac_ext >&5
6263
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 ac_header_preproc=no
6265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006268{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6269echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270
6271# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006272case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6273 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006274 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6275echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6276 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6277echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006278 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006279 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006280 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006281 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6282echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6283 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6284echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6285 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6286echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6287 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6288echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6289 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6290echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6291 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6292echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006293 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006294## -------------------------------------- ##
6295## Report this to http://bugs.python.org/ ##
6296## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006297_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006299 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006301{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6302echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006304 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305else
6306 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6307fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006308{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6309echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310
6311fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006312if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313
6314cat >>confdefs.h <<\_ACEOF
6315#define MAJOR_IN_MKDEV 1
6316_ACEOF
6317
6318fi
6319
6320
6321
6322 if test $ac_cv_header_sys_mkdev_h = no; then
6323 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006324 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6325echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006326if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6330echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331else
6332 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006333{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6334echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006336/* confdefs.h. */
6337_ACEOF
6338cat confdefs.h >>conftest.$ac_ext
6339cat >>conftest.$ac_ext <<_ACEOF
6340/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341$ac_includes_default
6342#include <sys/sysmacros.h>
6343_ACEOF
6344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006345if { (ac_try="$ac_compile"
6346case "(($ac_try" in
6347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6348 *) ac_try_echo=$ac_try;;
6349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006353 grep -v '^ *+' conftest.er1 >conftest.err
6354 rm -f conftest.er1
6355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357 (exit $ac_status); } && {
6358 test -z "$ac_c_werror_flag" ||
6359 test ! -s conftest.err
6360 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361 ac_header_compiler=yes
6362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006364sed 's/^/| /' conftest.$ac_ext >&5
6365
Martin v. Löwiseba40652007-08-30 20:10:57 +00006366 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006368
6369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006370{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6371echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006372
6373# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006374{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6375echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006377/* confdefs.h. */
6378_ACEOF
6379cat confdefs.h >>conftest.$ac_ext
6380cat >>conftest.$ac_ext <<_ACEOF
6381/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006382#include <sys/sysmacros.h>
6383_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006384if { (ac_try="$ac_cpp conftest.$ac_ext"
6385case "(($ac_try" in
6386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6387 *) ac_try_echo=$ac_try;;
6388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006390 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006391 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006392 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006393 rm -f conftest.er1
6394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396 (exit $ac_status); } >/dev/null && {
6397 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6398 test ! -s conftest.err
6399 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006400 ac_header_preproc=yes
6401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006403sed 's/^/| /' conftest.$ac_ext >&5
6404
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006405 ac_header_preproc=no
6406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006408rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006409{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6410echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006411
6412# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006413case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6414 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6416echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6417 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6418echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006419 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006420 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006421 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6423echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6424 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6425echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6426 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6427echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6428 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6429echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6430 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6431echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6432 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6433echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006435## -------------------------------------- ##
6436## Report this to http://bugs.python.org/ ##
6437## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006438_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006440 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006442{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6443echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006444if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006445 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006446else
6447 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6448fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006449{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6450echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006451
6452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006453if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006454
6455cat >>confdefs.h <<\_ACEOF
6456#define MAJOR_IN_SYSMACROS 1
6457_ACEOF
6458
6459fi
6460
6461
6462 fi
6463fi
6464
Michael W. Hudson54241132001-12-07 15:38:26 +00006465
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006466# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006467
6468for ac_header in term.h
6469do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006470as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6471{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006473if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006475else
6476 cat >conftest.$ac_ext <<_ACEOF
6477/* confdefs.h. */
6478_ACEOF
6479cat confdefs.h >>conftest.$ac_ext
6480cat >>conftest.$ac_ext <<_ACEOF
6481/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006482
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006483#ifdef HAVE_CURSES_H
6484#include <curses.h>
6485#endif
6486
6487
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006488#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006489_ACEOF
6490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006491if { (ac_try="$ac_compile"
6492case "(($ac_try" in
6493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6494 *) ac_try_echo=$ac_try;;
6495esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006498 ac_status=$?
6499 grep -v '^ *+' conftest.er1 >conftest.err
6500 rm -f conftest.er1
6501 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006503 (exit $ac_status); } && {
6504 test -z "$ac_c_werror_flag" ||
6505 test ! -s conftest.err
6506 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006507 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006508else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006509 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006510sed 's/^/| /' conftest.$ac_ext >&5
6511
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006514
6515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006516fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006517ac_res=`eval echo '${'$as_ac_Header'}'`
6518 { echo "$as_me:$LINENO: result: $ac_res" >&5
6519echo "${ECHO_T}$ac_res" >&6; }
6520if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006521 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006522#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006523_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006524
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006525fi
6526
6527done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006528
6529
Martin v. Löwis11017b12006-01-14 18:12:57 +00006530# On Linux, netlink.h requires asm/types.h
6531
6532for ac_header in linux/netlink.h
6533do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6535{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006539else
6540 cat >conftest.$ac_ext <<_ACEOF
6541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
6546
6547#ifdef HAVE_ASM_TYPES_H
6548#include <asm/types.h>
6549#endif
6550#ifdef HAVE_SYS_SOCKET_H
6551#include <sys/socket.h>
6552#endif
6553
6554
6555#include <$ac_header>
6556_ACEOF
6557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558if { (ac_try="$ac_compile"
6559case "(($ac_try" in
6560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561 *) ac_try_echo=$ac_try;;
6562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006565 ac_status=$?
6566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006570 (exit $ac_status); } && {
6571 test -z "$ac_c_werror_flag" ||
6572 test ! -s conftest.err
6573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006574 eval "$as_ac_Header=yes"
6575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006576 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006577sed 's/^/| /' conftest.$ac_ext >&5
6578
Martin v. Löwiseba40652007-08-30 20:10:57 +00006579 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581
6582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006583fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006584ac_res=`eval echo '${'$as_ac_Header'}'`
6585 { echo "$as_me:$LINENO: result: $ac_res" >&5
6586echo "${ECHO_T}$ac_res" >&6; }
6587if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006588 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006589#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006590_ACEOF
6591
6592fi
6593
6594done
6595
6596
Guido van Rossum627b2d71993-12-24 10:39:16 +00006597# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006598was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006599{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6600echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006602/* confdefs.h. */
6603_ACEOF
6604cat confdefs.h >>conftest.$ac_ext
6605cat >>conftest.$ac_ext <<_ACEOF
6606/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006607#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006608
6609_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006611 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006612 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006613else
Martin v. Löwis11437992002-04-12 09:54:03 +00006614
6615
6616cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006617#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006618_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006619
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006620
Guido van Rossum627b2d71993-12-24 10:39:16 +00006621fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00006622rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006623
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006624{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6625echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006626
Neal Norwitz11690112002-07-30 01:08:28 +00006627# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006628{ echo "$as_me:$LINENO: checking for makedev" >&5
6629echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006631/* confdefs.h. */
6632_ACEOF
6633cat confdefs.h >>conftest.$ac_ext
6634cat >>conftest.$ac_ext <<_ACEOF
6635/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006636#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006637int
6638main ()
6639{
6640 makedev(0, 0)
6641 ;
6642 return 0;
6643}
6644_ACEOF
6645rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006646if { (ac_try="$ac_link"
6647case "(($ac_try" in
6648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6649 *) ac_try_echo=$ac_try;;
6650esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006652 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006654 grep -v '^ *+' conftest.er1 >conftest.err
6655 rm -f conftest.er1
6656 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006658 (exit $ac_status); } && {
6659 test -z "$ac_c_werror_flag" ||
6660 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006661 } && test -s conftest$ac_exeext &&
6662 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006663 ac_cv_has_makedev=yes
6664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006666sed 's/^/| /' conftest.$ac_ext >&5
6667
Martin v. Löwiseba40652007-08-30 20:10:57 +00006668 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670
6671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006672 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006673if test "$ac_cv_has_makedev" = "no"; then
6674 # we didn't link, try if _OSF_SOURCE will allow us to link
6675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006676/* confdefs.h. */
6677_ACEOF
6678cat confdefs.h >>conftest.$ac_ext
6679cat >>conftest.$ac_ext <<_ACEOF
6680/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006681
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006682#define _OSF_SOURCE 1
6683#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006684
Neal Norwitz11690112002-07-30 01:08:28 +00006685int
6686main ()
6687{
6688 makedev(0, 0)
6689 ;
6690 return 0;
6691}
6692_ACEOF
6693rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694if { (ac_try="$ac_link"
6695case "(($ac_try" in
6696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6697 *) ac_try_echo=$ac_try;;
6698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006702 grep -v '^ *+' conftest.er1 >conftest.err
6703 rm -f conftest.er1
6704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706 (exit $ac_status); } && {
6707 test -z "$ac_c_werror_flag" ||
6708 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006709 } && test -s conftest$ac_exeext &&
6710 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006711 ac_cv_has_makedev=yes
6712else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006714sed 's/^/| /' conftest.$ac_ext >&5
6715
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718
6719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006720 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006721 if test "$ac_cv_has_makedev" = "yes"; then
6722
6723cat >>confdefs.h <<\_ACEOF
6724#define _OSF_SOURCE 1
6725_ACEOF
6726
6727 fi
6728fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006729{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6730echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006731if test "$ac_cv_has_makedev" = "yes"; then
6732
6733cat >>confdefs.h <<\_ACEOF
6734#define HAVE_MAKEDEV 1
6735_ACEOF
6736
6737fi
6738
Martin v. Löwis399a6892002-10-04 10:22:02 +00006739# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6740# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6741# defined, but the compiler does not support pragma redefine_extname,
6742# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6743# structures (such as rlimit64) without declaring them. As a
6744# work-around, disable LFS on such configurations
6745
6746use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6748echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006750/* confdefs.h. */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006755
6756#define _LARGEFILE_SOURCE 1
6757#define _FILE_OFFSET_BITS 64
6758#include <sys/resource.h>
6759
Martin v. Löwis399a6892002-10-04 10:22:02 +00006760int
6761main ()
6762{
6763struct rlimit foo;
6764 ;
6765 return 0;
6766}
6767_ACEOF
6768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769if { (ac_try="$ac_compile"
6770case "(($ac_try" in
6771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6772 *) ac_try_echo=$ac_try;;
6773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006777 grep -v '^ *+' conftest.er1 >conftest.err
6778 rm -f conftest.er1
6779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006781 (exit $ac_status); } && {
6782 test -z "$ac_c_werror_flag" ||
6783 test ! -s conftest.err
6784 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006785 sol_lfs_bug=no
6786else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006788sed 's/^/| /' conftest.$ac_ext >&5
6789
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792
6793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006794{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6795echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006796if test "$sol_lfs_bug" = "yes"; then
6797 use_lfs=no
6798fi
6799
6800if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006801# Two defines needed to enable largefile support on various platforms
6802# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804cat >>confdefs.h <<\_ACEOF
6805#define _LARGEFILE_SOURCE 1
6806_ACEOF
6807
6808
6809cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006810#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006811_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006812
Martin v. Löwis399a6892002-10-04 10:22:02 +00006813fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006814
Guido van Rossum84e7b241996-08-19 21:59:00 +00006815# Add some code to confdefs.h so that the test for off_t works on SCO
6816cat >> confdefs.h <<\EOF
6817#if defined(SCO_DS)
6818#undef _OFF_T
6819#endif
6820EOF
6821
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006823{ echo "$as_me:$LINENO: checking for mode_t" >&5
6824echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006825if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006827else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006828 cat >conftest.$ac_ext <<_ACEOF
6829/* confdefs.h. */
6830_ACEOF
6831cat confdefs.h >>conftest.$ac_ext
6832cat >>conftest.$ac_ext <<_ACEOF
6833/* end confdefs.h. */
6834$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006836int
6837main ()
6838{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839if ((ac__type_new_ *) 0)
6840 return 0;
6841if (sizeof (ac__type_new_))
6842 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006843 ;
6844 return 0;
6845}
6846_ACEOF
6847rm -f conftest.$ac_objext
6848if { (ac_try="$ac_compile"
6849case "(($ac_try" in
6850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6851 *) ac_try_echo=$ac_try;;
6852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006854 (eval "$ac_compile") 2>conftest.er1
6855 ac_status=$?
6856 grep -v '^ *+' conftest.er1 >conftest.err
6857 rm -f conftest.er1
6858 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006860 (exit $ac_status); } && {
6861 test -z "$ac_c_werror_flag" ||
6862 test ! -s conftest.err
6863 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006864 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006865else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006867sed 's/^/| /' conftest.$ac_ext >&5
6868
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006869 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006871
6872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006873fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006874{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6875echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6876if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006878else
Martin v. Löwis11437992002-04-12 09:54:03 +00006879
6880cat >>confdefs.h <<_ACEOF
6881#define mode_t int
6882_ACEOF
6883
6884fi
6885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006886{ echo "$as_me:$LINENO: checking for off_t" >&5
6887echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006888if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006890else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006891 cat >conftest.$ac_ext <<_ACEOF
6892/* confdefs.h. */
6893_ACEOF
6894cat confdefs.h >>conftest.$ac_ext
6895cat >>conftest.$ac_ext <<_ACEOF
6896/* end confdefs.h. */
6897$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006899int
6900main ()
6901{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902if ((ac__type_new_ *) 0)
6903 return 0;
6904if (sizeof (ac__type_new_))
6905 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006906 ;
6907 return 0;
6908}
6909_ACEOF
6910rm -f conftest.$ac_objext
6911if { (ac_try="$ac_compile"
6912case "(($ac_try" in
6913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6914 *) ac_try_echo=$ac_try;;
6915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006917 (eval "$ac_compile") 2>conftest.er1
6918 ac_status=$?
6919 grep -v '^ *+' conftest.er1 >conftest.err
6920 rm -f conftest.er1
6921 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006923 (exit $ac_status); } && {
6924 test -z "$ac_c_werror_flag" ||
6925 test ! -s conftest.err
6926 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006927 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006930sed 's/^/| /' conftest.$ac_ext >&5
6931
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006932 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934
6935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006936fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006937{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6938echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6939if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941else
Martin v. Löwis11437992002-04-12 09:54:03 +00006942
6943cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006944#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006945_ACEOF
6946
6947fi
6948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006949{ echo "$as_me:$LINENO: checking for pid_t" >&5
6950echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006951if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006953else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006954 cat >conftest.$ac_ext <<_ACEOF
6955/* confdefs.h. */
6956_ACEOF
6957cat confdefs.h >>conftest.$ac_ext
6958cat >>conftest.$ac_ext <<_ACEOF
6959/* end confdefs.h. */
6960$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006961typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006962int
6963main ()
6964{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006965if ((ac__type_new_ *) 0)
6966 return 0;
6967if (sizeof (ac__type_new_))
6968 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006969 ;
6970 return 0;
6971}
6972_ACEOF
6973rm -f conftest.$ac_objext
6974if { (ac_try="$ac_compile"
6975case "(($ac_try" in
6976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6977 *) ac_try_echo=$ac_try;;
6978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980 (eval "$ac_compile") 2>conftest.er1
6981 ac_status=$?
6982 grep -v '^ *+' conftest.er1 >conftest.err
6983 rm -f conftest.er1
6984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006986 (exit $ac_status); } && {
6987 test -z "$ac_c_werror_flag" ||
6988 test ! -s conftest.err
6989 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006990 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006993sed 's/^/| /' conftest.$ac_ext >&5
6994
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006995 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006997
6998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006999fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007000{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7001echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
7002if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007003 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004else
Martin v. Löwis11437992002-04-12 09:54:03 +00007005
7006cat >>confdefs.h <<_ACEOF
7007#define pid_t int
7008_ACEOF
7009
7010fi
7011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007012{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7013echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007014if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007016else
7017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007023#include <sys/types.h>
7024#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007025
Martin v. Löwis11437992002-04-12 09:54:03 +00007026int
7027main ()
7028{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035if { (ac_try="$ac_compile"
7036case "(($ac_try" in
7037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7038 *) ac_try_echo=$ac_try;;
7039esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007043 grep -v '^ *+' conftest.er1 >conftest.err
7044 rm -f conftest.er1
7045 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007047 (exit $ac_status); } && {
7048 test -z "$ac_c_werror_flag" ||
7049 test ! -s conftest.err
7050 } && test -s conftest.$ac_objext; then
7051 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007054sed 's/^/| /' conftest.$ac_ext >&5
7055
Martin v. Löwiseba40652007-08-30 20:10:57 +00007056 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007058
7059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007061{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7062echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007063
Martin v. Löwis11437992002-04-12 09:54:03 +00007064cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007065#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007066_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007067
Michael W. Hudson54241132001-12-07 15:38:26 +00007068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007069{ echo "$as_me:$LINENO: checking for size_t" >&5
7070echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007071if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007074 cat >conftest.$ac_ext <<_ACEOF
7075/* confdefs.h. */
7076_ACEOF
7077cat confdefs.h >>conftest.$ac_ext
7078cat >>conftest.$ac_ext <<_ACEOF
7079/* end confdefs.h. */
7080$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007081typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007082int
7083main ()
7084{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085if ((ac__type_new_ *) 0)
7086 return 0;
7087if (sizeof (ac__type_new_))
7088 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007089 ;
7090 return 0;
7091}
7092_ACEOF
7093rm -f conftest.$ac_objext
7094if { (ac_try="$ac_compile"
7095case "(($ac_try" in
7096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7097 *) ac_try_echo=$ac_try;;
7098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007100 (eval "$ac_compile") 2>conftest.er1
7101 ac_status=$?
7102 grep -v '^ *+' conftest.er1 >conftest.err
7103 rm -f conftest.er1
7104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007106 (exit $ac_status); } && {
7107 test -z "$ac_c_werror_flag" ||
7108 test ! -s conftest.err
7109 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007110 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007111else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007113sed 's/^/| /' conftest.$ac_ext >&5
7114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007115 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007117
7118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007120{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7121echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7122if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007124else
Martin v. Löwis11437992002-04-12 09:54:03 +00007125
7126cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007128_ACEOF
7129
7130fi
7131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007132{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7133echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007134if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007135 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007136else
7137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007138/* confdefs.h. */
7139_ACEOF
7140cat confdefs.h >>conftest.$ac_ext
7141cat >>conftest.$ac_ext <<_ACEOF
7142/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007147 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148 ac_cv_type_uid_t=yes
7149else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007150 ac_cv_type_uid_t=no
7151fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00007152rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007154fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007155{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7156echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007157if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007158
Martin v. Löwis11437992002-04-12 09:54:03 +00007159cat >>confdefs.h <<\_ACEOF
7160#define uid_t int
7161_ACEOF
7162
7163
7164cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007167
7168fi
7169
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007170
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007171 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7172echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007173if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007174 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007175else
7176 ac_cv_c_uint32_t=no
7177 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7178 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7179 cat >conftest.$ac_ext <<_ACEOF
7180/* confdefs.h. */
7181_ACEOF
7182cat confdefs.h >>conftest.$ac_ext
7183cat >>conftest.$ac_ext <<_ACEOF
7184/* end confdefs.h. */
7185$ac_includes_default
7186int
7187main ()
7188{
7189static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7190test_array [0] = 0
7191
7192 ;
7193 return 0;
7194}
7195_ACEOF
7196rm -f conftest.$ac_objext
7197if { (ac_try="$ac_compile"
7198case "(($ac_try" in
7199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7200 *) ac_try_echo=$ac_try;;
7201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007203 (eval "$ac_compile") 2>conftest.er1
7204 ac_status=$?
7205 grep -v '^ *+' conftest.er1 >conftest.err
7206 rm -f conftest.er1
7207 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007209 (exit $ac_status); } && {
7210 test -z "$ac_c_werror_flag" ||
7211 test ! -s conftest.err
7212 } && test -s conftest.$ac_objext; then
7213 case $ac_type in
7214 uint32_t) ac_cv_c_uint32_t=yes ;;
7215 *) ac_cv_c_uint32_t=$ac_type ;;
7216esac
7217
7218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007219 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220sed 's/^/| /' conftest.$ac_ext >&5
7221
7222
7223fi
7224
7225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7226 test "$ac_cv_c_uint32_t" != no && break
7227 done
7228fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007229{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7230echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007231 case $ac_cv_c_uint32_t in #(
7232 no|yes) ;; #(
7233 *)
7234
7235cat >>confdefs.h <<\_ACEOF
7236#define _UINT32_T 1
7237_ACEOF
7238
7239
7240cat >>confdefs.h <<_ACEOF
7241#define uint32_t $ac_cv_c_uint32_t
7242_ACEOF
7243;;
7244 esac
7245
7246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007247 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7248echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007249if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007250 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007251else
7252 ac_cv_c_uint64_t=no
7253 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7254 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7255 cat >conftest.$ac_ext <<_ACEOF
7256/* confdefs.h. */
7257_ACEOF
7258cat confdefs.h >>conftest.$ac_ext
7259cat >>conftest.$ac_ext <<_ACEOF
7260/* end confdefs.h. */
7261$ac_includes_default
7262int
7263main ()
7264{
7265static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7266test_array [0] = 0
7267
7268 ;
7269 return 0;
7270}
7271_ACEOF
7272rm -f conftest.$ac_objext
7273if { (ac_try="$ac_compile"
7274case "(($ac_try" in
7275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7276 *) ac_try_echo=$ac_try;;
7277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007279 (eval "$ac_compile") 2>conftest.er1
7280 ac_status=$?
7281 grep -v '^ *+' conftest.er1 >conftest.err
7282 rm -f conftest.er1
7283 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007285 (exit $ac_status); } && {
7286 test -z "$ac_c_werror_flag" ||
7287 test ! -s conftest.err
7288 } && test -s conftest.$ac_objext; then
7289 case $ac_type in
7290 uint64_t) ac_cv_c_uint64_t=yes ;;
7291 *) ac_cv_c_uint64_t=$ac_type ;;
7292esac
7293
7294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007295 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007296sed 's/^/| /' conftest.$ac_ext >&5
7297
7298
7299fi
7300
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7302 test "$ac_cv_c_uint64_t" != no && break
7303 done
7304fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007305{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7306echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007307 case $ac_cv_c_uint64_t in #(
7308 no|yes) ;; #(
7309 *)
7310
7311cat >>confdefs.h <<\_ACEOF
7312#define _UINT64_T 1
7313_ACEOF
7314
7315
7316cat >>confdefs.h <<_ACEOF
7317#define uint64_t $ac_cv_c_uint64_t
7318_ACEOF
7319;;
7320 esac
7321
7322
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007323 { echo "$as_me:$LINENO: checking for int32_t" >&5
7324echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007325if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007326 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007327else
7328 ac_cv_c_int32_t=no
7329 for ac_type in 'int32_t' 'int' 'long int' \
7330 'long long int' 'short int' 'signed char'; do
7331 cat >conftest.$ac_ext <<_ACEOF
7332/* confdefs.h. */
7333_ACEOF
7334cat confdefs.h >>conftest.$ac_ext
7335cat >>conftest.$ac_ext <<_ACEOF
7336/* end confdefs.h. */
7337$ac_includes_default
7338int
7339main ()
7340{
7341static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7342test_array [0] = 0
7343
7344 ;
7345 return 0;
7346}
7347_ACEOF
7348rm -f conftest.$ac_objext
7349if { (ac_try="$ac_compile"
7350case "(($ac_try" in
7351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7352 *) ac_try_echo=$ac_try;;
7353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007355 (eval "$ac_compile") 2>conftest.er1
7356 ac_status=$?
7357 grep -v '^ *+' conftest.er1 >conftest.err
7358 rm -f conftest.er1
7359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007361 (exit $ac_status); } && {
7362 test -z "$ac_c_werror_flag" ||
7363 test ! -s conftest.err
7364 } && test -s conftest.$ac_objext; then
7365 cat >conftest.$ac_ext <<_ACEOF
7366/* confdefs.h. */
7367_ACEOF
7368cat confdefs.h >>conftest.$ac_ext
7369cat >>conftest.$ac_ext <<_ACEOF
7370/* end confdefs.h. */
7371$ac_includes_default
7372int
7373main ()
7374{
7375static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007376 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007377test_array [0] = 0
7378
7379 ;
7380 return 0;
7381}
7382_ACEOF
7383rm -f conftest.$ac_objext
7384if { (ac_try="$ac_compile"
7385case "(($ac_try" in
7386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7387 *) ac_try_echo=$ac_try;;
7388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007390 (eval "$ac_compile") 2>conftest.er1
7391 ac_status=$?
7392 grep -v '^ *+' conftest.er1 >conftest.err
7393 rm -f conftest.er1
7394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007396 (exit $ac_status); } && {
7397 test -z "$ac_c_werror_flag" ||
7398 test ! -s conftest.err
7399 } && test -s conftest.$ac_objext; then
7400 :
7401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007402 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007403sed 's/^/| /' conftest.$ac_ext >&5
7404
7405 case $ac_type in
7406 int32_t) ac_cv_c_int32_t=yes ;;
7407 *) ac_cv_c_int32_t=$ac_type ;;
7408esac
7409
7410fi
7411
7412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007414 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007415sed 's/^/| /' conftest.$ac_ext >&5
7416
7417
7418fi
7419
7420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421 test "$ac_cv_c_int32_t" != no && break
7422 done
7423fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007424{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7425echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007426 case $ac_cv_c_int32_t in #(
7427 no|yes) ;; #(
7428 *)
7429
7430cat >>confdefs.h <<_ACEOF
7431#define int32_t $ac_cv_c_int32_t
7432_ACEOF
7433;;
7434 esac
7435
7436
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007437 { echo "$as_me:$LINENO: checking for int64_t" >&5
7438echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007439if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007440 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007441else
7442 ac_cv_c_int64_t=no
7443 for ac_type in 'int64_t' 'int' 'long int' \
7444 'long long int' 'short int' 'signed char'; do
7445 cat >conftest.$ac_ext <<_ACEOF
7446/* confdefs.h. */
7447_ACEOF
7448cat confdefs.h >>conftest.$ac_ext
7449cat >>conftest.$ac_ext <<_ACEOF
7450/* end confdefs.h. */
7451$ac_includes_default
7452int
7453main ()
7454{
7455static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7456test_array [0] = 0
7457
7458 ;
7459 return 0;
7460}
7461_ACEOF
7462rm -f conftest.$ac_objext
7463if { (ac_try="$ac_compile"
7464case "(($ac_try" in
7465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7466 *) ac_try_echo=$ac_try;;
7467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007469 (eval "$ac_compile") 2>conftest.er1
7470 ac_status=$?
7471 grep -v '^ *+' conftest.er1 >conftest.err
7472 rm -f conftest.er1
7473 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007475 (exit $ac_status); } && {
7476 test -z "$ac_c_werror_flag" ||
7477 test ! -s conftest.err
7478 } && test -s conftest.$ac_objext; then
7479 cat >conftest.$ac_ext <<_ACEOF
7480/* confdefs.h. */
7481_ACEOF
7482cat confdefs.h >>conftest.$ac_ext
7483cat >>conftest.$ac_ext <<_ACEOF
7484/* end confdefs.h. */
7485$ac_includes_default
7486int
7487main ()
7488{
7489static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007490 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007491test_array [0] = 0
7492
7493 ;
7494 return 0;
7495}
7496_ACEOF
7497rm -f conftest.$ac_objext
7498if { (ac_try="$ac_compile"
7499case "(($ac_try" in
7500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7501 *) ac_try_echo=$ac_try;;
7502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007504 (eval "$ac_compile") 2>conftest.er1
7505 ac_status=$?
7506 grep -v '^ *+' conftest.er1 >conftest.err
7507 rm -f conftest.er1
7508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007510 (exit $ac_status); } && {
7511 test -z "$ac_c_werror_flag" ||
7512 test ! -s conftest.err
7513 } && test -s conftest.$ac_objext; then
7514 :
7515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007516 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007517sed 's/^/| /' conftest.$ac_ext >&5
7518
7519 case $ac_type in
7520 int64_t) ac_cv_c_int64_t=yes ;;
7521 *) ac_cv_c_int64_t=$ac_type ;;
7522esac
7523
7524fi
7525
7526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007528 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007529sed 's/^/| /' conftest.$ac_ext >&5
7530
7531
7532fi
7533
7534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7535 test "$ac_cv_c_int64_t" != no && break
7536 done
7537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007538{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7539echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007540 case $ac_cv_c_int64_t in #(
7541 no|yes) ;; #(
7542 *)
7543
7544cat >>confdefs.h <<_ACEOF
7545#define int64_t $ac_cv_c_int64_t
7546_ACEOF
7547;;
7548 esac
7549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007550{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7551echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007552if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007553 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007554else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007555 cat >conftest.$ac_ext <<_ACEOF
7556/* confdefs.h. */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h. */
7561$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007562typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007563int
7564main ()
7565{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007566if ((ac__type_new_ *) 0)
7567 return 0;
7568if (sizeof (ac__type_new_))
7569 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007570 ;
7571 return 0;
7572}
7573_ACEOF
7574rm -f conftest.$ac_objext
7575if { (ac_try="$ac_compile"
7576case "(($ac_try" in
7577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7578 *) ac_try_echo=$ac_try;;
7579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007581 (eval "$ac_compile") 2>conftest.er1
7582 ac_status=$?
7583 grep -v '^ *+' conftest.er1 >conftest.err
7584 rm -f conftest.er1
7585 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007587 (exit $ac_status); } && {
7588 test -z "$ac_c_werror_flag" ||
7589 test ! -s conftest.err
7590 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007591 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007592else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007593 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007594sed 's/^/| /' conftest.$ac_ext >&5
7595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007596 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007598
7599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007601{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7602echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7603if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007604
7605cat >>confdefs.h <<\_ACEOF
7606#define HAVE_SSIZE_T 1
7607_ACEOF
7608
7609fi
7610
Jack Jansendd19cf82001-12-06 22:36:17 +00007611
Michael W. Hudson54241132001-12-07 15:38:26 +00007612# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007613# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007614{ echo "$as_me:$LINENO: checking for int" >&5
7615echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7616if test "${ac_cv_type_int+set}" = set; then
7617 echo $ECHO_N "(cached) $ECHO_C" >&6
7618else
7619 cat >conftest.$ac_ext <<_ACEOF
7620/* confdefs.h. */
7621_ACEOF
7622cat confdefs.h >>conftest.$ac_ext
7623cat >>conftest.$ac_ext <<_ACEOF
7624/* end confdefs.h. */
7625$ac_includes_default
7626typedef int ac__type_new_;
7627int
7628main ()
7629{
7630if ((ac__type_new_ *) 0)
7631 return 0;
7632if (sizeof (ac__type_new_))
7633 return 0;
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
7639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
7644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7645 (eval "$ac_compile") 2>conftest.er1
7646 ac_status=$?
7647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
7650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } && {
7652 test -z "$ac_c_werror_flag" ||
7653 test ! -s conftest.err
7654 } && test -s conftest.$ac_objext; then
7655 ac_cv_type_int=yes
7656else
7657 echo "$as_me: failed program was:" >&5
7658sed 's/^/| /' conftest.$ac_ext >&5
7659
7660 ac_cv_type_int=no
7661fi
7662
7663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7664fi
7665{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7666echo "${ECHO_T}$ac_cv_type_int" >&6; }
7667
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668# The cast to long int works around a bug in the HP C Compiler
7669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7671# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007672{ echo "$as_me:$LINENO: checking size of int" >&5
7673echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007674if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007676else
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 if test "$cross_compiling" = yes; then
7678 # Depending upon the size, compute the lo and hi bounds.
7679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007680/* confdefs.h. */
7681_ACEOF
7682cat confdefs.h >>conftest.$ac_ext
7683cat >>conftest.$ac_ext <<_ACEOF
7684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007685$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007686 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007687int
7688main ()
7689{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007691test_array [0] = 0
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698if { (ac_try="$ac_compile"
7699case "(($ac_try" in
7700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7701 *) ac_try_echo=$ac_try;;
7702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007706 grep -v '^ *+' conftest.er1 >conftest.err
7707 rm -f conftest.er1
7708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710 (exit $ac_status); } && {
7711 test -z "$ac_c_werror_flag" ||
7712 test ! -s conftest.err
7713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_lo=0 ac_mid=0
7715 while :; do
7716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007717/* confdefs.h. */
7718_ACEOF
7719cat confdefs.h >>conftest.$ac_ext
7720cat >>conftest.$ac_ext <<_ACEOF
7721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007722$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007723 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007724int
7725main ()
7726{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007728test_array [0] = 0
7729
7730 ;
7731 return 0;
7732}
7733_ACEOF
7734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735if { (ac_try="$ac_compile"
7736case "(($ac_try" in
7737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7738 *) ac_try_echo=$ac_try;;
7739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007743 grep -v '^ *+' conftest.er1 >conftest.err
7744 rm -f conftest.er1
7745 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747 (exit $ac_status); } && {
7748 test -z "$ac_c_werror_flag" ||
7749 test ! -s conftest.err
7750 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ac_hi=$ac_mid; break
7752else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007754sed 's/^/| /' conftest.$ac_ext >&5
7755
Martin v. Löwiseba40652007-08-30 20:10:57 +00007756 ac_lo=`expr $ac_mid + 1`
7757 if test $ac_lo -le $ac_mid; then
7758 ac_lo= ac_hi=
7759 break
7760 fi
7761 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007763
7764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 done
7766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007768sed 's/^/| /' conftest.$ac_ext >&5
7769
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007771/* confdefs.h. */
7772_ACEOF
7773cat confdefs.h >>conftest.$ac_ext
7774cat >>conftest.$ac_ext <<_ACEOF
7775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007776$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007777 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
7780{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007782test_array [0] = 0
7783
7784 ;
7785 return 0;
7786}
7787_ACEOF
7788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789if { (ac_try="$ac_compile"
7790case "(($ac_try" in
7791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7792 *) ac_try_echo=$ac_try;;
7793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007797 grep -v '^ *+' conftest.er1 >conftest.err
7798 rm -f conftest.er1
7799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801 (exit $ac_status); } && {
7802 test -z "$ac_c_werror_flag" ||
7803 test ! -s conftest.err
7804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_hi=-1 ac_mid=-1
7806 while :; do
7807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007808/* confdefs.h. */
7809_ACEOF
7810cat confdefs.h >>conftest.$ac_ext
7811cat >>conftest.$ac_ext <<_ACEOF
7812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007813$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007814 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007815int
7816main ()
7817{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007819test_array [0] = 0
7820
7821 ;
7822 return 0;
7823}
7824_ACEOF
7825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826if { (ac_try="$ac_compile"
7827case "(($ac_try" in
7828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7829 *) ac_try_echo=$ac_try;;
7830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007834 grep -v '^ *+' conftest.er1 >conftest.err
7835 rm -f conftest.er1
7836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838 (exit $ac_status); } && {
7839 test -z "$ac_c_werror_flag" ||
7840 test ! -s conftest.err
7841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 ac_lo=$ac_mid; break
7843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007845sed 's/^/| /' conftest.$ac_ext >&5
7846
Martin v. Löwiseba40652007-08-30 20:10:57 +00007847 ac_hi=`expr '(' $ac_mid ')' - 1`
7848 if test $ac_mid -le $ac_hi; then
7849 ac_lo= ac_hi=
7850 break
7851 fi
7852 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007854
7855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 done
7857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007859sed 's/^/| /' conftest.$ac_ext >&5
7860
Martin v. Löwiseba40652007-08-30 20:10:57 +00007861 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863
7864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866
7867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007868# Binary search between lo and hi bounds.
7869while test "x$ac_lo" != "x$ac_hi"; do
7870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007872/* confdefs.h. */
7873_ACEOF
7874cat confdefs.h >>conftest.$ac_ext
7875cat >>conftest.$ac_ext <<_ACEOF
7876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007878 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007879int
7880main ()
7881{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007883test_array [0] = 0
7884
7885 ;
7886 return 0;
7887}
7888_ACEOF
7889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890if { (ac_try="$ac_compile"
7891case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007898 grep -v '^ *+' conftest.er1 >conftest.err
7899 rm -f conftest.er1
7900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902 (exit $ac_status); } && {
7903 test -z "$ac_c_werror_flag" ||
7904 test ! -s conftest.err
7905 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007906 ac_hi=$ac_mid
7907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007909sed 's/^/| /' conftest.$ac_ext >&5
7910
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913
7914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007915done
7916case $ac_lo in
7917?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007920See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007921echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007922See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007923 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924 else
7925 ac_cv_sizeof_int=0
7926 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007927esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007928else
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* confdefs.h. */
7931_ACEOF
7932cat confdefs.h >>conftest.$ac_ext
7933cat >>conftest.$ac_ext <<_ACEOF
7934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007936 typedef int ac__type_sizeof_;
7937static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7938static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007939#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007940#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007941int
7942main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007943{
Martin v. Löwis11437992002-04-12 09:54:03 +00007944
7945 FILE *f = fopen ("conftest.val", "w");
7946 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007947 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007948 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007950 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007953 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 }
7955 else
7956 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007960 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007962 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
7964 ;
7965 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007966}
Martin v. Löwis11437992002-04-12 09:54:03 +00007967_ACEOF
7968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969if { (ac_try="$ac_link"
7970case "(($ac_try" in
7971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7972 *) ac_try_echo=$ac_try;;
7973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979 { (case "(($ac_try" in
7980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7981 *) ac_try_echo=$ac_try;;
7982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 (exit $ac_status); }; }; then
7988 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990 echo "$as_me: program exited with status $ac_status" >&5
7991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007992sed 's/^/| /' conftest.$ac_ext >&5
7993
Martin v. Löwis11437992002-04-12 09:54:03 +00007994( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007997See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007998echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007999See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008000 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001 else
8002 ac_cv_sizeof_int=0
8003 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005rm -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 +00008006fi
8007rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008009{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8010echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011
8012
8013
Martin v. Löwis11437992002-04-12 09:54:03 +00008014cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008015#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008016_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008017
8018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008019{ echo "$as_me:$LINENO: checking for long" >&5
8020echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8021if test "${ac_cv_type_long+set}" = set; then
8022 echo $ECHO_N "(cached) $ECHO_C" >&6
8023else
8024 cat >conftest.$ac_ext <<_ACEOF
8025/* confdefs.h. */
8026_ACEOF
8027cat confdefs.h >>conftest.$ac_ext
8028cat >>conftest.$ac_ext <<_ACEOF
8029/* end confdefs.h. */
8030$ac_includes_default
8031typedef long ac__type_new_;
8032int
8033main ()
8034{
8035if ((ac__type_new_ *) 0)
8036 return 0;
8037if (sizeof (ac__type_new_))
8038 return 0;
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
8044if { (ac_try="$ac_compile"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
8049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8050 (eval "$ac_compile") 2>conftest.er1
8051 ac_status=$?
8052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest.$ac_objext; then
8060 ac_cv_type_long=yes
8061else
8062 echo "$as_me: failed program was:" >&5
8063sed 's/^/| /' conftest.$ac_ext >&5
8064
8065 ac_cv_type_long=no
8066fi
8067
8068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8069fi
8070{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8071echo "${ECHO_T}$ac_cv_type_long" >&6; }
8072
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073# The cast to long int works around a bug in the HP C Compiler
8074# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8075# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8076# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008077{ echo "$as_me:$LINENO: checking size of long" >&5
8078echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008079if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008081else
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 if test "$cross_compiling" = yes; then
8083 # Depending upon the size, compute the lo and hi bounds.
8084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008085/* confdefs.h. */
8086_ACEOF
8087cat confdefs.h >>conftest.$ac_ext
8088cat >>conftest.$ac_ext <<_ACEOF
8089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008090$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008091 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008092int
8093main ()
8094{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008096test_array [0] = 0
8097
8098 ;
8099 return 0;
8100}
8101_ACEOF
8102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103if { (ac_try="$ac_compile"
8104case "(($ac_try" in
8105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8106 *) ac_try_echo=$ac_try;;
8107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008111 grep -v '^ *+' conftest.er1 >conftest.err
8112 rm -f conftest.er1
8113 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115 (exit $ac_status); } && {
8116 test -z "$ac_c_werror_flag" ||
8117 test ! -s conftest.err
8118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_lo=0 ac_mid=0
8120 while :; do
8121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008122/* confdefs.h. */
8123_ACEOF
8124cat confdefs.h >>conftest.$ac_ext
8125cat >>conftest.$ac_ext <<_ACEOF
8126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008127$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008128 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008129int
8130main ()
8131{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008132static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008133test_array [0] = 0
8134
8135 ;
8136 return 0;
8137}
8138_ACEOF
8139rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140if { (ac_try="$ac_compile"
8141case "(($ac_try" in
8142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8143 *) ac_try_echo=$ac_try;;
8144esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008146 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008148 grep -v '^ *+' conftest.er1 >conftest.err
8149 rm -f conftest.er1
8150 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008152 (exit $ac_status); } && {
8153 test -z "$ac_c_werror_flag" ||
8154 test ! -s conftest.err
8155 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ac_hi=$ac_mid; break
8157else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008159sed 's/^/| /' conftest.$ac_ext >&5
8160
Martin v. Löwiseba40652007-08-30 20:10:57 +00008161 ac_lo=`expr $ac_mid + 1`
8162 if test $ac_lo -le $ac_mid; then
8163 ac_lo= ac_hi=
8164 break
8165 fi
8166 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008168
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 done
8171else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008173sed 's/^/| /' conftest.$ac_ext >&5
8174
Martin v. Löwiseba40652007-08-30 20:10:57 +00008175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* confdefs.h. */
8177_ACEOF
8178cat confdefs.h >>conftest.$ac_ext
8179cat >>conftest.$ac_ext <<_ACEOF
8180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008181$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008182 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
8185{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008187test_array [0] = 0
8188
8189 ;
8190 return 0;
8191}
8192_ACEOF
8193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008194if { (ac_try="$ac_compile"
8195case "(($ac_try" in
8196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8197 *) ac_try_echo=$ac_try;;
8198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008202 grep -v '^ *+' conftest.er1 >conftest.err
8203 rm -f conftest.er1
8204 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206 (exit $ac_status); } && {
8207 test -z "$ac_c_werror_flag" ||
8208 test ! -s conftest.err
8209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_hi=-1 ac_mid=-1
8211 while :; do
8212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008213/* confdefs.h. */
8214_ACEOF
8215cat confdefs.h >>conftest.$ac_ext
8216cat >>conftest.$ac_ext <<_ACEOF
8217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008218$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008219 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008220int
8221main ()
8222{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008224test_array [0] = 0
8225
8226 ;
8227 return 0;
8228}
8229_ACEOF
8230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231if { (ac_try="$ac_compile"
8232case "(($ac_try" in
8233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8234 *) ac_try_echo=$ac_try;;
8235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008239 grep -v '^ *+' conftest.er1 >conftest.err
8240 rm -f conftest.er1
8241 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 (exit $ac_status); } && {
8244 test -z "$ac_c_werror_flag" ||
8245 test ! -s conftest.err
8246 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 ac_lo=$ac_mid; break
8248else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008250sed 's/^/| /' conftest.$ac_ext >&5
8251
Martin v. Löwiseba40652007-08-30 20:10:57 +00008252 ac_hi=`expr '(' $ac_mid ')' - 1`
8253 if test $ac_mid -le $ac_hi; then
8254 ac_lo= ac_hi=
8255 break
8256 fi
8257 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008259
8260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008261 done
8262else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008264sed 's/^/| /' conftest.$ac_ext >&5
8265
Martin v. Löwiseba40652007-08-30 20:10:57 +00008266 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268
8269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271
8272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008273# Binary search between lo and hi bounds.
8274while test "x$ac_lo" != "x$ac_hi"; do
8275 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008277/* confdefs.h. */
8278_ACEOF
8279cat confdefs.h >>conftest.$ac_ext
8280cat >>conftest.$ac_ext <<_ACEOF
8281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008282$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008283 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008284int
8285main ()
8286{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008288test_array [0] = 0
8289
8290 ;
8291 return 0;
8292}
8293_ACEOF
8294rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295if { (ac_try="$ac_compile"
8296case "(($ac_try" in
8297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8298 *) ac_try_echo=$ac_try;;
8299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008303 grep -v '^ *+' conftest.er1 >conftest.err
8304 rm -f conftest.er1
8305 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307 (exit $ac_status); } && {
8308 test -z "$ac_c_werror_flag" ||
8309 test ! -s conftest.err
8310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 ac_hi=$ac_mid
8312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008314sed 's/^/| /' conftest.$ac_ext >&5
8315
Martin v. Löwiseba40652007-08-30 20:10:57 +00008316 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318
8319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008320done
8321case $ac_lo in
8322?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008324 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008325See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008326echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008327See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008328 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329 else
8330 ac_cv_sizeof_long=0
8331 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008332esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008333else
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008335/* confdefs.h. */
8336_ACEOF
8337cat confdefs.h >>conftest.$ac_ext
8338cat >>conftest.$ac_ext <<_ACEOF
8339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008340$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008341 typedef long ac__type_sizeof_;
8342static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8343static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008344#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008345#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008346int
8347main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008348{
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
8350 FILE *f = fopen ("conftest.val", "w");
8351 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008352 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008353 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008355 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008356 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008358 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 }
8360 else
8361 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008362 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008363 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008365 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008366 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008367 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
8369 ;
8370 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008371}
Martin v. Löwis11437992002-04-12 09:54:03 +00008372_ACEOF
8373rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374if { (ac_try="$ac_link"
8375case "(($ac_try" in
8376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8377 *) ac_try_echo=$ac_try;;
8378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008384 { (case "(($ac_try" in
8385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386 *) ac_try_echo=$ac_try;;
8387esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008390 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 (exit $ac_status); }; }; then
8393 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395 echo "$as_me: program exited with status $ac_status" >&5
8396echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008397sed 's/^/| /' conftest.$ac_ext >&5
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008401 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008402See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008403echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008404See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008405 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008406 else
8407 ac_cv_sizeof_long=0
8408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410rm -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 +00008411fi
8412rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008413fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008414{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8415echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008420#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008422
8423
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008424{ echo "$as_me:$LINENO: checking for void *" >&5
8425echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8426if test "${ac_cv_type_void_p+set}" = set; then
8427 echo $ECHO_N "(cached) $ECHO_C" >&6
8428else
8429 cat >conftest.$ac_ext <<_ACEOF
8430/* confdefs.h. */
8431_ACEOF
8432cat confdefs.h >>conftest.$ac_ext
8433cat >>conftest.$ac_ext <<_ACEOF
8434/* end confdefs.h. */
8435$ac_includes_default
8436typedef void * ac__type_new_;
8437int
8438main ()
8439{
8440if ((ac__type_new_ *) 0)
8441 return 0;
8442if (sizeof (ac__type_new_))
8443 return 0;
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
8449if { (ac_try="$ac_compile"
8450case "(($ac_try" in
8451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452 *) ac_try_echo=$ac_try;;
8453esac
8454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8455 (eval "$ac_compile") 2>conftest.er1
8456 ac_status=$?
8457 grep -v '^ *+' conftest.er1 >conftest.err
8458 rm -f conftest.er1
8459 cat conftest.err >&5
8460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8461 (exit $ac_status); } && {
8462 test -z "$ac_c_werror_flag" ||
8463 test ! -s conftest.err
8464 } && test -s conftest.$ac_objext; then
8465 ac_cv_type_void_p=yes
8466else
8467 echo "$as_me: failed program was:" >&5
8468sed 's/^/| /' conftest.$ac_ext >&5
8469
8470 ac_cv_type_void_p=no
8471fi
8472
8473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8474fi
8475{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8476echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8477
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478# The cast to long int works around a bug in the HP C Compiler
8479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8481# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008482{ echo "$as_me:$LINENO: checking size of void *" >&5
8483echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008484if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008485 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 if test "$cross_compiling" = yes; then
8488 # Depending upon the size, compute the lo and hi bounds.
8489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008490/* confdefs.h. */
8491_ACEOF
8492cat confdefs.h >>conftest.$ac_ext
8493cat >>conftest.$ac_ext <<_ACEOF
8494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008495$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008496 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008497int
8498main ()
8499{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008500static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008501test_array [0] = 0
8502
8503 ;
8504 return 0;
8505}
8506_ACEOF
8507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508if { (ac_try="$ac_compile"
8509case "(($ac_try" in
8510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8511 *) ac_try_echo=$ac_try;;
8512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008516 grep -v '^ *+' conftest.er1 >conftest.err
8517 rm -f conftest.er1
8518 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008520 (exit $ac_status); } && {
8521 test -z "$ac_c_werror_flag" ||
8522 test ! -s conftest.err
8523 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_lo=0 ac_mid=0
8525 while :; do
8526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008527/* confdefs.h. */
8528_ACEOF
8529cat confdefs.h >>conftest.$ac_ext
8530cat >>conftest.$ac_ext <<_ACEOF
8531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008532$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008533 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008534int
8535main ()
8536{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008537static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008538test_array [0] = 0
8539
8540 ;
8541 return 0;
8542}
8543_ACEOF
8544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545if { (ac_try="$ac_compile"
8546case "(($ac_try" in
8547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8548 *) ac_try_echo=$ac_try;;
8549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008553 grep -v '^ *+' conftest.er1 >conftest.err
8554 rm -f conftest.er1
8555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008557 (exit $ac_status); } && {
8558 test -z "$ac_c_werror_flag" ||
8559 test ! -s conftest.err
8560 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 ac_hi=$ac_mid; break
8562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008564sed 's/^/| /' conftest.$ac_ext >&5
8565
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566 ac_lo=`expr $ac_mid + 1`
8567 if test $ac_lo -le $ac_mid; then
8568 ac_lo= ac_hi=
8569 break
8570 fi
8571 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008573
8574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 done
8576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008578sed 's/^/| /' conftest.$ac_ext >&5
8579
Martin v. Löwiseba40652007-08-30 20:10:57 +00008580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008581/* confdefs.h. */
8582_ACEOF
8583cat confdefs.h >>conftest.$ac_ext
8584cat >>conftest.$ac_ext <<_ACEOF
8585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008586$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008587 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
8590{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008591static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008592test_array [0] = 0
8593
8594 ;
8595 return 0;
8596}
8597_ACEOF
8598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599if { (ac_try="$ac_compile"
8600case "(($ac_try" in
8601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8602 *) ac_try_echo=$ac_try;;
8603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008607 grep -v '^ *+' conftest.er1 >conftest.err
8608 rm -f conftest.er1
8609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008611 (exit $ac_status); } && {
8612 test -z "$ac_c_werror_flag" ||
8613 test ! -s conftest.err
8614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_hi=-1 ac_mid=-1
8616 while :; do
8617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* confdefs.h. */
8619_ACEOF
8620cat confdefs.h >>conftest.$ac_ext
8621cat >>conftest.$ac_ext <<_ACEOF
8622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008624 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008625int
8626main ()
8627{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008628static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008629test_array [0] = 0
8630
8631 ;
8632 return 0;
8633}
8634_ACEOF
8635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636if { (ac_try="$ac_compile"
8637case "(($ac_try" in
8638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8639 *) ac_try_echo=$ac_try;;
8640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008644 grep -v '^ *+' conftest.er1 >conftest.err
8645 rm -f conftest.er1
8646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648 (exit $ac_status); } && {
8649 test -z "$ac_c_werror_flag" ||
8650 test ! -s conftest.err
8651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 ac_lo=$ac_mid; break
8653else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008655sed 's/^/| /' conftest.$ac_ext >&5
8656
Martin v. Löwiseba40652007-08-30 20:10:57 +00008657 ac_hi=`expr '(' $ac_mid ')' - 1`
8658 if test $ac_mid -le $ac_hi; then
8659 ac_lo= ac_hi=
8660 break
8661 fi
8662 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008664
8665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 done
8667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008669sed 's/^/| /' conftest.$ac_ext >&5
8670
Martin v. Löwiseba40652007-08-30 20:10:57 +00008671 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673
8674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676
8677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008678# Binary search between lo and hi bounds.
8679while test "x$ac_lo" != "x$ac_hi"; do
8680 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008682/* confdefs.h. */
8683_ACEOF
8684cat confdefs.h >>conftest.$ac_ext
8685cat >>conftest.$ac_ext <<_ACEOF
8686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008687$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008688 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008689int
8690main ()
8691{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008693test_array [0] = 0
8694
8695 ;
8696 return 0;
8697}
8698_ACEOF
8699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700if { (ac_try="$ac_compile"
8701case "(($ac_try" in
8702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8703 *) ac_try_echo=$ac_try;;
8704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008708 grep -v '^ *+' conftest.er1 >conftest.err
8709 rm -f conftest.er1
8710 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008712 (exit $ac_status); } && {
8713 test -z "$ac_c_werror_flag" ||
8714 test ! -s conftest.err
8715 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 ac_hi=$ac_mid
8717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008719sed 's/^/| /' conftest.$ac_ext >&5
8720
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723
8724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008725done
8726case $ac_lo in
8727?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008729 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008730See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008731echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008732See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008733 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734 else
8735 ac_cv_sizeof_void_p=0
8736 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008737esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008738else
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* confdefs.h. */
8741_ACEOF
8742cat confdefs.h >>conftest.$ac_ext
8743cat >>conftest.$ac_ext <<_ACEOF
8744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008746 typedef void * ac__type_sizeof_;
8747static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8748static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008749#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008750#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008751int
8752main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008753{
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
8755 FILE *f = fopen ("conftest.val", "w");
8756 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008757 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008758 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008760 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008761 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008763 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 }
8765 else
8766 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008767 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008768 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008770 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008772 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008773
8774 ;
8775 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008776}
Martin v. Löwis11437992002-04-12 09:54:03 +00008777_ACEOF
8778rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779if { (ac_try="$ac_link"
8780case "(($ac_try" in
8781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8782 *) ac_try_echo=$ac_try;;
8783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789 { (case "(($ac_try" in
8790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8791 *) ac_try_echo=$ac_try;;
8792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 (exit $ac_status); }; }; then
8798 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008799else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800 echo "$as_me: program exited with status $ac_status" >&5
8801echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008802sed 's/^/| /' conftest.$ac_ext >&5
8803
Martin v. Löwis11437992002-04-12 09:54:03 +00008804( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008806 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008807See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008808echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008809See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008810 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811 else
8812 ac_cv_sizeof_void_p=0
8813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815rm -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 +00008816fi
8817rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008818fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008819{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8820echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008821
8822
8823
Martin v. Löwis11437992002-04-12 09:54:03 +00008824cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008825#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008826_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008827
8828
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008829{ echo "$as_me:$LINENO: checking for short" >&5
8830echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8831if test "${ac_cv_type_short+set}" = set; then
8832 echo $ECHO_N "(cached) $ECHO_C" >&6
8833else
8834 cat >conftest.$ac_ext <<_ACEOF
8835/* confdefs.h. */
8836_ACEOF
8837cat confdefs.h >>conftest.$ac_ext
8838cat >>conftest.$ac_ext <<_ACEOF
8839/* end confdefs.h. */
8840$ac_includes_default
8841typedef short ac__type_new_;
8842int
8843main ()
8844{
8845if ((ac__type_new_ *) 0)
8846 return 0;
8847if (sizeof (ac__type_new_))
8848 return 0;
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
8854if { (ac_try="$ac_compile"
8855case "(($ac_try" in
8856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8857 *) ac_try_echo=$ac_try;;
8858esac
8859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8860 (eval "$ac_compile") 2>conftest.er1
8861 ac_status=$?
8862 grep -v '^ *+' conftest.er1 >conftest.err
8863 rm -f conftest.er1
8864 cat conftest.err >&5
8865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8866 (exit $ac_status); } && {
8867 test -z "$ac_c_werror_flag" ||
8868 test ! -s conftest.err
8869 } && test -s conftest.$ac_objext; then
8870 ac_cv_type_short=yes
8871else
8872 echo "$as_me: failed program was:" >&5
8873sed 's/^/| /' conftest.$ac_ext >&5
8874
8875 ac_cv_type_short=no
8876fi
8877
8878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8879fi
8880{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8881echo "${ECHO_T}$ac_cv_type_short" >&6; }
8882
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883# The cast to long int works around a bug in the HP C Compiler
8884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8886# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008887{ echo "$as_me:$LINENO: checking size of short" >&5
8888echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008889if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008890 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 if test "$cross_compiling" = yes; then
8893 # Depending upon the size, compute the lo and hi bounds.
8894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* confdefs.h. */
8896_ACEOF
8897cat confdefs.h >>conftest.$ac_ext
8898cat >>conftest.$ac_ext <<_ACEOF
8899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008900$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008901 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008902int
8903main ()
8904{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008905static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008906test_array [0] = 0
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913if { (ac_try="$ac_compile"
8914case "(($ac_try" in
8915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8916 *) ac_try_echo=$ac_try;;
8917esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008921 grep -v '^ *+' conftest.er1 >conftest.err
8922 rm -f conftest.er1
8923 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925 (exit $ac_status); } && {
8926 test -z "$ac_c_werror_flag" ||
8927 test ! -s conftest.err
8928 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_lo=0 ac_mid=0
8930 while :; do
8931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008932/* confdefs.h. */
8933_ACEOF
8934cat confdefs.h >>conftest.$ac_ext
8935cat >>conftest.$ac_ext <<_ACEOF
8936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008937$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008938 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008939int
8940main ()
8941{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008942static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008943test_array [0] = 0
8944
8945 ;
8946 return 0;
8947}
8948_ACEOF
8949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950if { (ac_try="$ac_compile"
8951case "(($ac_try" in
8952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8953 *) ac_try_echo=$ac_try;;
8954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008958 grep -v '^ *+' conftest.er1 >conftest.err
8959 rm -f conftest.er1
8960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962 (exit $ac_status); } && {
8963 test -z "$ac_c_werror_flag" ||
8964 test ! -s conftest.err
8965 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ac_hi=$ac_mid; break
8967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008969sed 's/^/| /' conftest.$ac_ext >&5
8970
Martin v. Löwiseba40652007-08-30 20:10:57 +00008971 ac_lo=`expr $ac_mid + 1`
8972 if test $ac_lo -le $ac_mid; then
8973 ac_lo= ac_hi=
8974 break
8975 fi
8976 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008978
8979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 done
8981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008983sed 's/^/| /' conftest.$ac_ext >&5
8984
Martin v. Löwiseba40652007-08-30 20:10:57 +00008985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* confdefs.h. */
8987_ACEOF
8988cat confdefs.h >>conftest.$ac_ext
8989cat >>conftest.$ac_ext <<_ACEOF
8990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008991$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008992 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
8995{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008997test_array [0] = 0
8998
8999 ;
9000 return 0;
9001}
9002_ACEOF
9003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004if { (ac_try="$ac_compile"
9005case "(($ac_try" in
9006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9007 *) ac_try_echo=$ac_try;;
9008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009012 grep -v '^ *+' conftest.er1 >conftest.err
9013 rm -f conftest.er1
9014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016 (exit $ac_status); } && {
9017 test -z "$ac_c_werror_flag" ||
9018 test ! -s conftest.err
9019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_hi=-1 ac_mid=-1
9021 while :; do
9022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009023/* confdefs.h. */
9024_ACEOF
9025cat confdefs.h >>conftest.$ac_ext
9026cat >>conftest.$ac_ext <<_ACEOF
9027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009028$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009029 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009030int
9031main ()
9032{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009034test_array [0] = 0
9035
9036 ;
9037 return 0;
9038}
9039_ACEOF
9040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041if { (ac_try="$ac_compile"
9042case "(($ac_try" in
9043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9044 *) ac_try_echo=$ac_try;;
9045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009049 grep -v '^ *+' conftest.er1 >conftest.err
9050 rm -f conftest.er1
9051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053 (exit $ac_status); } && {
9054 test -z "$ac_c_werror_flag" ||
9055 test ! -s conftest.err
9056 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 ac_lo=$ac_mid; break
9058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009060sed 's/^/| /' conftest.$ac_ext >&5
9061
Martin v. Löwiseba40652007-08-30 20:10:57 +00009062 ac_hi=`expr '(' $ac_mid ')' - 1`
9063 if test $ac_mid -le $ac_hi; then
9064 ac_lo= ac_hi=
9065 break
9066 fi
9067 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069
9070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 done
9072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009074sed 's/^/| /' conftest.$ac_ext >&5
9075
Martin v. Löwiseba40652007-08-30 20:10:57 +00009076 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078
9079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081
9082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009083# Binary search between lo and hi bounds.
9084while test "x$ac_lo" != "x$ac_hi"; do
9085 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009087/* confdefs.h. */
9088_ACEOF
9089cat confdefs.h >>conftest.$ac_ext
9090cat >>conftest.$ac_ext <<_ACEOF
9091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009092$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009093 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009094int
9095main ()
9096{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009097static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009098test_array [0] = 0
9099
9100 ;
9101 return 0;
9102}
9103_ACEOF
9104rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105if { (ac_try="$ac_compile"
9106case "(($ac_try" in
9107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9108 *) ac_try_echo=$ac_try;;
9109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009113 grep -v '^ *+' conftest.er1 >conftest.err
9114 rm -f conftest.er1
9115 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117 (exit $ac_status); } && {
9118 test -z "$ac_c_werror_flag" ||
9119 test ! -s conftest.err
9120 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ac_hi=$ac_mid
9122else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009124sed 's/^/| /' conftest.$ac_ext >&5
9125
Martin v. Löwiseba40652007-08-30 20:10:57 +00009126 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128
9129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009130done
9131case $ac_lo in
9132?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009134 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009135See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009136echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009137See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009138 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139 else
9140 ac_cv_sizeof_short=0
9141 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009142esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009143else
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009145/* confdefs.h. */
9146_ACEOF
9147cat confdefs.h >>conftest.$ac_ext
9148cat >>conftest.$ac_ext <<_ACEOF
9149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009151 typedef short ac__type_sizeof_;
9152static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9153static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009154#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009155#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009156int
9157main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009158{
Martin v. Löwis11437992002-04-12 09:54:03 +00009159
9160 FILE *f = fopen ("conftest.val", "w");
9161 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009163 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009166 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009167 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009168 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 }
9170 else
9171 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009173 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009175 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009177 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
9179 ;
9180 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009181}
Martin v. Löwis11437992002-04-12 09:54:03 +00009182_ACEOF
9183rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184if { (ac_try="$ac_link"
9185case "(($ac_try" in
9186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9187 *) ac_try_echo=$ac_try;;
9188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009194 { (case "(($ac_try" in
9195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9196 *) ac_try_echo=$ac_try;;
9197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 (exit $ac_status); }; }; then
9203 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205 echo "$as_me: program exited with status $ac_status" >&5
9206echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009207sed 's/^/| /' conftest.$ac_ext >&5
9208
Martin v. Löwis11437992002-04-12 09:54:03 +00009209( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009211 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009212See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009213echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009214See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009215 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216 else
9217 ac_cv_sizeof_short=0
9218 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220rm -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 +00009221fi
9222rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009223fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009224{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9225echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226
9227
9228
Martin v. Löwis11437992002-04-12 09:54:03 +00009229cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009230#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009231_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009232
9233
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009234{ echo "$as_me:$LINENO: checking for float" >&5
9235echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9236if test "${ac_cv_type_float+set}" = set; then
9237 echo $ECHO_N "(cached) $ECHO_C" >&6
9238else
9239 cat >conftest.$ac_ext <<_ACEOF
9240/* confdefs.h. */
9241_ACEOF
9242cat confdefs.h >>conftest.$ac_ext
9243cat >>conftest.$ac_ext <<_ACEOF
9244/* end confdefs.h. */
9245$ac_includes_default
9246typedef float ac__type_new_;
9247int
9248main ()
9249{
9250if ((ac__type_new_ *) 0)
9251 return 0;
9252if (sizeof (ac__type_new_))
9253 return 0;
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
9259if { (ac_try="$ac_compile"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
9264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9265 (eval "$ac_compile") 2>conftest.er1
9266 ac_status=$?
9267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
9270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271 (exit $ac_status); } && {
9272 test -z "$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 } && test -s conftest.$ac_objext; then
9275 ac_cv_type_float=yes
9276else
9277 echo "$as_me: failed program was:" >&5
9278sed 's/^/| /' conftest.$ac_ext >&5
9279
9280 ac_cv_type_float=no
9281fi
9282
9283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9284fi
9285{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9286echo "${ECHO_T}$ac_cv_type_float" >&6; }
9287
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288# The cast to long int works around a bug in the HP C Compiler
9289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9291# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009292{ echo "$as_me:$LINENO: checking size of float" >&5
9293echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009294if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009296else
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 if test "$cross_compiling" = yes; then
9298 # Depending upon the size, compute the lo and hi bounds.
9299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* confdefs.h. */
9301_ACEOF
9302cat confdefs.h >>conftest.$ac_ext
9303cat >>conftest.$ac_ext <<_ACEOF
9304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009305$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009306 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009307int
9308main ()
9309{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009311test_array [0] = 0
9312
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318if { (ac_try="$ac_compile"
9319case "(($ac_try" in
9320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9321 *) ac_try_echo=$ac_try;;
9322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009326 grep -v '^ *+' conftest.er1 >conftest.err
9327 rm -f conftest.er1
9328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330 (exit $ac_status); } && {
9331 test -z "$ac_c_werror_flag" ||
9332 test ! -s conftest.err
9333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_lo=0 ac_mid=0
9335 while :; do
9336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* confdefs.h. */
9338_ACEOF
9339cat confdefs.h >>conftest.$ac_ext
9340cat >>conftest.$ac_ext <<_ACEOF
9341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009342$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009343 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009344int
9345main ()
9346{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009347static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009348test_array [0] = 0
9349
9350 ;
9351 return 0;
9352}
9353_ACEOF
9354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355if { (ac_try="$ac_compile"
9356case "(($ac_try" in
9357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9358 *) ac_try_echo=$ac_try;;
9359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009363 grep -v '^ *+' conftest.er1 >conftest.err
9364 rm -f conftest.er1
9365 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367 (exit $ac_status); } && {
9368 test -z "$ac_c_werror_flag" ||
9369 test ! -s conftest.err
9370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 ac_hi=$ac_mid; break
9372else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009374sed 's/^/| /' conftest.$ac_ext >&5
9375
Martin v. Löwiseba40652007-08-30 20:10:57 +00009376 ac_lo=`expr $ac_mid + 1`
9377 if test $ac_lo -le $ac_mid; then
9378 ac_lo= ac_hi=
9379 break
9380 fi
9381 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383
9384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 done
9386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009388sed 's/^/| /' conftest.$ac_ext >&5
9389
Martin v. Löwiseba40652007-08-30 20:10:57 +00009390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* confdefs.h. */
9392_ACEOF
9393cat confdefs.h >>conftest.$ac_ext
9394cat >>conftest.$ac_ext <<_ACEOF
9395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009396$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009397 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
9400{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009402test_array [0] = 0
9403
9404 ;
9405 return 0;
9406}
9407_ACEOF
9408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009409if { (ac_try="$ac_compile"
9410case "(($ac_try" in
9411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9412 *) ac_try_echo=$ac_try;;
9413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009417 grep -v '^ *+' conftest.er1 >conftest.err
9418 rm -f conftest.er1
9419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421 (exit $ac_status); } && {
9422 test -z "$ac_c_werror_flag" ||
9423 test ! -s conftest.err
9424 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_hi=-1 ac_mid=-1
9426 while :; do
9427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* confdefs.h. */
9429_ACEOF
9430cat confdefs.h >>conftest.$ac_ext
9431cat >>conftest.$ac_ext <<_ACEOF
9432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009433$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009434 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009439test_array [0] = 0
9440
9441 ;
9442 return 0;
9443}
9444_ACEOF
9445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446if { (ac_try="$ac_compile"
9447case "(($ac_try" in
9448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9449 *) ac_try_echo=$ac_try;;
9450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009454 grep -v '^ *+' conftest.er1 >conftest.err
9455 rm -f conftest.er1
9456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 (exit $ac_status); } && {
9459 test -z "$ac_c_werror_flag" ||
9460 test ! -s conftest.err
9461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 ac_lo=$ac_mid; break
9463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009465sed 's/^/| /' conftest.$ac_ext >&5
9466
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467 ac_hi=`expr '(' $ac_mid ')' - 1`
9468 if test $ac_mid -le $ac_hi; then
9469 ac_lo= ac_hi=
9470 break
9471 fi
9472 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009474
9475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 done
9477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009479sed 's/^/| /' conftest.$ac_ext >&5
9480
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483
9484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486
9487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009488# Binary search between lo and hi bounds.
9489while test "x$ac_lo" != "x$ac_hi"; do
9490 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* confdefs.h. */
9493_ACEOF
9494cat confdefs.h >>conftest.$ac_ext
9495cat >>conftest.$ac_ext <<_ACEOF
9496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009497$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009498 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009499int
9500main ()
9501{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009502static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009503test_array [0] = 0
9504
9505 ;
9506 return 0;
9507}
9508_ACEOF
9509rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510if { (ac_try="$ac_compile"
9511case "(($ac_try" in
9512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9513 *) ac_try_echo=$ac_try;;
9514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009518 grep -v '^ *+' conftest.er1 >conftest.err
9519 rm -f conftest.er1
9520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522 (exit $ac_status); } && {
9523 test -z "$ac_c_werror_flag" ||
9524 test ! -s conftest.err
9525 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_hi=$ac_mid
9527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009529sed 's/^/| /' conftest.$ac_ext >&5
9530
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533
9534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009535done
9536case $ac_lo in
9537?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009539 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009540See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009541echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009542See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009543 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544 else
9545 ac_cv_sizeof_float=0
9546 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009547esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009548else
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* confdefs.h. */
9551_ACEOF
9552cat confdefs.h >>conftest.$ac_ext
9553cat >>conftest.$ac_ext <<_ACEOF
9554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009556 typedef float ac__type_sizeof_;
9557static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9558static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009559#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009560#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009561int
9562main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009563{
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
9565 FILE *f = fopen ("conftest.val", "w");
9566 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009567 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009568 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009570 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009571 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009573 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 }
9575 else
9576 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009577 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009578 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009580 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009582 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009583
9584 ;
9585 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009586}
Martin v. Löwis11437992002-04-12 09:54:03 +00009587_ACEOF
9588rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589if { (ac_try="$ac_link"
9590case "(($ac_try" in
9591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9592 *) ac_try_echo=$ac_try;;
9593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009599 { (case "(($ac_try" in
9600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9601 *) ac_try_echo=$ac_try;;
9602esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 (exit $ac_status); }; }; then
9608 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610 echo "$as_me: program exited with status $ac_status" >&5
9611echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009612sed 's/^/| /' conftest.$ac_ext >&5
9613
Martin v. Löwis11437992002-04-12 09:54:03 +00009614( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009616 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009617See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009618echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009619See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009620 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621 else
9622 ac_cv_sizeof_float=0
9623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625rm -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 +00009626fi
9627rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009628fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009629{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9630echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631
9632
9633
Martin v. Löwis11437992002-04-12 09:54:03 +00009634cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009635#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009636_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009637
9638
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009639{ echo "$as_me:$LINENO: checking for double" >&5
9640echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9641if test "${ac_cv_type_double+set}" = set; then
9642 echo $ECHO_N "(cached) $ECHO_C" >&6
9643else
9644 cat >conftest.$ac_ext <<_ACEOF
9645/* confdefs.h. */
9646_ACEOF
9647cat confdefs.h >>conftest.$ac_ext
9648cat >>conftest.$ac_ext <<_ACEOF
9649/* end confdefs.h. */
9650$ac_includes_default
9651typedef double ac__type_new_;
9652int
9653main ()
9654{
9655if ((ac__type_new_ *) 0)
9656 return 0;
9657if (sizeof (ac__type_new_))
9658 return 0;
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
9664if { (ac_try="$ac_compile"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
9669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9670 (eval "$ac_compile") 2>conftest.er1
9671 ac_status=$?
9672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
9675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest.$ac_objext; then
9680 ac_cv_type_double=yes
9681else
9682 echo "$as_me: failed program was:" >&5
9683sed 's/^/| /' conftest.$ac_ext >&5
9684
9685 ac_cv_type_double=no
9686fi
9687
9688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9689fi
9690{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9691echo "${ECHO_T}$ac_cv_type_double" >&6; }
9692
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693# The cast to long int works around a bug in the HP C Compiler
9694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9696# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009697{ echo "$as_me:$LINENO: checking size of double" >&5
9698echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009699if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009700 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009701else
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 if test "$cross_compiling" = yes; then
9703 # Depending upon the size, compute the lo and hi bounds.
9704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* confdefs.h. */
9706_ACEOF
9707cat confdefs.h >>conftest.$ac_ext
9708cat >>conftest.$ac_ext <<_ACEOF
9709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009710$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009711 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009712int
9713main ()
9714{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009716test_array [0] = 0
9717
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723if { (ac_try="$ac_compile"
9724case "(($ac_try" in
9725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9726 *) ac_try_echo=$ac_try;;
9727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009731 grep -v '^ *+' conftest.er1 >conftest.err
9732 rm -f conftest.er1
9733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735 (exit $ac_status); } && {
9736 test -z "$ac_c_werror_flag" ||
9737 test ! -s conftest.err
9738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_lo=0 ac_mid=0
9740 while :; do
9741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* confdefs.h. */
9743_ACEOF
9744cat confdefs.h >>conftest.$ac_ext
9745cat >>conftest.$ac_ext <<_ACEOF
9746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009748 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009749int
9750main ()
9751{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009753test_array [0] = 0
9754
9755 ;
9756 return 0;
9757}
9758_ACEOF
9759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760if { (ac_try="$ac_compile"
9761case "(($ac_try" in
9762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9763 *) ac_try_echo=$ac_try;;
9764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009768 grep -v '^ *+' conftest.er1 >conftest.err
9769 rm -f conftest.er1
9770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772 (exit $ac_status); } && {
9773 test -z "$ac_c_werror_flag" ||
9774 test ! -s conftest.err
9775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_hi=$ac_mid; break
9777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009779sed 's/^/| /' conftest.$ac_ext >&5
9780
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781 ac_lo=`expr $ac_mid + 1`
9782 if test $ac_lo -le $ac_mid; then
9783 ac_lo= ac_hi=
9784 break
9785 fi
9786 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009788
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 done
9791else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009793sed 's/^/| /' conftest.$ac_ext >&5
9794
Martin v. Löwiseba40652007-08-30 20:10:57 +00009795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* confdefs.h. */
9797_ACEOF
9798cat confdefs.h >>conftest.$ac_ext
9799cat >>conftest.$ac_ext <<_ACEOF
9800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009802 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009807test_array [0] = 0
9808
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009814if { (ac_try="$ac_compile"
9815case "(($ac_try" in
9816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9817 *) ac_try_echo=$ac_try;;
9818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009822 grep -v '^ *+' conftest.er1 >conftest.err
9823 rm -f conftest.er1
9824 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826 (exit $ac_status); } && {
9827 test -z "$ac_c_werror_flag" ||
9828 test ! -s conftest.err
9829 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_hi=-1 ac_mid=-1
9831 while :; do
9832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* confdefs.h. */
9834_ACEOF
9835cat confdefs.h >>conftest.$ac_ext
9836cat >>conftest.$ac_ext <<_ACEOF
9837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009839 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009840int
9841main ()
9842{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009844test_array [0] = 0
9845
9846 ;
9847 return 0;
9848}
9849_ACEOF
9850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851if { (ac_try="$ac_compile"
9852case "(($ac_try" in
9853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9854 *) ac_try_echo=$ac_try;;
9855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009859 grep -v '^ *+' conftest.er1 >conftest.err
9860 rm -f conftest.er1
9861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863 (exit $ac_status); } && {
9864 test -z "$ac_c_werror_flag" ||
9865 test ! -s conftest.err
9866 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 ac_lo=$ac_mid; break
9868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009870sed 's/^/| /' conftest.$ac_ext >&5
9871
Martin v. Löwiseba40652007-08-30 20:10:57 +00009872 ac_hi=`expr '(' $ac_mid ')' - 1`
9873 if test $ac_mid -le $ac_hi; then
9874 ac_lo= ac_hi=
9875 break
9876 fi
9877 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009879
9880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 done
9882else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009884sed 's/^/| /' conftest.$ac_ext >&5
9885
Martin v. Löwiseba40652007-08-30 20:10:57 +00009886 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888
9889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891
9892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009893# Binary search between lo and hi bounds.
9894while test "x$ac_lo" != "x$ac_hi"; do
9895 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* confdefs.h. */
9898_ACEOF
9899cat confdefs.h >>conftest.$ac_ext
9900cat >>conftest.$ac_ext <<_ACEOF
9901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009902$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009903 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009904int
9905main ()
9906{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009907static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009908test_array [0] = 0
9909
9910 ;
9911 return 0;
9912}
9913_ACEOF
9914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915if { (ac_try="$ac_compile"
9916case "(($ac_try" in
9917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9918 *) ac_try_echo=$ac_try;;
9919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009923 grep -v '^ *+' conftest.er1 >conftest.err
9924 rm -f conftest.er1
9925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927 (exit $ac_status); } && {
9928 test -z "$ac_c_werror_flag" ||
9929 test ! -s conftest.err
9930 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ac_hi=$ac_mid
9932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009934sed 's/^/| /' conftest.$ac_ext >&5
9935
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938
9939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009940done
9941case $ac_lo in
9942?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009944 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009945See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009946echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009947See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009948 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949 else
9950 ac_cv_sizeof_double=0
9951 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009952esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009953else
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009955/* confdefs.h. */
9956_ACEOF
9957cat confdefs.h >>conftest.$ac_ext
9958cat >>conftest.$ac_ext <<_ACEOF
9959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009960$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009961 typedef double ac__type_sizeof_;
9962static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9963static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009964#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009965#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009966int
9967main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009968{
Martin v. Löwis11437992002-04-12 09:54:03 +00009969
9970 FILE *f = fopen ("conftest.val", "w");
9971 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009972 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009973 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009976 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009978 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 }
9980 else
9981 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009983 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009985 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009987 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
9989 ;
9990 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009991}
Martin v. Löwis11437992002-04-12 09:54:03 +00009992_ACEOF
9993rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994if { (ac_try="$ac_link"
9995case "(($ac_try" in
9996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9997 *) ac_try_echo=$ac_try;;
9998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010004 { (case "(($ac_try" in
10005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10006 *) ac_try_echo=$ac_try;;
10007esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 (exit $ac_status); }; }; then
10013 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015 echo "$as_me: program exited with status $ac_status" >&5
10016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010017sed 's/^/| /' conftest.$ac_ext >&5
10018
Martin v. Löwis11437992002-04-12 09:54:03 +000010019( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010021 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010022See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010023echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010024See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010025 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026 else
10027 ac_cv_sizeof_double=0
10028 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030rm -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 +000010031fi
10032rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010034{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10035echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010036
10037
10038
Martin v. Löwis11437992002-04-12 09:54:03 +000010039cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010040#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010041_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010042
10043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010044{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10045echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10046if test "${ac_cv_type_fpos_t+set}" = set; then
10047 echo $ECHO_N "(cached) $ECHO_C" >&6
10048else
10049 cat >conftest.$ac_ext <<_ACEOF
10050/* confdefs.h. */
10051_ACEOF
10052cat confdefs.h >>conftest.$ac_ext
10053cat >>conftest.$ac_ext <<_ACEOF
10054/* end confdefs.h. */
10055$ac_includes_default
10056typedef fpos_t ac__type_new_;
10057int
10058main ()
10059{
10060if ((ac__type_new_ *) 0)
10061 return 0;
10062if (sizeof (ac__type_new_))
10063 return 0;
10064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
10069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
10074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10075 (eval "$ac_compile") 2>conftest.er1
10076 ac_status=$?
10077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
10080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081 (exit $ac_status); } && {
10082 test -z "$ac_c_werror_flag" ||
10083 test ! -s conftest.err
10084 } && test -s conftest.$ac_objext; then
10085 ac_cv_type_fpos_t=yes
10086else
10087 echo "$as_me: failed program was:" >&5
10088sed 's/^/| /' conftest.$ac_ext >&5
10089
10090 ac_cv_type_fpos_t=no
10091fi
10092
10093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10094fi
10095{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10096echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10097
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098# The cast to long int works around a bug in the HP C Compiler
10099# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10100# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10101# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010102{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10103echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010104if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010105 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010106else
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 if test "$cross_compiling" = yes; then
10108 # Depending upon the size, compute the lo and hi bounds.
10109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* confdefs.h. */
10111_ACEOF
10112cat confdefs.h >>conftest.$ac_ext
10113cat >>conftest.$ac_ext <<_ACEOF
10114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010115$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010116 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010117int
10118main ()
10119{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010121test_array [0] = 0
10122
10123 ;
10124 return 0;
10125}
10126_ACEOF
10127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128if { (ac_try="$ac_compile"
10129case "(($ac_try" in
10130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10131 *) ac_try_echo=$ac_try;;
10132esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010136 grep -v '^ *+' conftest.er1 >conftest.err
10137 rm -f conftest.er1
10138 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010140 (exit $ac_status); } && {
10141 test -z "$ac_c_werror_flag" ||
10142 test ! -s conftest.err
10143 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_lo=0 ac_mid=0
10145 while :; do
10146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* confdefs.h. */
10148_ACEOF
10149cat confdefs.h >>conftest.$ac_ext
10150cat >>conftest.$ac_ext <<_ACEOF
10151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010152$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010153 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010154int
10155main ()
10156{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010158test_array [0] = 0
10159
10160 ;
10161 return 0;
10162}
10163_ACEOF
10164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165if { (ac_try="$ac_compile"
10166case "(($ac_try" in
10167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10168 *) ac_try_echo=$ac_try;;
10169esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010173 grep -v '^ *+' conftest.er1 >conftest.err
10174 rm -f conftest.er1
10175 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177 (exit $ac_status); } && {
10178 test -z "$ac_c_werror_flag" ||
10179 test ! -s conftest.err
10180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_hi=$ac_mid; break
10182else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010184sed 's/^/| /' conftest.$ac_ext >&5
10185
Martin v. Löwiseba40652007-08-30 20:10:57 +000010186 ac_lo=`expr $ac_mid + 1`
10187 if test $ac_lo -le $ac_mid; then
10188 ac_lo= ac_hi=
10189 break
10190 fi
10191 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010193
10194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 done
10196else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010198sed 's/^/| /' conftest.$ac_ext >&5
10199
Martin v. Löwiseba40652007-08-30 20:10:57 +000010200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* confdefs.h. */
10202_ACEOF
10203cat confdefs.h >>conftest.$ac_ext
10204cat >>conftest.$ac_ext <<_ACEOF
10205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010206$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010207 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010208int
10209main ()
10210{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010211static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010212test_array [0] = 0
10213
10214 ;
10215 return 0;
10216}
10217_ACEOF
10218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010219if { (ac_try="$ac_compile"
10220case "(($ac_try" in
10221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10222 *) ac_try_echo=$ac_try;;
10223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010227 grep -v '^ *+' conftest.er1 >conftest.err
10228 rm -f conftest.er1
10229 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010231 (exit $ac_status); } && {
10232 test -z "$ac_c_werror_flag" ||
10233 test ! -s conftest.err
10234 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_hi=-1 ac_mid=-1
10236 while :; do
10237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* confdefs.h. */
10239_ACEOF
10240cat confdefs.h >>conftest.$ac_ext
10241cat >>conftest.$ac_ext <<_ACEOF
10242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010243$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010244 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010245int
10246main ()
10247{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010249test_array [0] = 0
10250
10251 ;
10252 return 0;
10253}
10254_ACEOF
10255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256if { (ac_try="$ac_compile"
10257case "(($ac_try" in
10258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10259 *) ac_try_echo=$ac_try;;
10260esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010264 grep -v '^ *+' conftest.er1 >conftest.err
10265 rm -f conftest.er1
10266 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268 (exit $ac_status); } && {
10269 test -z "$ac_c_werror_flag" ||
10270 test ! -s conftest.err
10271 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 ac_lo=$ac_mid; break
10273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010275sed 's/^/| /' conftest.$ac_ext >&5
10276
Martin v. Löwiseba40652007-08-30 20:10:57 +000010277 ac_hi=`expr '(' $ac_mid ')' - 1`
10278 if test $ac_mid -le $ac_hi; then
10279 ac_lo= ac_hi=
10280 break
10281 fi
10282 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010284
10285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 done
10287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010289sed 's/^/| /' conftest.$ac_ext >&5
10290
Martin v. Löwiseba40652007-08-30 20:10:57 +000010291 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293
10294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296
10297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010298# Binary search between lo and hi bounds.
10299while test "x$ac_lo" != "x$ac_hi"; do
10300 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* confdefs.h. */
10303_ACEOF
10304cat confdefs.h >>conftest.$ac_ext
10305cat >>conftest.$ac_ext <<_ACEOF
10306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010307$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010308 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010309int
10310main ()
10311{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010313test_array [0] = 0
10314
10315 ;
10316 return 0;
10317}
10318_ACEOF
10319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010320if { (ac_try="$ac_compile"
10321case "(($ac_try" in
10322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10323 *) ac_try_echo=$ac_try;;
10324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010328 grep -v '^ *+' conftest.er1 >conftest.err
10329 rm -f conftest.er1
10330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010332 (exit $ac_status); } && {
10333 test -z "$ac_c_werror_flag" ||
10334 test ! -s conftest.err
10335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 ac_hi=$ac_mid
10337else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010339sed 's/^/| /' conftest.$ac_ext >&5
10340
Martin v. Löwiseba40652007-08-30 20:10:57 +000010341 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343
10344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010345done
10346case $ac_lo in
10347?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010348'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010349 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010350See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010351echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010352See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010353 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354 else
10355 ac_cv_sizeof_fpos_t=0
10356 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010357esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010358else
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010360/* confdefs.h. */
10361_ACEOF
10362cat confdefs.h >>conftest.$ac_ext
10363cat >>conftest.$ac_ext <<_ACEOF
10364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010366 typedef fpos_t ac__type_sizeof_;
10367static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10368static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010369#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010370#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010371int
10372main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010373{
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
10375 FILE *f = fopen ("conftest.val", "w");
10376 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010377 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010378 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010380 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010381 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010382 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010383 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 }
10385 else
10386 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010387 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010388 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010389 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010390 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010392 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
10394 ;
10395 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010396}
Martin v. Löwis11437992002-04-12 09:54:03 +000010397_ACEOF
10398rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010399if { (ac_try="$ac_link"
10400case "(($ac_try" in
10401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10402 *) ac_try_echo=$ac_try;;
10403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010409 { (case "(($ac_try" in
10410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10411 *) ac_try_echo=$ac_try;;
10412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010414 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 (exit $ac_status); }; }; then
10418 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010419else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420 echo "$as_me: program exited with status $ac_status" >&5
10421echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010422sed 's/^/| /' conftest.$ac_ext >&5
10423
Martin v. Löwis11437992002-04-12 09:54:03 +000010424( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010426 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010427See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010428echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010429See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010430 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010431 else
10432 ac_cv_sizeof_fpos_t=0
10433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010435rm -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 +000010436fi
10437rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010438fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010439{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10440echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441
10442
10443
Martin v. Löwis11437992002-04-12 09:54:03 +000010444cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010445#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010446_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010447
Michael W. Hudson54241132001-12-07 15:38:26 +000010448
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010449{ echo "$as_me:$LINENO: checking for size_t" >&5
10450echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10451if test "${ac_cv_type_size_t+set}" = set; then
10452 echo $ECHO_N "(cached) $ECHO_C" >&6
10453else
10454 cat >conftest.$ac_ext <<_ACEOF
10455/* confdefs.h. */
10456_ACEOF
10457cat confdefs.h >>conftest.$ac_ext
10458cat >>conftest.$ac_ext <<_ACEOF
10459/* end confdefs.h. */
10460$ac_includes_default
10461typedef size_t ac__type_new_;
10462int
10463main ()
10464{
10465if ((ac__type_new_ *) 0)
10466 return 0;
10467if (sizeof (ac__type_new_))
10468 return 0;
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
10474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
10479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10480 (eval "$ac_compile") 2>conftest.er1
10481 ac_status=$?
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
10485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest.$ac_objext; then
10490 ac_cv_type_size_t=yes
10491else
10492 echo "$as_me: failed program was:" >&5
10493sed 's/^/| /' conftest.$ac_ext >&5
10494
10495 ac_cv_type_size_t=no
10496fi
10497
10498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10499fi
10500{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10501echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10502
Martin v. Löwiseba40652007-08-30 20:10:57 +000010503# The cast to long int works around a bug in the HP C Compiler
10504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10506# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010507{ echo "$as_me:$LINENO: checking size of size_t" >&5
10508echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010510 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 if test "$cross_compiling" = yes; then
10513 # Depending upon the size, compute the lo and hi bounds.
10514cat >conftest.$ac_ext <<_ACEOF
10515/* confdefs.h. */
10516_ACEOF
10517cat confdefs.h >>conftest.$ac_ext
10518cat >>conftest.$ac_ext <<_ACEOF
10519/* end confdefs.h. */
10520$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010521 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522int
10523main ()
10524{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010525static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526test_array [0] = 0
10527
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010533if { (ac_try="$ac_compile"
10534case "(($ac_try" in
10535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10536 *) ac_try_echo=$ac_try;;
10537esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010539 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540 ac_status=$?
10541 grep -v '^ *+' conftest.er1 >conftest.err
10542 rm -f conftest.er1
10543 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010545 (exit $ac_status); } && {
10546 test -z "$ac_c_werror_flag" ||
10547 test ! -s conftest.err
10548 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549 ac_lo=0 ac_mid=0
10550 while :; do
10551 cat >conftest.$ac_ext <<_ACEOF
10552/* confdefs.h. */
10553_ACEOF
10554cat confdefs.h >>conftest.$ac_ext
10555cat >>conftest.$ac_ext <<_ACEOF
10556/* end confdefs.h. */
10557$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010558 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559int
10560main ()
10561{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563test_array [0] = 0
10564
10565 ;
10566 return 0;
10567}
10568_ACEOF
10569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570if { (ac_try="$ac_compile"
10571case "(($ac_try" in
10572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10573 *) ac_try_echo=$ac_try;;
10574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010577 ac_status=$?
10578 grep -v '^ *+' conftest.er1 >conftest.err
10579 rm -f conftest.er1
10580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010582 (exit $ac_status); } && {
10583 test -z "$ac_c_werror_flag" ||
10584 test ! -s conftest.err
10585 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586 ac_hi=$ac_mid; break
10587else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010588 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589sed 's/^/| /' conftest.$ac_ext >&5
10590
Martin v. Löwiseba40652007-08-30 20:10:57 +000010591 ac_lo=`expr $ac_mid + 1`
10592 if test $ac_lo -le $ac_mid; then
10593 ac_lo= ac_hi=
10594 break
10595 fi
10596 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600 done
10601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010602 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603sed 's/^/| /' conftest.$ac_ext >&5
10604
Martin v. Löwiseba40652007-08-30 20:10:57 +000010605 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010606/* confdefs.h. */
10607_ACEOF
10608cat confdefs.h >>conftest.$ac_ext
10609cat >>conftest.$ac_ext <<_ACEOF
10610/* end confdefs.h. */
10611$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010612 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613int
10614main ()
10615{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617test_array [0] = 0
10618
10619 ;
10620 return 0;
10621}
10622_ACEOF
10623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624if { (ac_try="$ac_compile"
10625case "(($ac_try" in
10626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10627 *) ac_try_echo=$ac_try;;
10628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631 ac_status=$?
10632 grep -v '^ *+' conftest.er1 >conftest.err
10633 rm -f conftest.er1
10634 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636 (exit $ac_status); } && {
10637 test -z "$ac_c_werror_flag" ||
10638 test ! -s conftest.err
10639 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_hi=-1 ac_mid=-1
10641 while :; do
10642 cat >conftest.$ac_ext <<_ACEOF
10643/* confdefs.h. */
10644_ACEOF
10645cat confdefs.h >>conftest.$ac_ext
10646cat >>conftest.$ac_ext <<_ACEOF
10647/* end confdefs.h. */
10648$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010649 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650int
10651main ()
10652{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654test_array [0] = 0
10655
10656 ;
10657 return 0;
10658}
10659_ACEOF
10660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661if { (ac_try="$ac_compile"
10662case "(($ac_try" in
10663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10664 *) ac_try_echo=$ac_try;;
10665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668 ac_status=$?
10669 grep -v '^ *+' conftest.er1 >conftest.err
10670 rm -f conftest.er1
10671 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673 (exit $ac_status); } && {
10674 test -z "$ac_c_werror_flag" ||
10675 test ! -s conftest.err
10676 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 ac_lo=$ac_mid; break
10678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010679 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680sed 's/^/| /' conftest.$ac_ext >&5
10681
Martin v. Löwiseba40652007-08-30 20:10:57 +000010682 ac_hi=`expr '(' $ac_mid ')' - 1`
10683 if test $ac_mid -le $ac_hi; then
10684 ac_lo= ac_hi=
10685 break
10686 fi
10687 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689
10690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010691 done
10692else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010693 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694sed 's/^/| /' conftest.$ac_ext >&5
10695
Martin v. Löwiseba40652007-08-30 20:10:57 +000010696 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698
10699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701
10702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703# Binary search between lo and hi bounds.
10704while test "x$ac_lo" != "x$ac_hi"; do
10705 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10706 cat >conftest.$ac_ext <<_ACEOF
10707/* confdefs.h. */
10708_ACEOF
10709cat confdefs.h >>conftest.$ac_ext
10710cat >>conftest.$ac_ext <<_ACEOF
10711/* end confdefs.h. */
10712$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010713 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010714int
10715main ()
10716{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010718test_array [0] = 0
10719
10720 ;
10721 return 0;
10722}
10723_ACEOF
10724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725if { (ac_try="$ac_compile"
10726case "(($ac_try" in
10727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10728 *) ac_try_echo=$ac_try;;
10729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010732 ac_status=$?
10733 grep -v '^ *+' conftest.er1 >conftest.err
10734 rm -f conftest.er1
10735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010737 (exit $ac_status); } && {
10738 test -z "$ac_c_werror_flag" ||
10739 test ! -s conftest.err
10740 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010741 ac_hi=$ac_mid
10742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744sed 's/^/| /' conftest.$ac_ext >&5
10745
Martin v. Löwiseba40652007-08-30 20:10:57 +000010746 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748
10749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010750done
10751case $ac_lo in
10752?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010753'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010754 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010756echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010758 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759 else
10760 ac_cv_sizeof_size_t=0
10761 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762esac
10763else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010764 cat >conftest.$ac_ext <<_ACEOF
10765/* confdefs.h. */
10766_ACEOF
10767cat confdefs.h >>conftest.$ac_ext
10768cat >>conftest.$ac_ext <<_ACEOF
10769/* end confdefs.h. */
10770$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010771 typedef size_t ac__type_sizeof_;
10772static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10773static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010774#include <stdio.h>
10775#include <stdlib.h>
10776int
10777main ()
10778{
10779
10780 FILE *f = fopen ("conftest.val", "w");
10781 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010783 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010784 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010785 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010786 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010788 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010789 }
10790 else
10791 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010792 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010793 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010795 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010796 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010797 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010798
10799 ;
10800 return 0;
10801}
10802_ACEOF
10803rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010804if { (ac_try="$ac_link"
10805case "(($ac_try" in
10806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10807 *) ac_try_echo=$ac_try;;
10808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010811 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010814 { (case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010819 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010820 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822 (exit $ac_status); }; }; then
10823 ac_cv_sizeof_size_t=`cat conftest.val`
10824else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825 echo "$as_me: program exited with status $ac_status" >&5
10826echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010827sed 's/^/| /' conftest.$ac_ext >&5
10828
10829( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010831 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010832See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010833echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010834See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010835 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836 else
10837 ac_cv_sizeof_size_t=0
10838 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010840rm -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 +000010841fi
10842rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010843fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010844{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10845echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010846
10847
10848
Martin v. Löwis18e16552006-02-15 17:27:45 +000010849cat >>confdefs.h <<_ACEOF
10850#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10851_ACEOF
10852
10853
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010854{ echo "$as_me:$LINENO: checking for pid_t" >&5
10855echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10856if test "${ac_cv_type_pid_t+set}" = set; then
10857 echo $ECHO_N "(cached) $ECHO_C" >&6
10858else
10859 cat >conftest.$ac_ext <<_ACEOF
10860/* confdefs.h. */
10861_ACEOF
10862cat confdefs.h >>conftest.$ac_ext
10863cat >>conftest.$ac_ext <<_ACEOF
10864/* end confdefs.h. */
10865$ac_includes_default
10866typedef pid_t ac__type_new_;
10867int
10868main ()
10869{
10870if ((ac__type_new_ *) 0)
10871 return 0;
10872if (sizeof (ac__type_new_))
10873 return 0;
10874 ;
10875 return 0;
10876}
10877_ACEOF
10878rm -f conftest.$ac_objext
10879if { (ac_try="$ac_compile"
10880case "(($ac_try" in
10881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10882 *) ac_try_echo=$ac_try;;
10883esac
10884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10885 (eval "$ac_compile") 2>conftest.er1
10886 ac_status=$?
10887 grep -v '^ *+' conftest.er1 >conftest.err
10888 rm -f conftest.er1
10889 cat conftest.err >&5
10890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10891 (exit $ac_status); } && {
10892 test -z "$ac_c_werror_flag" ||
10893 test ! -s conftest.err
10894 } && test -s conftest.$ac_objext; then
10895 ac_cv_type_pid_t=yes
10896else
10897 echo "$as_me: failed program was:" >&5
10898sed 's/^/| /' conftest.$ac_ext >&5
10899
10900 ac_cv_type_pid_t=no
10901fi
10902
10903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10904fi
10905{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10906echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10907
Christian Heimes951cc0f2008-01-31 23:08:23 +000010908# The cast to long int works around a bug in the HP C Compiler
10909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10911# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010912{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10913echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010914if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010915 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010916else
10917 if test "$cross_compiling" = yes; then
10918 # Depending upon the size, compute the lo and hi bounds.
10919cat >conftest.$ac_ext <<_ACEOF
10920/* confdefs.h. */
10921_ACEOF
10922cat confdefs.h >>conftest.$ac_ext
10923cat >>conftest.$ac_ext <<_ACEOF
10924/* end confdefs.h. */
10925$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010926 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010927int
10928main ()
10929{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010930static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010931test_array [0] = 0
10932
10933 ;
10934 return 0;
10935}
10936_ACEOF
10937rm -f conftest.$ac_objext
10938if { (ac_try="$ac_compile"
10939case "(($ac_try" in
10940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10941 *) ac_try_echo=$ac_try;;
10942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010944 (eval "$ac_compile") 2>conftest.er1
10945 ac_status=$?
10946 grep -v '^ *+' conftest.er1 >conftest.err
10947 rm -f conftest.er1
10948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010950 (exit $ac_status); } && {
10951 test -z "$ac_c_werror_flag" ||
10952 test ! -s conftest.err
10953 } && test -s conftest.$ac_objext; then
10954 ac_lo=0 ac_mid=0
10955 while :; do
10956 cat >conftest.$ac_ext <<_ACEOF
10957/* confdefs.h. */
10958_ACEOF
10959cat confdefs.h >>conftest.$ac_ext
10960cat >>conftest.$ac_ext <<_ACEOF
10961/* end confdefs.h. */
10962$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010963 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010964int
10965main ()
10966{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010968test_array [0] = 0
10969
10970 ;
10971 return 0;
10972}
10973_ACEOF
10974rm -f conftest.$ac_objext
10975if { (ac_try="$ac_compile"
10976case "(($ac_try" in
10977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10978 *) ac_try_echo=$ac_try;;
10979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010981 (eval "$ac_compile") 2>conftest.er1
10982 ac_status=$?
10983 grep -v '^ *+' conftest.er1 >conftest.err
10984 rm -f conftest.er1
10985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010987 (exit $ac_status); } && {
10988 test -z "$ac_c_werror_flag" ||
10989 test ! -s conftest.err
10990 } && test -s conftest.$ac_objext; then
10991 ac_hi=$ac_mid; break
10992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010993 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010994sed 's/^/| /' conftest.$ac_ext >&5
10995
10996 ac_lo=`expr $ac_mid + 1`
10997 if test $ac_lo -le $ac_mid; then
10998 ac_lo= ac_hi=
10999 break
11000 fi
11001 ac_mid=`expr 2 '*' $ac_mid + 1`
11002fi
11003
11004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005 done
11006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011007 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011008sed 's/^/| /' conftest.$ac_ext >&5
11009
11010 cat >conftest.$ac_ext <<_ACEOF
11011/* confdefs.h. */
11012_ACEOF
11013cat confdefs.h >>conftest.$ac_ext
11014cat >>conftest.$ac_ext <<_ACEOF
11015/* end confdefs.h. */
11016$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011017 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011018int
11019main ()
11020{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011022test_array [0] = 0
11023
11024 ;
11025 return 0;
11026}
11027_ACEOF
11028rm -f conftest.$ac_objext
11029if { (ac_try="$ac_compile"
11030case "(($ac_try" in
11031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11032 *) ac_try_echo=$ac_try;;
11033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011035 (eval "$ac_compile") 2>conftest.er1
11036 ac_status=$?
11037 grep -v '^ *+' conftest.er1 >conftest.err
11038 rm -f conftest.er1
11039 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011041 (exit $ac_status); } && {
11042 test -z "$ac_c_werror_flag" ||
11043 test ! -s conftest.err
11044 } && test -s conftest.$ac_objext; then
11045 ac_hi=-1 ac_mid=-1
11046 while :; do
11047 cat >conftest.$ac_ext <<_ACEOF
11048/* confdefs.h. */
11049_ACEOF
11050cat confdefs.h >>conftest.$ac_ext
11051cat >>conftest.$ac_ext <<_ACEOF
11052/* end confdefs.h. */
11053$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011054 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011055int
11056main ()
11057{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011059test_array [0] = 0
11060
11061 ;
11062 return 0;
11063}
11064_ACEOF
11065rm -f conftest.$ac_objext
11066if { (ac_try="$ac_compile"
11067case "(($ac_try" in
11068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11069 *) ac_try_echo=$ac_try;;
11070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072 (eval "$ac_compile") 2>conftest.er1
11073 ac_status=$?
11074 grep -v '^ *+' conftest.er1 >conftest.err
11075 rm -f conftest.er1
11076 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011078 (exit $ac_status); } && {
11079 test -z "$ac_c_werror_flag" ||
11080 test ! -s conftest.err
11081 } && test -s conftest.$ac_objext; then
11082 ac_lo=$ac_mid; break
11083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011084 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011085sed 's/^/| /' conftest.$ac_ext >&5
11086
11087 ac_hi=`expr '(' $ac_mid ')' - 1`
11088 if test $ac_mid -le $ac_hi; then
11089 ac_lo= ac_hi=
11090 break
11091 fi
11092 ac_mid=`expr 2 '*' $ac_mid`
11093fi
11094
11095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11096 done
11097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011098 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011099sed 's/^/| /' conftest.$ac_ext >&5
11100
11101 ac_lo= ac_hi=
11102fi
11103
11104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11105fi
11106
11107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11108# Binary search between lo and hi bounds.
11109while test "x$ac_lo" != "x$ac_hi"; do
11110 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11111 cat >conftest.$ac_ext <<_ACEOF
11112/* confdefs.h. */
11113_ACEOF
11114cat confdefs.h >>conftest.$ac_ext
11115cat >>conftest.$ac_ext <<_ACEOF
11116/* end confdefs.h. */
11117$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011118 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011119int
11120main ()
11121{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123test_array [0] = 0
11124
11125 ;
11126 return 0;
11127}
11128_ACEOF
11129rm -f conftest.$ac_objext
11130if { (ac_try="$ac_compile"
11131case "(($ac_try" in
11132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11133 *) ac_try_echo=$ac_try;;
11134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011136 (eval "$ac_compile") 2>conftest.er1
11137 ac_status=$?
11138 grep -v '^ *+' conftest.er1 >conftest.err
11139 rm -f conftest.er1
11140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011142 (exit $ac_status); } && {
11143 test -z "$ac_c_werror_flag" ||
11144 test ! -s conftest.err
11145 } && test -s conftest.$ac_objext; then
11146 ac_hi=$ac_mid
11147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149sed 's/^/| /' conftest.$ac_ext >&5
11150
11151 ac_lo=`expr '(' $ac_mid ')' + 1`
11152fi
11153
11154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11155done
11156case $ac_lo in
11157?*) ac_cv_sizeof_pid_t=$ac_lo;;
11158'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011159 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011160See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011161echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011162See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164 else
11165 ac_cv_sizeof_pid_t=0
11166 fi ;;
11167esac
11168else
11169 cat >conftest.$ac_ext <<_ACEOF
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
11175$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011176 typedef pid_t ac__type_sizeof_;
11177static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11178static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011179#include <stdio.h>
11180#include <stdlib.h>
11181int
11182main ()
11183{
11184
11185 FILE *f = fopen ("conftest.val", "w");
11186 if (! f)
11187 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011188 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011189 {
11190 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011191 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011192 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011193 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011194 }
11195 else
11196 {
11197 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011198 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011199 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011200 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011201 }
11202 return ferror (f) || fclose (f) != 0;
11203
11204 ;
11205 return 0;
11206}
11207_ACEOF
11208rm -f conftest$ac_exeext
11209if { (ac_try="$ac_link"
11210case "(($ac_try" in
11211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11212 *) ac_try_echo=$ac_try;;
11213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011215 (eval "$ac_link") 2>&5
11216 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11219 { (case "(($ac_try" in
11220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11221 *) ac_try_echo=$ac_try;;
11222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011224 (eval "$ac_try") 2>&5
11225 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011227 (exit $ac_status); }; }; then
11228 ac_cv_sizeof_pid_t=`cat conftest.val`
11229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011230 echo "$as_me: program exited with status $ac_status" >&5
11231echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011232sed 's/^/| /' conftest.$ac_ext >&5
11233
11234( exit $ac_status )
11235if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011236 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011237See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011238echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011239See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011240 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011241 else
11242 ac_cv_sizeof_pid_t=0
11243 fi
11244fi
11245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11246fi
11247rm -f conftest.val
11248fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011249{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11250echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011251
11252
11253
11254cat >>confdefs.h <<_ACEOF
11255#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11256_ACEOF
11257
11258
Michael W. Hudson54241132001-12-07 15:38:26 +000011259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011260{ echo "$as_me:$LINENO: checking for long long support" >&5
11261echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011262have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* confdefs.h. */
11265_ACEOF
11266cat confdefs.h >>conftest.$ac_ext
11267cat >>conftest.$ac_ext <<_ACEOF
11268/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011273long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ;
11275 return 0;
11276}
11277_ACEOF
11278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279if { (ac_try="$ac_compile"
11280case "(($ac_try" in
11281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11282 *) ac_try_echo=$ac_try;;
11283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291 (exit $ac_status); } && {
11292 test -z "$ac_c_werror_flag" ||
11293 test ! -s conftest.err
11294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
11296
11297cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011298#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011299_ACEOF
11300
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011301 have_long_long=yes
11302
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011305sed 's/^/| /' conftest.$ac_ext >&5
11306
Martin v. Löwiseba40652007-08-30 20:10:57 +000011307
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309
11310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011311{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11312echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011313if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011314{ echo "$as_me:$LINENO: checking for long long" >&5
11315echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11316if test "${ac_cv_type_long_long+set}" = set; then
11317 echo $ECHO_N "(cached) $ECHO_C" >&6
11318else
11319 cat >conftest.$ac_ext <<_ACEOF
11320/* confdefs.h. */
11321_ACEOF
11322cat confdefs.h >>conftest.$ac_ext
11323cat >>conftest.$ac_ext <<_ACEOF
11324/* end confdefs.h. */
11325$ac_includes_default
11326typedef long long ac__type_new_;
11327int
11328main ()
11329{
11330if ((ac__type_new_ *) 0)
11331 return 0;
11332if (sizeof (ac__type_new_))
11333 return 0;
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
11339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
11344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11345 (eval "$ac_compile") 2>conftest.er1
11346 ac_status=$?
11347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
11355 ac_cv_type_long_long=yes
11356else
11357 echo "$as_me: failed program was:" >&5
11358sed 's/^/| /' conftest.$ac_ext >&5
11359
11360 ac_cv_type_long_long=no
11361fi
11362
11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364fi
11365{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11366echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11367
Martin v. Löwiseba40652007-08-30 20:10:57 +000011368# The cast to long int works around a bug in the HP C Compiler
11369# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11370# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11371# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011372{ echo "$as_me:$LINENO: checking size of long long" >&5
11373echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011374if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011375 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011376else
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 if test "$cross_compiling" = yes; then
11378 # Depending upon the size, compute the lo and hi bounds.
11379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* confdefs.h. */
11381_ACEOF
11382cat confdefs.h >>conftest.$ac_ext
11383cat >>conftest.$ac_ext <<_ACEOF
11384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011385$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011386 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011390static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011391test_array [0] = 0
11392
11393 ;
11394 return 0;
11395}
11396_ACEOF
11397rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011398if { (ac_try="$ac_compile"
11399case "(($ac_try" in
11400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11401 *) ac_try_echo=$ac_try;;
11402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011406 grep -v '^ *+' conftest.er1 >conftest.err
11407 rm -f conftest.er1
11408 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410 (exit $ac_status); } && {
11411 test -z "$ac_c_werror_flag" ||
11412 test ! -s conftest.err
11413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ac_lo=0 ac_mid=0
11415 while :; do
11416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011417/* confdefs.h. */
11418_ACEOF
11419cat confdefs.h >>conftest.$ac_ext
11420cat >>conftest.$ac_ext <<_ACEOF
11421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011422$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011423 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011424int
11425main ()
11426{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011427static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011428test_array [0] = 0
11429
11430 ;
11431 return 0;
11432}
11433_ACEOF
11434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435if { (ac_try="$ac_compile"
11436case "(($ac_try" in
11437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11438 *) ac_try_echo=$ac_try;;
11439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011443 grep -v '^ *+' conftest.er1 >conftest.err
11444 rm -f conftest.er1
11445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011447 (exit $ac_status); } && {
11448 test -z "$ac_c_werror_flag" ||
11449 test ! -s conftest.err
11450 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ac_hi=$ac_mid; break
11452else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011454sed 's/^/| /' conftest.$ac_ext >&5
11455
Martin v. Löwiseba40652007-08-30 20:10:57 +000011456 ac_lo=`expr $ac_mid + 1`
11457 if test $ac_lo -le $ac_mid; then
11458 ac_lo= ac_hi=
11459 break
11460 fi
11461 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011463
11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 done
11466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011468sed 's/^/| /' conftest.$ac_ext >&5
11469
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* confdefs.h. */
11472_ACEOF
11473cat confdefs.h >>conftest.$ac_ext
11474cat >>conftest.$ac_ext <<_ACEOF
11475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011476$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011477 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011482test_array [0] = 0
11483
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011489if { (ac_try="$ac_compile"
11490case "(($ac_try" in
11491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11492 *) ac_try_echo=$ac_try;;
11493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011497 grep -v '^ *+' conftest.er1 >conftest.err
11498 rm -f conftest.er1
11499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011501 (exit $ac_status); } && {
11502 test -z "$ac_c_werror_flag" ||
11503 test ! -s conftest.err
11504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_hi=-1 ac_mid=-1
11506 while :; do
11507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011508/* confdefs.h. */
11509_ACEOF
11510cat confdefs.h >>conftest.$ac_ext
11511cat >>conftest.$ac_ext <<_ACEOF
11512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011513$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011514 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011515int
11516main ()
11517{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011518static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011519test_array [0] = 0
11520
11521 ;
11522 return 0;
11523}
11524_ACEOF
11525rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526if { (ac_try="$ac_compile"
11527case "(($ac_try" in
11528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11529 *) ac_try_echo=$ac_try;;
11530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011534 grep -v '^ *+' conftest.er1 >conftest.err
11535 rm -f conftest.er1
11536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538 (exit $ac_status); } && {
11539 test -z "$ac_c_werror_flag" ||
11540 test ! -s conftest.err
11541 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 ac_lo=$ac_mid; break
11543else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011545sed 's/^/| /' conftest.$ac_ext >&5
11546
Martin v. Löwiseba40652007-08-30 20:10:57 +000011547 ac_hi=`expr '(' $ac_mid ')' - 1`
11548 if test $ac_mid -le $ac_hi; then
11549 ac_lo= ac_hi=
11550 break
11551 fi
11552 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011554
11555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 done
11557else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011559sed 's/^/| /' conftest.$ac_ext >&5
11560
Martin v. Löwiseba40652007-08-30 20:10:57 +000011561 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563
11564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566
11567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011568# Binary search between lo and hi bounds.
11569while test "x$ac_lo" != "x$ac_hi"; do
11570 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011572/* confdefs.h. */
11573_ACEOF
11574cat confdefs.h >>conftest.$ac_ext
11575cat >>conftest.$ac_ext <<_ACEOF
11576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011577$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011578 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011583test_array [0] = 0
11584
11585 ;
11586 return 0;
11587}
11588_ACEOF
11589rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011590if { (ac_try="$ac_compile"
11591case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011598 grep -v '^ *+' conftest.er1 >conftest.err
11599 rm -f conftest.er1
11600 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011602 (exit $ac_status); } && {
11603 test -z "$ac_c_werror_flag" ||
11604 test ! -s conftest.err
11605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011606 ac_hi=$ac_mid
11607else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011609sed 's/^/| /' conftest.$ac_ext >&5
11610
Martin v. Löwiseba40652007-08-30 20:10:57 +000011611 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613
11614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011615done
11616case $ac_lo in
11617?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011619 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011620See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011621echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011622See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011623 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624 else
11625 ac_cv_sizeof_long_long=0
11626 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011627esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011628else
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* confdefs.h. */
11631_ACEOF
11632cat confdefs.h >>conftest.$ac_ext
11633cat >>conftest.$ac_ext <<_ACEOF
11634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011635$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011636 typedef long long ac__type_sizeof_;
11637static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11638static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011639#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011640#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011641int
11642main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011643{
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
11645 FILE *f = fopen ("conftest.val", "w");
11646 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011647 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011648 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011650 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011651 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011653 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 }
11655 else
11656 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011657 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011658 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011659 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011660 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011662 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
11664 ;
11665 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011666}
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
11668rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669if { (ac_try="$ac_link"
11670case "(($ac_try" in
11671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11672 *) ac_try_echo=$ac_try;;
11673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011675 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011679 { (case "(($ac_try" in
11680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11681 *) ac_try_echo=$ac_try;;
11682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 (exit $ac_status); }; }; then
11688 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011690 echo "$as_me: program exited with status $ac_status" >&5
11691echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011692sed 's/^/| /' conftest.$ac_ext >&5
11693
Martin v. Löwis11437992002-04-12 09:54:03 +000011694( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011695if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011696 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011697See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011698echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011699See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011700 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701 else
11702 ac_cv_sizeof_long_long=0
11703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705rm -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 +000011706fi
11707rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011708fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011709{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11710echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011711
11712
11713
Martin v. Löwis11437992002-04-12 09:54:03 +000011714cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011715#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011716_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011717
Michael W. Hudson54241132001-12-07 15:38:26 +000011718
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011719fi
11720
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011721{ echo "$as_me:$LINENO: checking for long double support" >&5
11722echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011723have_long_double=no
11724cat >conftest.$ac_ext <<_ACEOF
11725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
11730
11731int
11732main ()
11733{
11734long double x; x = (long double)0.;
11735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
11740if { (ac_try="$ac_compile"
11741case "(($ac_try" in
11742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11743 *) ac_try_echo=$ac_try;;
11744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011746 (eval "$ac_compile") 2>conftest.er1
11747 ac_status=$?
11748 grep -v '^ *+' conftest.er1 >conftest.err
11749 rm -f conftest.er1
11750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011752 (exit $ac_status); } && {
11753 test -z "$ac_c_werror_flag" ||
11754 test ! -s conftest.err
11755 } && test -s conftest.$ac_objext; then
11756
11757
11758cat >>confdefs.h <<\_ACEOF
11759#define HAVE_LONG_DOUBLE 1
11760_ACEOF
11761
11762 have_long_double=yes
11763
11764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011765 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011766sed 's/^/| /' conftest.$ac_ext >&5
11767
11768
11769fi
11770
11771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011772{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11773echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011774if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011775{ echo "$as_me:$LINENO: checking for long double" >&5
11776echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11777if test "${ac_cv_type_long_double+set}" = set; then
11778 echo $ECHO_N "(cached) $ECHO_C" >&6
11779else
11780 cat >conftest.$ac_ext <<_ACEOF
11781/* confdefs.h. */
11782_ACEOF
11783cat confdefs.h >>conftest.$ac_ext
11784cat >>conftest.$ac_ext <<_ACEOF
11785/* end confdefs.h. */
11786$ac_includes_default
11787typedef long double ac__type_new_;
11788int
11789main ()
11790{
11791if ((ac__type_new_ *) 0)
11792 return 0;
11793if (sizeof (ac__type_new_))
11794 return 0;
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext
11800if { (ac_try="$ac_compile"
11801case "(($ac_try" in
11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803 *) ac_try_echo=$ac_try;;
11804esac
11805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11806 (eval "$ac_compile") 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812 (exit $ac_status); } && {
11813 test -z "$ac_c_werror_flag" ||
11814 test ! -s conftest.err
11815 } && test -s conftest.$ac_objext; then
11816 ac_cv_type_long_double=yes
11817else
11818 echo "$as_me: failed program was:" >&5
11819sed 's/^/| /' conftest.$ac_ext >&5
11820
11821 ac_cv_type_long_double=no
11822fi
11823
11824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11825fi
11826{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11827echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11828
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011829# The cast to long int works around a bug in the HP C Compiler
11830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11832# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011833{ echo "$as_me:$LINENO: checking size of long double" >&5
11834echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011835if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011836 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011837else
11838 if test "$cross_compiling" = yes; then
11839 # Depending upon the size, compute the lo and hi bounds.
11840cat >conftest.$ac_ext <<_ACEOF
11841/* confdefs.h. */
11842_ACEOF
11843cat confdefs.h >>conftest.$ac_ext
11844cat >>conftest.$ac_ext <<_ACEOF
11845/* end confdefs.h. */
11846$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011847 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011848int
11849main ()
11850{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011851static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011852test_array [0] = 0
11853
11854 ;
11855 return 0;
11856}
11857_ACEOF
11858rm -f conftest.$ac_objext
11859if { (ac_try="$ac_compile"
11860case "(($ac_try" in
11861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11862 *) ac_try_echo=$ac_try;;
11863esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011865 (eval "$ac_compile") 2>conftest.er1
11866 ac_status=$?
11867 grep -v '^ *+' conftest.er1 >conftest.err
11868 rm -f conftest.er1
11869 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011871 (exit $ac_status); } && {
11872 test -z "$ac_c_werror_flag" ||
11873 test ! -s conftest.err
11874 } && test -s conftest.$ac_objext; then
11875 ac_lo=0 ac_mid=0
11876 while :; do
11877 cat >conftest.$ac_ext <<_ACEOF
11878/* confdefs.h. */
11879_ACEOF
11880cat confdefs.h >>conftest.$ac_ext
11881cat >>conftest.$ac_ext <<_ACEOF
11882/* end confdefs.h. */
11883$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011884 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011885int
11886main ()
11887{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011888static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011889test_array [0] = 0
11890
11891 ;
11892 return 0;
11893}
11894_ACEOF
11895rm -f conftest.$ac_objext
11896if { (ac_try="$ac_compile"
11897case "(($ac_try" in
11898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11899 *) ac_try_echo=$ac_try;;
11900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011902 (eval "$ac_compile") 2>conftest.er1
11903 ac_status=$?
11904 grep -v '^ *+' conftest.er1 >conftest.err
11905 rm -f conftest.er1
11906 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011908 (exit $ac_status); } && {
11909 test -z "$ac_c_werror_flag" ||
11910 test ! -s conftest.err
11911 } && test -s conftest.$ac_objext; then
11912 ac_hi=$ac_mid; break
11913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011914 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011915sed 's/^/| /' conftest.$ac_ext >&5
11916
11917 ac_lo=`expr $ac_mid + 1`
11918 if test $ac_lo -le $ac_mid; then
11919 ac_lo= ac_hi=
11920 break
11921 fi
11922 ac_mid=`expr 2 '*' $ac_mid + 1`
11923fi
11924
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926 done
11927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011928 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011929sed 's/^/| /' conftest.$ac_ext >&5
11930
11931 cat >conftest.$ac_ext <<_ACEOF
11932/* confdefs.h. */
11933_ACEOF
11934cat confdefs.h >>conftest.$ac_ext
11935cat >>conftest.$ac_ext <<_ACEOF
11936/* end confdefs.h. */
11937$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011938 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011939int
11940main ()
11941{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011942static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011943test_array [0] = 0
11944
11945 ;
11946 return 0;
11947}
11948_ACEOF
11949rm -f conftest.$ac_objext
11950if { (ac_try="$ac_compile"
11951case "(($ac_try" in
11952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11953 *) ac_try_echo=$ac_try;;
11954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011956 (eval "$ac_compile") 2>conftest.er1
11957 ac_status=$?
11958 grep -v '^ *+' conftest.er1 >conftest.err
11959 rm -f conftest.er1
11960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011962 (exit $ac_status); } && {
11963 test -z "$ac_c_werror_flag" ||
11964 test ! -s conftest.err
11965 } && test -s conftest.$ac_objext; then
11966 ac_hi=-1 ac_mid=-1
11967 while :; do
11968 cat >conftest.$ac_ext <<_ACEOF
11969/* confdefs.h. */
11970_ACEOF
11971cat confdefs.h >>conftest.$ac_ext
11972cat >>conftest.$ac_ext <<_ACEOF
11973/* end confdefs.h. */
11974$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011975 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011976int
11977main ()
11978{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011979static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011980test_array [0] = 0
11981
11982 ;
11983 return 0;
11984}
11985_ACEOF
11986rm -f conftest.$ac_objext
11987if { (ac_try="$ac_compile"
11988case "(($ac_try" in
11989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11990 *) ac_try_echo=$ac_try;;
11991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993 (eval "$ac_compile") 2>conftest.er1
11994 ac_status=$?
11995 grep -v '^ *+' conftest.er1 >conftest.err
11996 rm -f conftest.er1
11997 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011999 (exit $ac_status); } && {
12000 test -z "$ac_c_werror_flag" ||
12001 test ! -s conftest.err
12002 } && test -s conftest.$ac_objext; then
12003 ac_lo=$ac_mid; break
12004else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012005 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012006sed 's/^/| /' conftest.$ac_ext >&5
12007
12008 ac_hi=`expr '(' $ac_mid ')' - 1`
12009 if test $ac_mid -le $ac_hi; then
12010 ac_lo= ac_hi=
12011 break
12012 fi
12013 ac_mid=`expr 2 '*' $ac_mid`
12014fi
12015
12016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12017 done
12018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012019 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012020sed 's/^/| /' conftest.$ac_ext >&5
12021
12022 ac_lo= ac_hi=
12023fi
12024
12025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12026fi
12027
12028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12029# Binary search between lo and hi bounds.
12030while test "x$ac_lo" != "x$ac_hi"; do
12031 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12032 cat >conftest.$ac_ext <<_ACEOF
12033/* confdefs.h. */
12034_ACEOF
12035cat confdefs.h >>conftest.$ac_ext
12036cat >>conftest.$ac_ext <<_ACEOF
12037/* end confdefs.h. */
12038$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012039 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012040int
12041main ()
12042{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012043static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044test_array [0] = 0
12045
12046 ;
12047 return 0;
12048}
12049_ACEOF
12050rm -f conftest.$ac_objext
12051if { (ac_try="$ac_compile"
12052case "(($ac_try" in
12053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12054 *) ac_try_echo=$ac_try;;
12055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012057 (eval "$ac_compile") 2>conftest.er1
12058 ac_status=$?
12059 grep -v '^ *+' conftest.er1 >conftest.err
12060 rm -f conftest.er1
12061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012063 (exit $ac_status); } && {
12064 test -z "$ac_c_werror_flag" ||
12065 test ! -s conftest.err
12066 } && test -s conftest.$ac_objext; then
12067 ac_hi=$ac_mid
12068else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070sed 's/^/| /' conftest.$ac_ext >&5
12071
12072 ac_lo=`expr '(' $ac_mid ')' + 1`
12073fi
12074
12075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12076done
12077case $ac_lo in
12078?*) ac_cv_sizeof_long_double=$ac_lo;;
12079'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012080 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012081See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012082echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012083See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012084 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085 else
12086 ac_cv_sizeof_long_double=0
12087 fi ;;
12088esac
12089else
12090 cat >conftest.$ac_ext <<_ACEOF
12091/* confdefs.h. */
12092_ACEOF
12093cat confdefs.h >>conftest.$ac_ext
12094cat >>conftest.$ac_ext <<_ACEOF
12095/* end confdefs.h. */
12096$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012097 typedef long double ac__type_sizeof_;
12098static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12099static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012100#include <stdio.h>
12101#include <stdlib.h>
12102int
12103main ()
12104{
12105
12106 FILE *f = fopen ("conftest.val", "w");
12107 if (! f)
12108 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012109 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012110 {
12111 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012112 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012113 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012114 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012115 }
12116 else
12117 {
12118 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012119 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012120 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012121 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012122 }
12123 return ferror (f) || fclose (f) != 0;
12124
12125 ;
12126 return 0;
12127}
12128_ACEOF
12129rm -f conftest$ac_exeext
12130if { (ac_try="$ac_link"
12131case "(($ac_try" in
12132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12133 *) ac_try_echo=$ac_try;;
12134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012136 (eval "$ac_link") 2>&5
12137 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012139 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12140 { (case "(($ac_try" in
12141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12142 *) ac_try_echo=$ac_try;;
12143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012145 (eval "$ac_try") 2>&5
12146 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012148 (exit $ac_status); }; }; then
12149 ac_cv_sizeof_long_double=`cat conftest.val`
12150else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012151 echo "$as_me: program exited with status $ac_status" >&5
12152echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012153sed 's/^/| /' conftest.$ac_ext >&5
12154
12155( exit $ac_status )
12156if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012157 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012158See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012159echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012160See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012161 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012162 else
12163 ac_cv_sizeof_long_double=0
12164 fi
12165fi
12166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12167fi
12168rm -f conftest.val
12169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012170{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12171echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012172
12173
12174
12175cat >>confdefs.h <<_ACEOF
12176#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12177_ACEOF
12178
12179
12180fi
12181
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012182{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12183echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012184have_c99_bool=no
12185cat >conftest.$ac_ext <<_ACEOF
12186/* confdefs.h. */
12187_ACEOF
12188cat confdefs.h >>conftest.$ac_ext
12189cat >>conftest.$ac_ext <<_ACEOF
12190/* end confdefs.h. */
12191
12192int
12193main ()
12194{
12195_Bool x; x = (_Bool)0;
12196 ;
12197 return 0;
12198}
12199_ACEOF
12200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012201if { (ac_try="$ac_compile"
12202case "(($ac_try" in
12203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12204 *) ac_try_echo=$ac_try;;
12205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208 ac_status=$?
12209 grep -v '^ *+' conftest.er1 >conftest.err
12210 rm -f conftest.er1
12211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213 (exit $ac_status); } && {
12214 test -z "$ac_c_werror_flag" ||
12215 test ! -s conftest.err
12216 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012217
12218
12219cat >>confdefs.h <<\_ACEOF
12220#define HAVE_C99_BOOL 1
12221_ACEOF
12222
12223 have_c99_bool=yes
12224
12225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012226 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012227sed 's/^/| /' conftest.$ac_ext >&5
12228
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231
12232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012233{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12234echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012235if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012236{ echo "$as_me:$LINENO: checking for _Bool" >&5
12237echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12238if test "${ac_cv_type__Bool+set}" = set; then
12239 echo $ECHO_N "(cached) $ECHO_C" >&6
12240else
12241 cat >conftest.$ac_ext <<_ACEOF
12242/* confdefs.h. */
12243_ACEOF
12244cat confdefs.h >>conftest.$ac_ext
12245cat >>conftest.$ac_ext <<_ACEOF
12246/* end confdefs.h. */
12247$ac_includes_default
12248typedef _Bool ac__type_new_;
12249int
12250main ()
12251{
12252if ((ac__type_new_ *) 0)
12253 return 0;
12254if (sizeof (ac__type_new_))
12255 return 0;
12256 ;
12257 return 0;
12258}
12259_ACEOF
12260rm -f conftest.$ac_objext
12261if { (ac_try="$ac_compile"
12262case "(($ac_try" in
12263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12264 *) ac_try_echo=$ac_try;;
12265esac
12266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12267 (eval "$ac_compile") 2>conftest.er1
12268 ac_status=$?
12269 grep -v '^ *+' conftest.er1 >conftest.err
12270 rm -f conftest.er1
12271 cat conftest.err >&5
12272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12273 (exit $ac_status); } && {
12274 test -z "$ac_c_werror_flag" ||
12275 test ! -s conftest.err
12276 } && test -s conftest.$ac_objext; then
12277 ac_cv_type__Bool=yes
12278else
12279 echo "$as_me: failed program was:" >&5
12280sed 's/^/| /' conftest.$ac_ext >&5
12281
12282 ac_cv_type__Bool=no
12283fi
12284
12285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12286fi
12287{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12288echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12289
Martin v. Löwiseba40652007-08-30 20:10:57 +000012290# The cast to long int works around a bug in the HP C Compiler
12291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12293# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012294{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12295echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012296if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012298else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299 if test "$cross_compiling" = yes; then
12300 # Depending upon the size, compute the lo and hi bounds.
12301cat >conftest.$ac_ext <<_ACEOF
12302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
12307$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012308 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012309int
12310main ()
12311{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012313test_array [0] = 0
12314
12315 ;
12316 return 0;
12317}
12318_ACEOF
12319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320if { (ac_try="$ac_compile"
12321case "(($ac_try" in
12322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12323 *) ac_try_echo=$ac_try;;
12324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012327 ac_status=$?
12328 grep -v '^ *+' conftest.er1 >conftest.err
12329 rm -f conftest.er1
12330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332 (exit $ac_status); } && {
12333 test -z "$ac_c_werror_flag" ||
12334 test ! -s conftest.err
12335 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012336 ac_lo=0 ac_mid=0
12337 while :; do
12338 cat >conftest.$ac_ext <<_ACEOF
12339/* confdefs.h. */
12340_ACEOF
12341cat confdefs.h >>conftest.$ac_ext
12342cat >>conftest.$ac_ext <<_ACEOF
12343/* end confdefs.h. */
12344$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012345 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012346int
12347main ()
12348{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350test_array [0] = 0
12351
12352 ;
12353 return 0;
12354}
12355_ACEOF
12356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357if { (ac_try="$ac_compile"
12358case "(($ac_try" in
12359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12360 *) ac_try_echo=$ac_try;;
12361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012364 ac_status=$?
12365 grep -v '^ *+' conftest.er1 >conftest.err
12366 rm -f conftest.er1
12367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012369 (exit $ac_status); } && {
12370 test -z "$ac_c_werror_flag" ||
12371 test ! -s conftest.err
12372 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012373 ac_hi=$ac_mid; break
12374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012375 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012376sed 's/^/| /' conftest.$ac_ext >&5
12377
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378 ac_lo=`expr $ac_mid + 1`
12379 if test $ac_lo -le $ac_mid; then
12380 ac_lo= ac_hi=
12381 break
12382 fi
12383 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385
12386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012387 done
12388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012389 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012390sed 's/^/| /' conftest.$ac_ext >&5
12391
Martin v. Löwiseba40652007-08-30 20:10:57 +000012392 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012393/* confdefs.h. */
12394_ACEOF
12395cat confdefs.h >>conftest.$ac_ext
12396cat >>conftest.$ac_ext <<_ACEOF
12397/* end confdefs.h. */
12398$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012399 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400int
12401main ()
12402{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404test_array [0] = 0
12405
12406 ;
12407 return 0;
12408}
12409_ACEOF
12410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012411if { (ac_try="$ac_compile"
12412case "(($ac_try" in
12413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12414 *) ac_try_echo=$ac_try;;
12415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012418 ac_status=$?
12419 grep -v '^ *+' conftest.er1 >conftest.err
12420 rm -f conftest.er1
12421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423 (exit $ac_status); } && {
12424 test -z "$ac_c_werror_flag" ||
12425 test ! -s conftest.err
12426 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427 ac_hi=-1 ac_mid=-1
12428 while :; do
12429 cat >conftest.$ac_ext <<_ACEOF
12430/* confdefs.h. */
12431_ACEOF
12432cat confdefs.h >>conftest.$ac_ext
12433cat >>conftest.$ac_ext <<_ACEOF
12434/* end confdefs.h. */
12435$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012436 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012437int
12438main ()
12439{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441test_array [0] = 0
12442
12443 ;
12444 return 0;
12445}
12446_ACEOF
12447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448if { (ac_try="$ac_compile"
12449case "(($ac_try" in
12450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12451 *) ac_try_echo=$ac_try;;
12452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012455 ac_status=$?
12456 grep -v '^ *+' conftest.er1 >conftest.err
12457 rm -f conftest.er1
12458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 (exit $ac_status); } && {
12461 test -z "$ac_c_werror_flag" ||
12462 test ! -s conftest.err
12463 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464 ac_lo=$ac_mid; break
12465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012466 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012467sed 's/^/| /' conftest.$ac_ext >&5
12468
Martin v. Löwiseba40652007-08-30 20:10:57 +000012469 ac_hi=`expr '(' $ac_mid ')' - 1`
12470 if test $ac_mid -le $ac_hi; then
12471 ac_lo= ac_hi=
12472 break
12473 fi
12474 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012476
12477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012478 done
12479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012480 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481sed 's/^/| /' conftest.$ac_ext >&5
12482
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485
12486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488
12489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490# Binary search between lo and hi bounds.
12491while test "x$ac_lo" != "x$ac_hi"; do
12492 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12493 cat >conftest.$ac_ext <<_ACEOF
12494/* confdefs.h. */
12495_ACEOF
12496cat confdefs.h >>conftest.$ac_ext
12497cat >>conftest.$ac_ext <<_ACEOF
12498/* end confdefs.h. */
12499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012500 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012501int
12502main ()
12503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012505test_array [0] = 0
12506
12507 ;
12508 return 0;
12509}
12510_ACEOF
12511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512if { (ac_try="$ac_compile"
12513case "(($ac_try" in
12514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12515 *) ac_try_echo=$ac_try;;
12516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012519 ac_status=$?
12520 grep -v '^ *+' conftest.er1 >conftest.err
12521 rm -f conftest.er1
12522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012524 (exit $ac_status); } && {
12525 test -z "$ac_c_werror_flag" ||
12526 test ! -s conftest.err
12527 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012528 ac_hi=$ac_mid
12529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012531sed 's/^/| /' conftest.$ac_ext >&5
12532
Martin v. Löwiseba40652007-08-30 20:10:57 +000012533 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535
12536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012537done
12538case $ac_lo in
12539?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012541 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012542See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012543echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546 else
12547 ac_cv_sizeof__Bool=0
12548 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012549esac
12550else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012551 cat >conftest.$ac_ext <<_ACEOF
12552/* confdefs.h. */
12553_ACEOF
12554cat confdefs.h >>conftest.$ac_ext
12555cat >>conftest.$ac_ext <<_ACEOF
12556/* end confdefs.h. */
12557$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012558 typedef _Bool ac__type_sizeof_;
12559static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12560static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012561#include <stdio.h>
12562#include <stdlib.h>
12563int
12564main ()
12565{
12566
12567 FILE *f = fopen ("conftest.val", "w");
12568 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012571 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012572 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012575 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012576 }
12577 else
12578 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012579 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012580 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012582 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012583 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012584 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012585
12586 ;
12587 return 0;
12588}
12589_ACEOF
12590rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591if { (ac_try="$ac_link"
12592case "(($ac_try" in
12593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12594 *) ac_try_echo=$ac_try;;
12595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012598 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012601 { (case "(($ac_try" in
12602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12603 *) ac_try_echo=$ac_try;;
12604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012607 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012609 (exit $ac_status); }; }; then
12610 ac_cv_sizeof__Bool=`cat conftest.val`
12611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012612 echo "$as_me: program exited with status $ac_status" >&5
12613echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012614sed 's/^/| /' conftest.$ac_ext >&5
12615
12616( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012618 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012619See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012620echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012621See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012622 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623 else
12624 ac_cv_sizeof__Bool=0
12625 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012627rm -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 +000012628fi
12629rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012630fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012631{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12632echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012633
12634
12635
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012636cat >>confdefs.h <<_ACEOF
12637#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12638_ACEOF
12639
12640
12641fi
12642
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012643{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12644echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012645if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012646 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012647else
12648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* confdefs.h. */
12650_ACEOF
12651cat confdefs.h >>conftest.$ac_ext
12652cat >>conftest.$ac_ext <<_ACEOF
12653/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012654#ifdef HAVE_STDINT_H
12655 #include <stdint.h>
12656 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012657
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012658typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012659int
12660main ()
12661{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662if ((ac__type_new_ *) 0)
12663 return 0;
12664if (sizeof (ac__type_new_))
12665 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 ;
12667 return 0;
12668}
12669_ACEOF
12670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671if { (ac_try="$ac_compile"
12672case "(($ac_try" in
12673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12674 *) ac_try_echo=$ac_try;;
12675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012679 grep -v '^ *+' conftest.er1 >conftest.err
12680 rm -f conftest.er1
12681 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012683 (exit $ac_status); } && {
12684 test -z "$ac_c_werror_flag" ||
12685 test ! -s conftest.err
12686 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012687 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012690sed 's/^/| /' conftest.$ac_ext >&5
12691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012692 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012694
12695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012696fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012697{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12698echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12699if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012700
12701cat >>confdefs.h <<_ACEOF
12702#define HAVE_UINTPTR_T 1
12703_ACEOF
12704
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012705{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12706echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12707if test "${ac_cv_type_uintptr_t+set}" = set; then
12708 echo $ECHO_N "(cached) $ECHO_C" >&6
12709else
12710 cat >conftest.$ac_ext <<_ACEOF
12711/* confdefs.h. */
12712_ACEOF
12713cat confdefs.h >>conftest.$ac_ext
12714cat >>conftest.$ac_ext <<_ACEOF
12715/* end confdefs.h. */
12716$ac_includes_default
12717typedef uintptr_t ac__type_new_;
12718int
12719main ()
12720{
12721if ((ac__type_new_ *) 0)
12722 return 0;
12723if (sizeof (ac__type_new_))
12724 return 0;
12725 ;
12726 return 0;
12727}
12728_ACEOF
12729rm -f conftest.$ac_objext
12730if { (ac_try="$ac_compile"
12731case "(($ac_try" in
12732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12733 *) ac_try_echo=$ac_try;;
12734esac
12735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12736 (eval "$ac_compile") 2>conftest.er1
12737 ac_status=$?
12738 grep -v '^ *+' conftest.er1 >conftest.err
12739 rm -f conftest.er1
12740 cat conftest.err >&5
12741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12742 (exit $ac_status); } && {
12743 test -z "$ac_c_werror_flag" ||
12744 test ! -s conftest.err
12745 } && test -s conftest.$ac_objext; then
12746 ac_cv_type_uintptr_t=yes
12747else
12748 echo "$as_me: failed program was:" >&5
12749sed 's/^/| /' conftest.$ac_ext >&5
12750
12751 ac_cv_type_uintptr_t=no
12752fi
12753
12754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12755fi
12756{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12757echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12758
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759# The cast to long int works around a bug in the HP C Compiler
12760# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12761# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12762# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012763{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12764echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012765if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012766 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012767else
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 if test "$cross_compiling" = yes; then
12769 # Depending upon the size, compute the lo and hi bounds.
12770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012776$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012777 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012782test_array [0] = 0
12783
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789if { (ac_try="$ac_compile"
12790case "(($ac_try" in
12791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12792 *) ac_try_echo=$ac_try;;
12793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012797 grep -v '^ *+' conftest.er1 >conftest.err
12798 rm -f conftest.er1
12799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012801 (exit $ac_status); } && {
12802 test -z "$ac_c_werror_flag" ||
12803 test ! -s conftest.err
12804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_lo=0 ac_mid=0
12806 while :; do
12807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* confdefs.h. */
12809_ACEOF
12810cat confdefs.h >>conftest.$ac_ext
12811cat >>conftest.$ac_ext <<_ACEOF
12812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012813$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012814 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012815int
12816main ()
12817{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012819test_array [0] = 0
12820
12821 ;
12822 return 0;
12823}
12824_ACEOF
12825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826if { (ac_try="$ac_compile"
12827case "(($ac_try" in
12828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12829 *) ac_try_echo=$ac_try;;
12830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012834 grep -v '^ *+' conftest.er1 >conftest.err
12835 rm -f conftest.er1
12836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012838 (exit $ac_status); } && {
12839 test -z "$ac_c_werror_flag" ||
12840 test ! -s conftest.err
12841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 ac_hi=$ac_mid; break
12843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012845sed 's/^/| /' conftest.$ac_ext >&5
12846
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847 ac_lo=`expr $ac_mid + 1`
12848 if test $ac_lo -le $ac_mid; then
12849 ac_lo= ac_hi=
12850 break
12851 fi
12852 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012854
12855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 done
12857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012859sed 's/^/| /' conftest.$ac_ext >&5
12860
Martin v. Löwiseba40652007-08-30 20:10:57 +000012861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012862/* confdefs.h. */
12863_ACEOF
12864cat confdefs.h >>conftest.$ac_ext
12865cat >>conftest.$ac_ext <<_ACEOF
12866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012868 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012869int
12870main ()
12871{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012873test_array [0] = 0
12874
12875 ;
12876 return 0;
12877}
12878_ACEOF
12879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880if { (ac_try="$ac_compile"
12881case "(($ac_try" in
12882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12883 *) ac_try_echo=$ac_try;;
12884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012888 grep -v '^ *+' conftest.er1 >conftest.err
12889 rm -f conftest.er1
12890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012892 (exit $ac_status); } && {
12893 test -z "$ac_c_werror_flag" ||
12894 test ! -s conftest.err
12895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_hi=-1 ac_mid=-1
12897 while :; do
12898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012899/* confdefs.h. */
12900_ACEOF
12901cat confdefs.h >>conftest.$ac_ext
12902cat >>conftest.$ac_ext <<_ACEOF
12903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012905 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012906int
12907main ()
12908{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012910test_array [0] = 0
12911
12912 ;
12913 return 0;
12914}
12915_ACEOF
12916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917if { (ac_try="$ac_compile"
12918case "(($ac_try" in
12919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12920 *) ac_try_echo=$ac_try;;
12921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012925 grep -v '^ *+' conftest.er1 >conftest.err
12926 rm -f conftest.er1
12927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929 (exit $ac_status); } && {
12930 test -z "$ac_c_werror_flag" ||
12931 test ! -s conftest.err
12932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 ac_lo=$ac_mid; break
12934else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012936sed 's/^/| /' conftest.$ac_ext >&5
12937
Martin v. Löwiseba40652007-08-30 20:10:57 +000012938 ac_hi=`expr '(' $ac_mid ')' - 1`
12939 if test $ac_mid -le $ac_hi; then
12940 ac_lo= ac_hi=
12941 break
12942 fi
12943 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012945
12946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 done
12948else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012950sed 's/^/| /' conftest.$ac_ext >&5
12951
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954
12955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957
12958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012959# Binary search between lo and hi bounds.
12960while test "x$ac_lo" != "x$ac_hi"; do
12961 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* confdefs.h. */
12964_ACEOF
12965cat confdefs.h >>conftest.$ac_ext
12966cat >>conftest.$ac_ext <<_ACEOF
12967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012968$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012969 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012970int
12971main ()
12972{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012973static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012974test_array [0] = 0
12975
12976 ;
12977 return 0;
12978}
12979_ACEOF
12980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981if { (ac_try="$ac_compile"
12982case "(($ac_try" in
12983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12984 *) ac_try_echo=$ac_try;;
12985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012989 grep -v '^ *+' conftest.er1 >conftest.err
12990 rm -f conftest.er1
12991 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993 (exit $ac_status); } && {
12994 test -z "$ac_c_werror_flag" ||
12995 test ! -s conftest.err
12996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ac_hi=$ac_mid
12998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013000sed 's/^/| /' conftest.$ac_ext >&5
13001
Martin v. Löwiseba40652007-08-30 20:10:57 +000013002 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004
13005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013006done
13007case $ac_lo in
13008?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013010 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013011See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013012echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013013See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013014 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015 else
13016 ac_cv_sizeof_uintptr_t=0
13017 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013018esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019else
Martin v. Löwis11437992002-04-12 09:54:03 +000013020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013021/* confdefs.h. */
13022_ACEOF
13023cat confdefs.h >>conftest.$ac_ext
13024cat >>conftest.$ac_ext <<_ACEOF
13025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013026$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013027 typedef uintptr_t ac__type_sizeof_;
13028static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13029static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013030#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013031#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013032int
13033main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013034{
Martin v. Löwis11437992002-04-12 09:54:03 +000013035
13036 FILE *f = fopen ("conftest.val", "w");
13037 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013038 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013039 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013041 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013042 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013044 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 }
13046 else
13047 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013048 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013049 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013050 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013051 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013053 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013054
13055 ;
13056 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013057}
Martin v. Löwis11437992002-04-12 09:54:03 +000013058_ACEOF
13059rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060if { (ac_try="$ac_link"
13061case "(($ac_try" in
13062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13063 *) ac_try_echo=$ac_try;;
13064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013067 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070 { (case "(($ac_try" in
13071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13072 *) ac_try_echo=$ac_try;;
13073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 (exit $ac_status); }; }; then
13079 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013081 echo "$as_me: program exited with status $ac_status" >&5
13082echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013083sed 's/^/| /' conftest.$ac_ext >&5
13084
Martin v. Löwis11437992002-04-12 09:54:03 +000013085( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013087 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013088See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013089echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013090See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013091 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013092 else
13093 ac_cv_sizeof_uintptr_t=0
13094 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096rm -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 +000013097fi
13098rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013099fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013100{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13101echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013102
13103
13104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013106#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013107_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013108
Michael W. Hudson54241132001-12-07 15:38:26 +000013109
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013110fi
13111
Martin v. Löwisebe26702006-10-02 14:55:51 +000013112
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013113{ echo "$as_me:$LINENO: checking for off_t" >&5
13114echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13115if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013117else
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013119/* confdefs.h. */
13120_ACEOF
13121cat confdefs.h >>conftest.$ac_ext
13122cat >>conftest.$ac_ext <<_ACEOF
13123/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013124
13125#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013126#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013127#endif
13128
13129
13130typedef off_t ac__type_new_;
13131int
13132main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013133{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013134if ((ac__type_new_ *) 0)
13135 return 0;
13136if (sizeof (ac__type_new_))
13137 return 0;
13138 ;
13139 return 0;
13140}
13141_ACEOF
13142rm -f conftest.$ac_objext
13143if { (ac_try="$ac_compile"
13144case "(($ac_try" in
13145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13146 *) ac_try_echo=$ac_try;;
13147esac
13148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13149 (eval "$ac_compile") 2>conftest.er1
13150 ac_status=$?
13151 grep -v '^ *+' conftest.er1 >conftest.err
13152 rm -f conftest.er1
13153 cat conftest.err >&5
13154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155 (exit $ac_status); } && {
13156 test -z "$ac_c_werror_flag" ||
13157 test ! -s conftest.err
13158 } && test -s conftest.$ac_objext; then
13159 ac_cv_type_off_t=yes
13160else
13161 echo "$as_me: failed program was:" >&5
13162sed 's/^/| /' conftest.$ac_ext >&5
13163
13164 ac_cv_type_off_t=no
13165fi
13166
13167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13168fi
13169{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13170echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13171
13172# The cast to long int works around a bug in the HP C Compiler
13173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13175# This bug is HP SR number 8606223364.
13176{ echo "$as_me:$LINENO: checking size of off_t" >&5
13177echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13178if test "${ac_cv_sizeof_off_t+set}" = set; then
13179 echo $ECHO_N "(cached) $ECHO_C" >&6
13180else
13181 if test "$cross_compiling" = yes; then
13182 # Depending upon the size, compute the lo and hi bounds.
13183cat >conftest.$ac_ext <<_ACEOF
13184/* confdefs.h. */
13185_ACEOF
13186cat confdefs.h >>conftest.$ac_ext
13187cat >>conftest.$ac_ext <<_ACEOF
13188/* end confdefs.h. */
13189
13190#ifdef HAVE_SYS_TYPES_H
13191#include <sys/types.h>
13192#endif
13193
13194
13195 typedef off_t ac__type_sizeof_;
13196int
13197main ()
13198{
13199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13200test_array [0] = 0
13201
13202 ;
13203 return 0;
13204}
13205_ACEOF
13206rm -f conftest.$ac_objext
13207if { (ac_try="$ac_compile"
13208case "(($ac_try" in
13209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13210 *) ac_try_echo=$ac_try;;
13211esac
13212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13213 (eval "$ac_compile") 2>conftest.er1
13214 ac_status=$?
13215 grep -v '^ *+' conftest.er1 >conftest.err
13216 rm -f conftest.er1
13217 cat conftest.err >&5
13218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219 (exit $ac_status); } && {
13220 test -z "$ac_c_werror_flag" ||
13221 test ! -s conftest.err
13222 } && test -s conftest.$ac_objext; then
13223 ac_lo=0 ac_mid=0
13224 while :; do
13225 cat >conftest.$ac_ext <<_ACEOF
13226/* confdefs.h. */
13227_ACEOF
13228cat confdefs.h >>conftest.$ac_ext
13229cat >>conftest.$ac_ext <<_ACEOF
13230/* end confdefs.h. */
13231
13232#ifdef HAVE_SYS_TYPES_H
13233#include <sys/types.h>
13234#endif
13235
13236
13237 typedef off_t ac__type_sizeof_;
13238int
13239main ()
13240{
13241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13242test_array [0] = 0
13243
13244 ;
13245 return 0;
13246}
13247_ACEOF
13248rm -f conftest.$ac_objext
13249if { (ac_try="$ac_compile"
13250case "(($ac_try" in
13251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13252 *) ac_try_echo=$ac_try;;
13253esac
13254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13255 (eval "$ac_compile") 2>conftest.er1
13256 ac_status=$?
13257 grep -v '^ *+' conftest.er1 >conftest.err
13258 rm -f conftest.er1
13259 cat conftest.err >&5
13260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13261 (exit $ac_status); } && {
13262 test -z "$ac_c_werror_flag" ||
13263 test ! -s conftest.err
13264 } && test -s conftest.$ac_objext; then
13265 ac_hi=$ac_mid; break
13266else
13267 echo "$as_me: failed program was:" >&5
13268sed 's/^/| /' conftest.$ac_ext >&5
13269
13270 ac_lo=`expr $ac_mid + 1`
13271 if test $ac_lo -le $ac_mid; then
13272 ac_lo= ac_hi=
13273 break
13274 fi
13275 ac_mid=`expr 2 '*' $ac_mid + 1`
13276fi
13277
13278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13279 done
13280else
13281 echo "$as_me: failed program was:" >&5
13282sed 's/^/| /' conftest.$ac_ext >&5
13283
13284 cat >conftest.$ac_ext <<_ACEOF
13285/* confdefs.h. */
13286_ACEOF
13287cat confdefs.h >>conftest.$ac_ext
13288cat >>conftest.$ac_ext <<_ACEOF
13289/* end confdefs.h. */
13290
13291#ifdef HAVE_SYS_TYPES_H
13292#include <sys/types.h>
13293#endif
13294
13295
13296 typedef off_t ac__type_sizeof_;
13297int
13298main ()
13299{
13300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13301test_array [0] = 0
13302
13303 ;
13304 return 0;
13305}
13306_ACEOF
13307rm -f conftest.$ac_objext
13308if { (ac_try="$ac_compile"
13309case "(($ac_try" in
13310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13311 *) ac_try_echo=$ac_try;;
13312esac
13313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13314 (eval "$ac_compile") 2>conftest.er1
13315 ac_status=$?
13316 grep -v '^ *+' conftest.er1 >conftest.err
13317 rm -f conftest.er1
13318 cat conftest.err >&5
13319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320 (exit $ac_status); } && {
13321 test -z "$ac_c_werror_flag" ||
13322 test ! -s conftest.err
13323 } && test -s conftest.$ac_objext; then
13324 ac_hi=-1 ac_mid=-1
13325 while :; do
13326 cat >conftest.$ac_ext <<_ACEOF
13327/* confdefs.h. */
13328_ACEOF
13329cat confdefs.h >>conftest.$ac_ext
13330cat >>conftest.$ac_ext <<_ACEOF
13331/* end confdefs.h. */
13332
13333#ifdef HAVE_SYS_TYPES_H
13334#include <sys/types.h>
13335#endif
13336
13337
13338 typedef off_t ac__type_sizeof_;
13339int
13340main ()
13341{
13342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13343test_array [0] = 0
13344
13345 ;
13346 return 0;
13347}
13348_ACEOF
13349rm -f conftest.$ac_objext
13350if { (ac_try="$ac_compile"
13351case "(($ac_try" in
13352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13353 *) ac_try_echo=$ac_try;;
13354esac
13355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13356 (eval "$ac_compile") 2>conftest.er1
13357 ac_status=$?
13358 grep -v '^ *+' conftest.er1 >conftest.err
13359 rm -f conftest.er1
13360 cat conftest.err >&5
13361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13362 (exit $ac_status); } && {
13363 test -z "$ac_c_werror_flag" ||
13364 test ! -s conftest.err
13365 } && test -s conftest.$ac_objext; then
13366 ac_lo=$ac_mid; break
13367else
13368 echo "$as_me: failed program was:" >&5
13369sed 's/^/| /' conftest.$ac_ext >&5
13370
13371 ac_hi=`expr '(' $ac_mid ')' - 1`
13372 if test $ac_mid -le $ac_hi; then
13373 ac_lo= ac_hi=
13374 break
13375 fi
13376 ac_mid=`expr 2 '*' $ac_mid`
13377fi
13378
13379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13380 done
13381else
13382 echo "$as_me: failed program was:" >&5
13383sed 's/^/| /' conftest.$ac_ext >&5
13384
13385 ac_lo= ac_hi=
13386fi
13387
13388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13389fi
13390
13391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13392# Binary search between lo and hi bounds.
13393while test "x$ac_lo" != "x$ac_hi"; do
13394 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13395 cat >conftest.$ac_ext <<_ACEOF
13396/* confdefs.h. */
13397_ACEOF
13398cat confdefs.h >>conftest.$ac_ext
13399cat >>conftest.$ac_ext <<_ACEOF
13400/* end confdefs.h. */
13401
13402#ifdef HAVE_SYS_TYPES_H
13403#include <sys/types.h>
13404#endif
13405
13406
13407 typedef off_t ac__type_sizeof_;
13408int
13409main ()
13410{
13411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13412test_array [0] = 0
13413
13414 ;
13415 return 0;
13416}
13417_ACEOF
13418rm -f conftest.$ac_objext
13419if { (ac_try="$ac_compile"
13420case "(($ac_try" in
13421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13422 *) ac_try_echo=$ac_try;;
13423esac
13424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13425 (eval "$ac_compile") 2>conftest.er1
13426 ac_status=$?
13427 grep -v '^ *+' conftest.er1 >conftest.err
13428 rm -f conftest.er1
13429 cat conftest.err >&5
13430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13431 (exit $ac_status); } && {
13432 test -z "$ac_c_werror_flag" ||
13433 test ! -s conftest.err
13434 } && test -s conftest.$ac_objext; then
13435 ac_hi=$ac_mid
13436else
13437 echo "$as_me: failed program was:" >&5
13438sed 's/^/| /' conftest.$ac_ext >&5
13439
13440 ac_lo=`expr '(' $ac_mid ')' + 1`
13441fi
13442
13443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13444done
13445case $ac_lo in
13446?*) ac_cv_sizeof_off_t=$ac_lo;;
13447'') if test "$ac_cv_type_off_t" = yes; then
13448 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13449See \`config.log' for more details." >&5
13450echo "$as_me: error: cannot compute sizeof (off_t)
13451See \`config.log' for more details." >&2;}
13452 { (exit 77); exit 77; }; }
13453 else
13454 ac_cv_sizeof_off_t=0
13455 fi ;;
13456esac
13457else
13458 cat >conftest.$ac_ext <<_ACEOF
13459/* confdefs.h. */
13460_ACEOF
13461cat confdefs.h >>conftest.$ac_ext
13462cat >>conftest.$ac_ext <<_ACEOF
13463/* end confdefs.h. */
13464
13465#ifdef HAVE_SYS_TYPES_H
13466#include <sys/types.h>
13467#endif
13468
13469
13470 typedef off_t ac__type_sizeof_;
13471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13473#include <stdio.h>
13474#include <stdlib.h>
13475int
13476main ()
13477{
13478
13479 FILE *f = fopen ("conftest.val", "w");
13480 if (! f)
13481 return 1;
13482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13483 {
13484 long int i = longval ();
13485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13486 return 1;
13487 fprintf (f, "%ld\n", i);
13488 }
13489 else
13490 {
13491 unsigned long int i = ulongval ();
13492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13493 return 1;
13494 fprintf (f, "%lu\n", i);
13495 }
13496 return ferror (f) || fclose (f) != 0;
13497
13498 ;
13499 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013500}
Martin v. Löwis11437992002-04-12 09:54:03 +000013501_ACEOF
13502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503if { (ac_try="$ac_link"
13504case "(($ac_try" in
13505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13506 *) ac_try_echo=$ac_try;;
13507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013513 { (case "(($ac_try" in
13514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13515 *) ac_try_echo=$ac_try;;
13516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013522 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013524 echo "$as_me: program exited with status $ac_status" >&5
13525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013526sed 's/^/| /' conftest.$ac_ext >&5
13527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013529if test "$ac_cv_type_off_t" = yes; then
13530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13531See \`config.log' for more details." >&5
13532echo "$as_me: error: cannot compute sizeof (off_t)
13533See \`config.log' for more details." >&2;}
13534 { (exit 77); exit 77; }; }
13535 else
13536 ac_cv_sizeof_off_t=0
13537 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013539rm -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 +000013540fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013541rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13544echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013546
13547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013549#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013550_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013551
Michael W. Hudson54241132001-12-07 15:38:26 +000013552
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013553
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013554{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13555echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013556if test "$have_long_long" = yes
13557then
13558if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013559 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013560
Martin v. Löwis11437992002-04-12 09:54:03 +000013561cat >>confdefs.h <<\_ACEOF
13562#define HAVE_LARGEFILE_SUPPORT 1
13563_ACEOF
13564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013565 { echo "$as_me:$LINENO: result: yes" >&5
13566echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013568 { echo "$as_me:$LINENO: result: no" >&5
13569echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013570fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013571else
13572 { echo "$as_me:$LINENO: result: no" >&5
13573echo "${ECHO_T}no" >&6; }
13574fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013575
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013576{ echo "$as_me:$LINENO: checking for time_t" >&5
13577echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13578if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013582/* confdefs.h. */
13583_ACEOF
13584cat confdefs.h >>conftest.$ac_ext
13585cat >>conftest.$ac_ext <<_ACEOF
13586/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013587
13588#ifdef HAVE_SYS_TYPES_H
13589#include <sys/types.h>
13590#endif
13591#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013592#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013593#endif
13594
13595
13596typedef time_t ac__type_new_;
13597int
13598main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013599{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013600if ((ac__type_new_ *) 0)
13601 return 0;
13602if (sizeof (ac__type_new_))
13603 return 0;
13604 ;
13605 return 0;
13606}
13607_ACEOF
13608rm -f conftest.$ac_objext
13609if { (ac_try="$ac_compile"
13610case "(($ac_try" in
13611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13612 *) ac_try_echo=$ac_try;;
13613esac
13614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13615 (eval "$ac_compile") 2>conftest.er1
13616 ac_status=$?
13617 grep -v '^ *+' conftest.er1 >conftest.err
13618 rm -f conftest.er1
13619 cat conftest.err >&5
13620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13621 (exit $ac_status); } && {
13622 test -z "$ac_c_werror_flag" ||
13623 test ! -s conftest.err
13624 } && test -s conftest.$ac_objext; then
13625 ac_cv_type_time_t=yes
13626else
13627 echo "$as_me: failed program was:" >&5
13628sed 's/^/| /' conftest.$ac_ext >&5
13629
13630 ac_cv_type_time_t=no
13631fi
13632
13633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13634fi
13635{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13636echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13637
13638# The cast to long int works around a bug in the HP C Compiler
13639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13641# This bug is HP SR number 8606223364.
13642{ echo "$as_me:$LINENO: checking size of time_t" >&5
13643echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13644if test "${ac_cv_sizeof_time_t+set}" = set; then
13645 echo $ECHO_N "(cached) $ECHO_C" >&6
13646else
13647 if test "$cross_compiling" = yes; then
13648 # Depending upon the size, compute the lo and hi bounds.
13649cat >conftest.$ac_ext <<_ACEOF
13650/* confdefs.h. */
13651_ACEOF
13652cat confdefs.h >>conftest.$ac_ext
13653cat >>conftest.$ac_ext <<_ACEOF
13654/* end confdefs.h. */
13655
13656#ifdef HAVE_SYS_TYPES_H
13657#include <sys/types.h>
13658#endif
13659#ifdef HAVE_TIME_H
13660#include <time.h>
13661#endif
13662
13663
13664 typedef time_t ac__type_sizeof_;
13665int
13666main ()
13667{
13668static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13669test_array [0] = 0
13670
13671 ;
13672 return 0;
13673}
13674_ACEOF
13675rm -f conftest.$ac_objext
13676if { (ac_try="$ac_compile"
13677case "(($ac_try" in
13678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13679 *) ac_try_echo=$ac_try;;
13680esac
13681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13682 (eval "$ac_compile") 2>conftest.er1
13683 ac_status=$?
13684 grep -v '^ *+' conftest.er1 >conftest.err
13685 rm -f conftest.er1
13686 cat conftest.err >&5
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); } && {
13689 test -z "$ac_c_werror_flag" ||
13690 test ! -s conftest.err
13691 } && test -s conftest.$ac_objext; then
13692 ac_lo=0 ac_mid=0
13693 while :; do
13694 cat >conftest.$ac_ext <<_ACEOF
13695/* confdefs.h. */
13696_ACEOF
13697cat confdefs.h >>conftest.$ac_ext
13698cat >>conftest.$ac_ext <<_ACEOF
13699/* end confdefs.h. */
13700
13701#ifdef HAVE_SYS_TYPES_H
13702#include <sys/types.h>
13703#endif
13704#ifdef HAVE_TIME_H
13705#include <time.h>
13706#endif
13707
13708
13709 typedef time_t ac__type_sizeof_;
13710int
13711main ()
13712{
13713static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13714test_array [0] = 0
13715
13716 ;
13717 return 0;
13718}
13719_ACEOF
13720rm -f conftest.$ac_objext
13721if { (ac_try="$ac_compile"
13722case "(($ac_try" in
13723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13724 *) ac_try_echo=$ac_try;;
13725esac
13726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13727 (eval "$ac_compile") 2>conftest.er1
13728 ac_status=$?
13729 grep -v '^ *+' conftest.er1 >conftest.err
13730 rm -f conftest.er1
13731 cat conftest.err >&5
13732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733 (exit $ac_status); } && {
13734 test -z "$ac_c_werror_flag" ||
13735 test ! -s conftest.err
13736 } && test -s conftest.$ac_objext; then
13737 ac_hi=$ac_mid; break
13738else
13739 echo "$as_me: failed program was:" >&5
13740sed 's/^/| /' conftest.$ac_ext >&5
13741
13742 ac_lo=`expr $ac_mid + 1`
13743 if test $ac_lo -le $ac_mid; then
13744 ac_lo= ac_hi=
13745 break
13746 fi
13747 ac_mid=`expr 2 '*' $ac_mid + 1`
13748fi
13749
13750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13751 done
13752else
13753 echo "$as_me: failed program was:" >&5
13754sed 's/^/| /' conftest.$ac_ext >&5
13755
13756 cat >conftest.$ac_ext <<_ACEOF
13757/* confdefs.h. */
13758_ACEOF
13759cat confdefs.h >>conftest.$ac_ext
13760cat >>conftest.$ac_ext <<_ACEOF
13761/* end confdefs.h. */
13762
13763#ifdef HAVE_SYS_TYPES_H
13764#include <sys/types.h>
13765#endif
13766#ifdef HAVE_TIME_H
13767#include <time.h>
13768#endif
13769
13770
13771 typedef time_t ac__type_sizeof_;
13772int
13773main ()
13774{
13775static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13776test_array [0] = 0
13777
13778 ;
13779 return 0;
13780}
13781_ACEOF
13782rm -f conftest.$ac_objext
13783if { (ac_try="$ac_compile"
13784case "(($ac_try" in
13785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13786 *) ac_try_echo=$ac_try;;
13787esac
13788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13789 (eval "$ac_compile") 2>conftest.er1
13790 ac_status=$?
13791 grep -v '^ *+' conftest.er1 >conftest.err
13792 rm -f conftest.er1
13793 cat conftest.err >&5
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); } && {
13796 test -z "$ac_c_werror_flag" ||
13797 test ! -s conftest.err
13798 } && test -s conftest.$ac_objext; then
13799 ac_hi=-1 ac_mid=-1
13800 while :; do
13801 cat >conftest.$ac_ext <<_ACEOF
13802/* confdefs.h. */
13803_ACEOF
13804cat confdefs.h >>conftest.$ac_ext
13805cat >>conftest.$ac_ext <<_ACEOF
13806/* end confdefs.h. */
13807
13808#ifdef HAVE_SYS_TYPES_H
13809#include <sys/types.h>
13810#endif
13811#ifdef HAVE_TIME_H
13812#include <time.h>
13813#endif
13814
13815
13816 typedef time_t ac__type_sizeof_;
13817int
13818main ()
13819{
13820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13821test_array [0] = 0
13822
13823 ;
13824 return 0;
13825}
13826_ACEOF
13827rm -f conftest.$ac_objext
13828if { (ac_try="$ac_compile"
13829case "(($ac_try" in
13830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13831 *) ac_try_echo=$ac_try;;
13832esac
13833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13834 (eval "$ac_compile") 2>conftest.er1
13835 ac_status=$?
13836 grep -v '^ *+' conftest.er1 >conftest.err
13837 rm -f conftest.er1
13838 cat conftest.err >&5
13839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13840 (exit $ac_status); } && {
13841 test -z "$ac_c_werror_flag" ||
13842 test ! -s conftest.err
13843 } && test -s conftest.$ac_objext; then
13844 ac_lo=$ac_mid; break
13845else
13846 echo "$as_me: failed program was:" >&5
13847sed 's/^/| /' conftest.$ac_ext >&5
13848
13849 ac_hi=`expr '(' $ac_mid ')' - 1`
13850 if test $ac_mid -le $ac_hi; then
13851 ac_lo= ac_hi=
13852 break
13853 fi
13854 ac_mid=`expr 2 '*' $ac_mid`
13855fi
13856
13857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13858 done
13859else
13860 echo "$as_me: failed program was:" >&5
13861sed 's/^/| /' conftest.$ac_ext >&5
13862
13863 ac_lo= ac_hi=
13864fi
13865
13866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13867fi
13868
13869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13870# Binary search between lo and hi bounds.
13871while test "x$ac_lo" != "x$ac_hi"; do
13872 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13873 cat >conftest.$ac_ext <<_ACEOF
13874/* confdefs.h. */
13875_ACEOF
13876cat confdefs.h >>conftest.$ac_ext
13877cat >>conftest.$ac_ext <<_ACEOF
13878/* end confdefs.h. */
13879
13880#ifdef HAVE_SYS_TYPES_H
13881#include <sys/types.h>
13882#endif
13883#ifdef HAVE_TIME_H
13884#include <time.h>
13885#endif
13886
13887
13888 typedef time_t ac__type_sizeof_;
13889int
13890main ()
13891{
13892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13893test_array [0] = 0
13894
13895 ;
13896 return 0;
13897}
13898_ACEOF
13899rm -f conftest.$ac_objext
13900if { (ac_try="$ac_compile"
13901case "(($ac_try" in
13902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13903 *) ac_try_echo=$ac_try;;
13904esac
13905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13906 (eval "$ac_compile") 2>conftest.er1
13907 ac_status=$?
13908 grep -v '^ *+' conftest.er1 >conftest.err
13909 rm -f conftest.er1
13910 cat conftest.err >&5
13911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13912 (exit $ac_status); } && {
13913 test -z "$ac_c_werror_flag" ||
13914 test ! -s conftest.err
13915 } && test -s conftest.$ac_objext; then
13916 ac_hi=$ac_mid
13917else
13918 echo "$as_me: failed program was:" >&5
13919sed 's/^/| /' conftest.$ac_ext >&5
13920
13921 ac_lo=`expr '(' $ac_mid ')' + 1`
13922fi
13923
13924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13925done
13926case $ac_lo in
13927?*) ac_cv_sizeof_time_t=$ac_lo;;
13928'') if test "$ac_cv_type_time_t" = yes; then
13929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13930See \`config.log' for more details." >&5
13931echo "$as_me: error: cannot compute sizeof (time_t)
13932See \`config.log' for more details." >&2;}
13933 { (exit 77); exit 77; }; }
13934 else
13935 ac_cv_sizeof_time_t=0
13936 fi ;;
13937esac
13938else
13939 cat >conftest.$ac_ext <<_ACEOF
13940/* confdefs.h. */
13941_ACEOF
13942cat confdefs.h >>conftest.$ac_ext
13943cat >>conftest.$ac_ext <<_ACEOF
13944/* end confdefs.h. */
13945
13946#ifdef HAVE_SYS_TYPES_H
13947#include <sys/types.h>
13948#endif
13949#ifdef HAVE_TIME_H
13950#include <time.h>
13951#endif
13952
13953
13954 typedef time_t ac__type_sizeof_;
13955static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13956static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13957#include <stdio.h>
13958#include <stdlib.h>
13959int
13960main ()
13961{
13962
13963 FILE *f = fopen ("conftest.val", "w");
13964 if (! f)
13965 return 1;
13966 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13967 {
13968 long int i = longval ();
13969 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13970 return 1;
13971 fprintf (f, "%ld\n", i);
13972 }
13973 else
13974 {
13975 unsigned long int i = ulongval ();
13976 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13977 return 1;
13978 fprintf (f, "%lu\n", i);
13979 }
13980 return ferror (f) || fclose (f) != 0;
13981
13982 ;
13983 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013984}
Martin v. Löwis11437992002-04-12 09:54:03 +000013985_ACEOF
13986rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987if { (ac_try="$ac_link"
13988case "(($ac_try" in
13989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13990 *) ac_try_echo=$ac_try;;
13991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 { (case "(($ac_try" in
13998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13999 *) ac_try_echo=$ac_try;;
14000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014003 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014006 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014007else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014008 echo "$as_me: program exited with status $ac_status" >&5
14009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014010sed 's/^/| /' conftest.$ac_ext >&5
14011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014013if test "$ac_cv_type_time_t" = yes; then
14014 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
14015See \`config.log' for more details." >&5
14016echo "$as_me: error: cannot compute sizeof (time_t)
14017See \`config.log' for more details." >&2;}
14018 { (exit 77); exit 77; }; }
14019 else
14020 ac_cv_sizeof_time_t=0
14021 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023rm -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 +000014024fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014025rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014026fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014027{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14028echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014030
14031
Martin v. Löwis11437992002-04-12 09:54:03 +000014032cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014033#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014034_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014035
Michael W. Hudson54241132001-12-07 15:38:26 +000014036
14037
Trent Mick635f6fb2000-08-23 21:33:05 +000014038# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014039ac_save_cc="$CC"
14040if test "$ac_cv_kpthread" = "yes"
14041then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014042elif test "$ac_cv_kthread" = "yes"
14043then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014044elif test "$ac_cv_pthread" = "yes"
14045then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014046fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014047{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14048echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014049have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014051/* confdefs.h. */
14052_ACEOF
14053cat confdefs.h >>conftest.$ac_ext
14054cat >>conftest.$ac_ext <<_ACEOF
14055/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014056#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014057int
14058main ()
14059{
Guido van Rossum12580492000-09-24 16:47:19 +000014060pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ;
14062 return 0;
14063}
14064_ACEOF
14065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066if { (ac_try="$ac_compile"
14067case "(($ac_try" in
14068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14069 *) ac_try_echo=$ac_try;;
14070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014074 grep -v '^ *+' conftest.er1 >conftest.err
14075 rm -f conftest.er1
14076 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078 (exit $ac_status); } && {
14079 test -z "$ac_c_werror_flag" ||
14080 test ! -s conftest.err
14081 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014082 have_pthread_t=yes
14083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014085sed 's/^/| /' conftest.$ac_ext >&5
14086
Martin v. Löwiseba40652007-08-30 20:10:57 +000014087
Trent Mick635f6fb2000-08-23 21:33:05 +000014088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014089
14090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014091{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14092echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014093if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014094 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14095echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14096if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014097 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014098else
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014100/* confdefs.h. */
14101_ACEOF
14102cat confdefs.h >>conftest.$ac_ext
14103cat >>conftest.$ac_ext <<_ACEOF
14104/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014105
14106#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014107#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014108#endif
14109
14110
14111typedef pthread_t ac__type_new_;
14112int
14113main ()
14114{
14115if ((ac__type_new_ *) 0)
14116 return 0;
14117if (sizeof (ac__type_new_))
14118 return 0;
14119 ;
14120 return 0;
14121}
14122_ACEOF
14123rm -f conftest.$ac_objext
14124if { (ac_try="$ac_compile"
14125case "(($ac_try" in
14126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14127 *) ac_try_echo=$ac_try;;
14128esac
14129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14130 (eval "$ac_compile") 2>conftest.er1
14131 ac_status=$?
14132 grep -v '^ *+' conftest.er1 >conftest.err
14133 rm -f conftest.er1
14134 cat conftest.err >&5
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); } && {
14137 test -z "$ac_c_werror_flag" ||
14138 test ! -s conftest.err
14139 } && test -s conftest.$ac_objext; then
14140 ac_cv_type_pthread_t=yes
14141else
14142 echo "$as_me: failed program was:" >&5
14143sed 's/^/| /' conftest.$ac_ext >&5
14144
14145 ac_cv_type_pthread_t=no
14146fi
14147
14148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14149fi
14150{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14151echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14152
14153# The cast to long int works around a bug in the HP C Compiler
14154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14156# This bug is HP SR number 8606223364.
14157{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14158echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14159if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14160 echo $ECHO_N "(cached) $ECHO_C" >&6
14161else
14162 if test "$cross_compiling" = yes; then
14163 # Depending upon the size, compute the lo and hi bounds.
14164cat >conftest.$ac_ext <<_ACEOF
14165/* confdefs.h. */
14166_ACEOF
14167cat confdefs.h >>conftest.$ac_ext
14168cat >>conftest.$ac_ext <<_ACEOF
14169/* end confdefs.h. */
14170
14171#ifdef HAVE_PTHREAD_H
14172#include <pthread.h>
14173#endif
14174
14175
14176 typedef pthread_t ac__type_sizeof_;
14177int
14178main ()
14179{
14180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14181test_array [0] = 0
14182
14183 ;
14184 return 0;
14185}
14186_ACEOF
14187rm -f conftest.$ac_objext
14188if { (ac_try="$ac_compile"
14189case "(($ac_try" in
14190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14191 *) ac_try_echo=$ac_try;;
14192esac
14193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14194 (eval "$ac_compile") 2>conftest.er1
14195 ac_status=$?
14196 grep -v '^ *+' conftest.er1 >conftest.err
14197 rm -f conftest.er1
14198 cat conftest.err >&5
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); } && {
14201 test -z "$ac_c_werror_flag" ||
14202 test ! -s conftest.err
14203 } && test -s conftest.$ac_objext; then
14204 ac_lo=0 ac_mid=0
14205 while :; do
14206 cat >conftest.$ac_ext <<_ACEOF
14207/* confdefs.h. */
14208_ACEOF
14209cat confdefs.h >>conftest.$ac_ext
14210cat >>conftest.$ac_ext <<_ACEOF
14211/* end confdefs.h. */
14212
14213#ifdef HAVE_PTHREAD_H
14214#include <pthread.h>
14215#endif
14216
14217
14218 typedef pthread_t ac__type_sizeof_;
14219int
14220main ()
14221{
14222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14223test_array [0] = 0
14224
14225 ;
14226 return 0;
14227}
14228_ACEOF
14229rm -f conftest.$ac_objext
14230if { (ac_try="$ac_compile"
14231case "(($ac_try" in
14232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14233 *) ac_try_echo=$ac_try;;
14234esac
14235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14236 (eval "$ac_compile") 2>conftest.er1
14237 ac_status=$?
14238 grep -v '^ *+' conftest.er1 >conftest.err
14239 rm -f conftest.er1
14240 cat conftest.err >&5
14241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242 (exit $ac_status); } && {
14243 test -z "$ac_c_werror_flag" ||
14244 test ! -s conftest.err
14245 } && test -s conftest.$ac_objext; then
14246 ac_hi=$ac_mid; break
14247else
14248 echo "$as_me: failed program was:" >&5
14249sed 's/^/| /' conftest.$ac_ext >&5
14250
14251 ac_lo=`expr $ac_mid + 1`
14252 if test $ac_lo -le $ac_mid; then
14253 ac_lo= ac_hi=
14254 break
14255 fi
14256 ac_mid=`expr 2 '*' $ac_mid + 1`
14257fi
14258
14259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260 done
14261else
14262 echo "$as_me: failed program was:" >&5
14263sed 's/^/| /' conftest.$ac_ext >&5
14264
14265 cat >conftest.$ac_ext <<_ACEOF
14266/* confdefs.h. */
14267_ACEOF
14268cat confdefs.h >>conftest.$ac_ext
14269cat >>conftest.$ac_ext <<_ACEOF
14270/* end confdefs.h. */
14271
14272#ifdef HAVE_PTHREAD_H
14273#include <pthread.h>
14274#endif
14275
14276
14277 typedef pthread_t ac__type_sizeof_;
14278int
14279main ()
14280{
14281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14282test_array [0] = 0
14283
14284 ;
14285 return 0;
14286}
14287_ACEOF
14288rm -f conftest.$ac_objext
14289if { (ac_try="$ac_compile"
14290case "(($ac_try" in
14291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14292 *) ac_try_echo=$ac_try;;
14293esac
14294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14295 (eval "$ac_compile") 2>conftest.er1
14296 ac_status=$?
14297 grep -v '^ *+' conftest.er1 >conftest.err
14298 rm -f conftest.er1
14299 cat conftest.err >&5
14300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14301 (exit $ac_status); } && {
14302 test -z "$ac_c_werror_flag" ||
14303 test ! -s conftest.err
14304 } && test -s conftest.$ac_objext; then
14305 ac_hi=-1 ac_mid=-1
14306 while :; do
14307 cat >conftest.$ac_ext <<_ACEOF
14308/* confdefs.h. */
14309_ACEOF
14310cat confdefs.h >>conftest.$ac_ext
14311cat >>conftest.$ac_ext <<_ACEOF
14312/* end confdefs.h. */
14313
14314#ifdef HAVE_PTHREAD_H
14315#include <pthread.h>
14316#endif
14317
14318
14319 typedef pthread_t ac__type_sizeof_;
14320int
14321main ()
14322{
14323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14324test_array [0] = 0
14325
14326 ;
14327 return 0;
14328}
14329_ACEOF
14330rm -f conftest.$ac_objext
14331if { (ac_try="$ac_compile"
14332case "(($ac_try" in
14333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14334 *) ac_try_echo=$ac_try;;
14335esac
14336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14337 (eval "$ac_compile") 2>conftest.er1
14338 ac_status=$?
14339 grep -v '^ *+' conftest.er1 >conftest.err
14340 rm -f conftest.er1
14341 cat conftest.err >&5
14342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14343 (exit $ac_status); } && {
14344 test -z "$ac_c_werror_flag" ||
14345 test ! -s conftest.err
14346 } && test -s conftest.$ac_objext; then
14347 ac_lo=$ac_mid; break
14348else
14349 echo "$as_me: failed program was:" >&5
14350sed 's/^/| /' conftest.$ac_ext >&5
14351
14352 ac_hi=`expr '(' $ac_mid ')' - 1`
14353 if test $ac_mid -le $ac_hi; then
14354 ac_lo= ac_hi=
14355 break
14356 fi
14357 ac_mid=`expr 2 '*' $ac_mid`
14358fi
14359
14360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14361 done
14362else
14363 echo "$as_me: failed program was:" >&5
14364sed 's/^/| /' conftest.$ac_ext >&5
14365
14366 ac_lo= ac_hi=
14367fi
14368
14369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14370fi
14371
14372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14373# Binary search between lo and hi bounds.
14374while test "x$ac_lo" != "x$ac_hi"; do
14375 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14376 cat >conftest.$ac_ext <<_ACEOF
14377/* confdefs.h. */
14378_ACEOF
14379cat confdefs.h >>conftest.$ac_ext
14380cat >>conftest.$ac_ext <<_ACEOF
14381/* end confdefs.h. */
14382
14383#ifdef HAVE_PTHREAD_H
14384#include <pthread.h>
14385#endif
14386
14387
14388 typedef pthread_t ac__type_sizeof_;
14389int
14390main ()
14391{
14392static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14393test_array [0] = 0
14394
14395 ;
14396 return 0;
14397}
14398_ACEOF
14399rm -f conftest.$ac_objext
14400if { (ac_try="$ac_compile"
14401case "(($ac_try" in
14402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14403 *) ac_try_echo=$ac_try;;
14404esac
14405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14406 (eval "$ac_compile") 2>conftest.er1
14407 ac_status=$?
14408 grep -v '^ *+' conftest.er1 >conftest.err
14409 rm -f conftest.er1
14410 cat conftest.err >&5
14411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14412 (exit $ac_status); } && {
14413 test -z "$ac_c_werror_flag" ||
14414 test ! -s conftest.err
14415 } && test -s conftest.$ac_objext; then
14416 ac_hi=$ac_mid
14417else
14418 echo "$as_me: failed program was:" >&5
14419sed 's/^/| /' conftest.$ac_ext >&5
14420
14421 ac_lo=`expr '(' $ac_mid ')' + 1`
14422fi
14423
14424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14425done
14426case $ac_lo in
14427?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14428'') if test "$ac_cv_type_pthread_t" = yes; then
14429 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14430See \`config.log' for more details." >&5
14431echo "$as_me: error: cannot compute sizeof (pthread_t)
14432See \`config.log' for more details." >&2;}
14433 { (exit 77); exit 77; }; }
14434 else
14435 ac_cv_sizeof_pthread_t=0
14436 fi ;;
14437esac
14438else
14439 cat >conftest.$ac_ext <<_ACEOF
14440/* confdefs.h. */
14441_ACEOF
14442cat confdefs.h >>conftest.$ac_ext
14443cat >>conftest.$ac_ext <<_ACEOF
14444/* end confdefs.h. */
14445
14446#ifdef HAVE_PTHREAD_H
14447#include <pthread.h>
14448#endif
14449
14450
14451 typedef pthread_t ac__type_sizeof_;
14452static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14453static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14454#include <stdio.h>
14455#include <stdlib.h>
14456int
14457main ()
14458{
14459
14460 FILE *f = fopen ("conftest.val", "w");
14461 if (! f)
14462 return 1;
14463 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14464 {
14465 long int i = longval ();
14466 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14467 return 1;
14468 fprintf (f, "%ld\n", i);
14469 }
14470 else
14471 {
14472 unsigned long int i = ulongval ();
14473 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14474 return 1;
14475 fprintf (f, "%lu\n", i);
14476 }
14477 return ferror (f) || fclose (f) != 0;
14478
14479 ;
14480 return 0;
14481}
Martin v. Löwis11437992002-04-12 09:54:03 +000014482_ACEOF
14483rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014484if { (ac_try="$ac_link"
14485case "(($ac_try" in
14486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14487 *) ac_try_echo=$ac_try;;
14488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014490 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 { (case "(($ac_try" in
14495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14496 *) ac_try_echo=$ac_try;;
14497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014503 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014505 echo "$as_me: program exited with status $ac_status" >&5
14506echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014507sed 's/^/| /' conftest.$ac_ext >&5
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014510if test "$ac_cv_type_pthread_t" = yes; then
14511 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14512See \`config.log' for more details." >&5
14513echo "$as_me: error: cannot compute sizeof (pthread_t)
14514See \`config.log' for more details." >&2;}
14515 { (exit 77); exit 77; }; }
14516 else
14517 ac_cv_sizeof_pthread_t=0
14518 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014520rm -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 +000014521fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014522rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014523fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014524{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014525echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014526
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014527
14528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014530#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014531_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014532
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014533
Trent Mick635f6fb2000-08-23 21:33:05 +000014534fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014535CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014537{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14538echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014540if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541 enableval=$enable_toolbox_glue;
14542fi
Jack Jansene578a632001-08-15 01:27:14 +000014543
14544
14545if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014546then
Jack Jansene578a632001-08-15 01:27:14 +000014547 case $ac_sys_system/$ac_sys_release in
14548 Darwin/*)
14549 enable_toolbox_glue="yes";;
14550 *)
14551 enable_toolbox_glue="no";;
14552 esac
14553fi
14554case "$enable_toolbox_glue" in
14555yes)
Jack Jansene578a632001-08-15 01:27:14 +000014556 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014557 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014558
14559cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014560#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014561_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014562
14563 ;;
14564*)
Jack Jansene578a632001-08-15 01:27:14 +000014565 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014566 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014567 ;;
14568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014569{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14570echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014571
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014572
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014573
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014574case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014575 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014576 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14577 ;;
14578 Darwin/*)
14579 OTHER_LIBTOOL_OPT=""
14580 ;;
14581esac
14582
14583
Ronald Oussoren25967582009-09-06 10:00:26 +000014584ARCH_RUN_32BIT=""
14585
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014586case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014587 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014588 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14589 if test "${enable_universalsdk}"; then
14590 :
14591 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014592 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014593 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014594 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014595 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014596 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014597 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014598 if test ${gcc_version} '<' 4.0
14599 then
14600 LIBTOOL_CRUFT="-lcc_dynamic"
14601 else
14602 LIBTOOL_CRUFT=""
14603 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014604 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014605 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014606else
14607 cat >conftest.$ac_ext <<_ACEOF
14608/* confdefs.h. */
14609_ACEOF
14610cat confdefs.h >>conftest.$ac_ext
14611cat >>conftest.$ac_ext <<_ACEOF
14612/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014613
Ronald Oussoren25967582009-09-06 10:00:26 +000014614 #include <unistd.h>
14615 int main(int argc, char*argv[])
14616 {
14617 if (sizeof(long) == 4) {
14618 return 0;
14619 } else {
14620 return 1;
14621 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014622 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014623
Ronald Oussoren25967582009-09-06 10:00:26 +000014624_ACEOF
14625rm -f conftest$ac_exeext
14626if { (ac_try="$ac_link"
14627case "(($ac_try" in
14628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14629 *) ac_try_echo=$ac_try;;
14630esac
14631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14632 (eval "$ac_link") 2>&5
14633 ac_status=$?
14634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14636 { (case "(($ac_try" in
14637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14638 *) ac_try_echo=$ac_try;;
14639esac
14640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14641 (eval "$ac_try") 2>&5
14642 ac_status=$?
14643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14644 (exit $ac_status); }; }; then
14645 ac_osx_32bit=yes
14646else
14647 echo "$as_me: program exited with status $ac_status" >&5
14648echo "$as_me: failed program was:" >&5
14649sed 's/^/| /' conftest.$ac_ext >&5
14650
14651( exit $ac_status )
14652ac_osx_32bit=no
14653fi
14654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14655fi
14656
14657
14658
14659 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014660 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014661 i386)
14662 MACOSX_DEFAULT_ARCH="i386"
14663 ;;
14664 ppc)
14665 MACOSX_DEFAULT_ARCH="ppc"
14666 ;;
14667 *)
14668 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14669echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14670 { (exit 1); exit 1; }; }
14671 ;;
14672 esac
14673 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014674 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014675 i386)
14676 MACOSX_DEFAULT_ARCH="x86_64"
14677 ;;
14678 ppc)
14679 MACOSX_DEFAULT_ARCH="ppc64"
14680 ;;
14681 *)
14682 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14683echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14684 { (exit 1); exit 1; }; }
14685 ;;
14686 esac
14687
14688 #ARCH_RUN_32BIT="true"
14689 fi
14690
14691 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014692 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014693 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014694esac
14695
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014696{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14697echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014698if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014699then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014700 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014701 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014702 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014703
Martin v. Löwis11437992002-04-12 09:54:03 +000014704cat >>confdefs.h <<\_ACEOF
14705#define WITH_NEXT_FRAMEWORK 1
14706_ACEOF
14707
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014708 { echo "$as_me:$LINENO: result: yes" >&5
14709echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014710 if test $enable_shared = "yes"
14711 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014712 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14713echo "$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 +000014714 { (exit 1); exit 1; }; }
14715 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014717 { echo "$as_me:$LINENO: result: no" >&5
14718echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014719fi
14720
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014721{ echo "$as_me:$LINENO: checking for dyld" >&5
14722echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014723case $ac_sys_system/$ac_sys_release in
14724 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014725
Martin v. Löwis11437992002-04-12 09:54:03 +000014726cat >>confdefs.h <<\_ACEOF
14727#define WITH_DYLD 1
14728_ACEOF
14729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014730 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14731echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014732 ;;
14733 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014734 { echo "$as_me:$LINENO: result: no" >&5
14735echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014736 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014737esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014738
Guido van Rossum0a516c91994-09-12 10:58:40 +000014739# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014740
Michael W. Hudson54241132001-12-07 15:38:26 +000014741
14742
14743
14744
Guido van Rossum0a516c91994-09-12 10:58:40 +000014745# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014746# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014747{ echo "$as_me:$LINENO: checking SO" >&5
14748echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014749if test -z "$SO"
14750then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014751 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014752 hp*|HP*)
14753 case `uname -m` in
14754 ia64) SO=.so;;
14755 *) SO=.sl;;
14756 esac
14757 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014758 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014759 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014760 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014761else
14762 # this might also be a termcap variable, see #610332
14763 echo
14764 echo '====================================================================='
14765 echo '+ +'
14766 echo '+ WARNING: You have set SO in your environment. +'
14767 echo '+ Do you really mean to change the extension for shared libraries? +'
14768 echo '+ Continuing in 10 seconds to let you to ponder. +'
14769 echo '+ +'
14770 echo '====================================================================='
14771 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014773{ echo "$as_me:$LINENO: result: $SO" >&5
14774echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014775
Ronald Oussoren79f90492009-01-02 10:44:46 +000014776
Neal Norwitz58e28882006-05-19 07:00:58 +000014777cat >>confdefs.h <<_ACEOF
14778#define SHLIB_EXT "$SO"
14779_ACEOF
14780
Guido van Rossum0a516c91994-09-12 10:58:40 +000014781# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014782# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014783# (Shared libraries in this instance are shared modules to be loaded into
14784# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014785{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14786echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014787if test -z "$LDSHARED"
14788then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014789 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014790 AIX*)
14791 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014792 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014793 ;;
14794 BeOS*)
14795 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014796 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014797 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014798 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014799 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014801 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014802 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014803 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014804 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014805 hp*|HP*)
14806 if test "$GCC" = "yes"
14807 then LDSHARED='$(CC) -shared'
14808 else LDSHARED='ld -b';
14809 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014810 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014811 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014812 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14813 if test "$enable_framework" ; then
14814 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014815 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14816 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014817 else
14818 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014819 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014820 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014821 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014822 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14823 if test "$enable_framework" ; then
14824 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014825 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14826 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014827 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014828 # No framework, use the Python app as bundle-loader
14829 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014830 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014831 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014832 Darwin/*)
14833 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14834 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014835
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014836 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014837 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014838 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014839 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014840 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014841 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14842 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014843 else
14844 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14845 if test "$enable_framework" ; then
14846 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014847 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14848 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014849 else
14850 # No framework, use the Python app as bundle-loader
14851 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14852 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14853 fi
14854 fi
14855 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014856 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014857 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014858 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014860 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014861 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014862 else
14863 LDSHARED="ld -Bshareable ${LDFLAGS}"
14864 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014865 OpenBSD*)
14866 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14867 then
14868 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14869 else
14870 case `uname -r` in
14871 [01].* | 2.[0-7] | 2.[0-7].*)
14872 LDSHARED="ld -Bshareable ${LDFLAGS}"
14873 ;;
14874 *)
14875 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14876 ;;
14877 esac
14878 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014879 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014880 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014881 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014882 then LDSHARED='$(CC) -shared'
14883 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014884 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014885 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014886 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014887 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014888 *) LDSHARED="ld";;
14889 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014890fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014891{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14892echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014893BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014894# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014895# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014896{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14897echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898if test -z "$CCSHARED"
14899then
Guido van Rossum07397971997-04-29 21:49:50 +000014900 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014901 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014902 then CCSHARED="-fPIC";
14903 elif test `uname -p` = sparc;
14904 then CCSHARED="-xcode=pic32";
14905 else CCSHARED="-Kpic";
14906 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014907 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014908 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014909 else CCSHARED="+z";
14910 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014911 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014912 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014913 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014914 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014915 if test "$GCC" = "yes"
14916 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014917 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014918 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014919 SCO_SV*)
14920 if test "$GCC" = "yes"
14921 then CCSHARED="-fPIC"
14922 else CCSHARED="-Kpic -belf"
14923 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014924 IRIX*/6*) case $CC in
14925 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014926 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014927 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014929 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014930fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014931{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14932echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014933# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014934# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14936echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014937if test -z "$LINKFORSHARED"
14938then
Guido van Rossum07397971997-04-29 21:49:50 +000014939 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014940 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014941 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014942 LINKFORSHARED="-Wl,-E -Wl,+s";;
14943# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014944 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014945 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014946 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014948 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14949 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014950 # not used by the core itself but which needs to be in the core so
14951 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014952 # -prebind is no longer used, because it actually seems to give a
14953 # slowdown in stead of a speedup, maybe due to the large number of
14954 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014955
14956 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014957 if test "$enable_framework"
14958 then
Jack Jansenda49e192005-01-07 13:08:22 +000014959 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014960 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014961 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014962 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014963 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014964 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014965 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014966 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14967 then
14968 LINKFORSHARED="-Wl,--export-dynamic"
14969 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014970 SunOS/5*) case $CC in
14971 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014972 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014973 then
14974 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014975 fi;;
14976 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014977 CYGWIN*)
14978 if test $enable_shared = "no"
14979 then
14980 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14981 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014982 QNX*)
14983 # -Wl,-E causes the symbols to be added to the dynamic
14984 # symbol table so that they can be found when a module
14985 # is loaded. -N 2048K causes the stack size to be set
14986 # to 2048 kilobytes so that the stack doesn't overflow
14987 # when running test_compile.py.
14988 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014989 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014990fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014991{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14992echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014993
Michael W. Hudson54241132001-12-07 15:38:26 +000014994
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014996{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14997echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014998if test ! "$LIBRARY" = "$LDLIBRARY"
14999then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015000 case $ac_sys_system in
15001 CYGWIN*)
15002 # Cygwin needs CCSHARED when building extension DLLs
15003 # but not when building the interpreter DLL.
15004 CFLAGSFORSHARED='';;
15005 *)
15006 CFLAGSFORSHARED='$(CCSHARED)'
15007 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015009{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15010echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015011
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15013# library (with --enable-shared).
15014# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015015# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15016# if it is not required, since it creates a dependency of the shared library
15017# to LIBS. This, in turn, means that applications linking the shared libpython
15018# don't need to link LIBS explicitly. The default should be only changed
15019# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015021{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15022echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015023case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015024 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015025 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015026esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015027{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15028echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015029
15030
Guido van Rossum627b2d71993-12-24 10:39:16 +000015031# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015033{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15034echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015035if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015037else
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015039LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015041/* confdefs.h. */
15042_ACEOF
15043cat confdefs.h >>conftest.$ac_ext
15044cat >>conftest.$ac_ext <<_ACEOF
15045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015046
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047/* Override any GCC internal prototype to avoid an error.
15048 Use char because int might match the return type of a GCC
15049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015050#ifdef __cplusplus
15051extern "C"
15052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015053char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015054int
15055main ()
15056{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ;
15059 return 0;
15060}
15061_ACEOF
15062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063if { (ac_try="$ac_link"
15064case "(($ac_try" in
15065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15066 *) ac_try_echo=$ac_try;;
15067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015071 grep -v '^ *+' conftest.er1 >conftest.err
15072 rm -f conftest.er1
15073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075 (exit $ac_status); } && {
15076 test -z "$ac_c_werror_flag" ||
15077 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015078 } && test -s conftest$ac_exeext &&
15079 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015083sed 's/^/| /' conftest.$ac_ext >&5
15084
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087
15088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015091fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015092{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15093echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15094if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 cat >>confdefs.h <<_ACEOF
15096#define HAVE_LIBDL 1
15097_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015098
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015099 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015100
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015101fi
15102 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015104{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15105echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015106if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015108else
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015110LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015112/* confdefs.h. */
15113_ACEOF
15114cat confdefs.h >>conftest.$ac_ext
15115cat >>conftest.$ac_ext <<_ACEOF
15116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015117
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118/* Override any GCC internal prototype to avoid an error.
15119 Use char because int might match the return type of a GCC
15120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015121#ifdef __cplusplus
15122extern "C"
15123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015124char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015125int
15126main ()
15127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ;
15130 return 0;
15131}
15132_ACEOF
15133rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134if { (ac_try="$ac_link"
15135case "(($ac_try" in
15136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15137 *) ac_try_echo=$ac_try;;
15138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015142 grep -v '^ *+' conftest.er1 >conftest.err
15143 rm -f conftest.er1
15144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146 (exit $ac_status); } && {
15147 test -z "$ac_c_werror_flag" ||
15148 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015149 } && test -s conftest$ac_exeext &&
15150 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015154sed 's/^/| /' conftest.$ac_ext >&5
15155
Martin v. Löwiseba40652007-08-30 20:10:57 +000015156 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015158
15159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015160 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015161LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015162fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015163{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15164echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15165if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 cat >>confdefs.h <<_ACEOF
15167#define HAVE_LIBDLD 1
15168_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015169
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015170 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015171
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015172fi
15173 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015174
Ronald Oussoren79f90492009-01-02 10:44:46 +000015175# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015176if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015177 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15178echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015179if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015180 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015181else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015182 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015184/* confdefs.h. */
15185_ACEOF
15186cat confdefs.h >>conftest.$ac_ext
15187cat >>conftest.$ac_ext <<_ACEOF
15188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205for ac_lib in '' pthread rt posix4; do
15206 if test -z "$ac_lib"; then
15207 ac_res="none required"
15208 else
15209 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015210 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 fi
15212 rm -f conftest.$ac_objext conftest$ac_exeext
15213if { (ac_try="$ac_link"
15214case "(($ac_try" in
15215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15216 *) ac_try_echo=$ac_try;;
15217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015220 ac_status=$?
15221 grep -v '^ *+' conftest.er1 >conftest.err
15222 rm -f conftest.er1
15223 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225 (exit $ac_status); } && {
15226 test -z "$ac_c_werror_flag" ||
15227 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015228 } && test -s conftest$ac_exeext &&
15229 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015232 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015233sed 's/^/| /' conftest.$ac_ext >&5
15234
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235
Brett Cannon19fab762007-06-02 03:02:29 +000015236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237
15238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15239 conftest$ac_exeext
15240 if test "${ac_cv_search_sem_init+set}" = set; then
15241 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243done
15244if test "${ac_cv_search_sem_init+set}" = set; then
15245 :
15246else
15247 ac_cv_search_sem_init=no
15248fi
15249rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015250LIBS=$ac_func_search_save_LIBS
15251fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015252{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15253echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015254ac_res=$ac_cv_search_sem_init
15255if test "$ac_res" != no; then
15256 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015257
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015258fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015259 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015260 # posix4 on Solaris 2.6
15261 # pthread (first!) on Linux
15262fi
15263
Martin v. Löwis19d17342003-06-14 21:03:05 +000015264# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015265{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15266echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015267if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015268 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015269else
15270 ac_check_lib_save_LIBS=$LIBS
15271LIBS="-lintl $LIBS"
15272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015273/* confdefs.h. */
15274_ACEOF
15275cat confdefs.h >>conftest.$ac_ext
15276cat >>conftest.$ac_ext <<_ACEOF
15277/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015278
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279/* Override any GCC internal prototype to avoid an error.
15280 Use char because int might match the return type of a GCC
15281 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015282#ifdef __cplusplus
15283extern "C"
15284#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015285char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015286int
15287main ()
15288{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015290 ;
15291 return 0;
15292}
15293_ACEOF
15294rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295if { (ac_try="$ac_link"
15296case "(($ac_try" in
15297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15298 *) ac_try_echo=$ac_try;;
15299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015303 grep -v '^ *+' conftest.er1 >conftest.err
15304 rm -f conftest.er1
15305 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307 (exit $ac_status); } && {
15308 test -z "$ac_c_werror_flag" ||
15309 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015310 } && test -s conftest$ac_exeext &&
15311 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015312 ac_cv_lib_intl_textdomain=yes
15313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015315sed 's/^/| /' conftest.$ac_ext >&5
15316
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319
15320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015322LIBS=$ac_check_lib_save_LIBS
15323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015324{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15325echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15326if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015327
15328cat >>confdefs.h <<\_ACEOF
15329#define WITH_LIBINTL 1
15330_ACEOF
15331
15332fi
15333
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015334
15335# checks for system dependent C++ extensions support
15336case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015337 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15338echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015340/* confdefs.h. */
15341_ACEOF
15342cat confdefs.h >>conftest.$ac_ext
15343cat >>conftest.$ac_ext <<_ACEOF
15344/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015345#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015346int
15347main ()
15348{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015349loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ;
15351 return 0;
15352}
15353_ACEOF
15354rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355if { (ac_try="$ac_link"
15356case "(($ac_try" in
15357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15358 *) ac_try_echo=$ac_try;;
15359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015363 grep -v '^ *+' conftest.er1 >conftest.err
15364 rm -f conftest.er1
15365 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367 (exit $ac_status); } && {
15368 test -z "$ac_c_werror_flag" ||
15369 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370 } && test -s conftest$ac_exeext &&
15371 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015372
Martin v. Löwis11437992002-04-12 09:54:03 +000015373cat >>confdefs.h <<\_ACEOF
15374#define AIX_GENUINE_CPLUSPLUS 1
15375_ACEOF
15376
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015377 { echo "$as_me:$LINENO: result: yes" >&5
15378echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015381sed 's/^/| /' conftest.$ac_ext >&5
15382
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015383 { echo "$as_me:$LINENO: result: no" >&5
15384echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386
15387rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015388 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015389 *) ;;
15390esac
15391
Guido van Rossum70c7f481998-03-26 18:44:10 +000015392# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015393# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015394{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15395echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015396if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015398else
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015400LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015402/* confdefs.h. */
15403_ACEOF
15404cat confdefs.h >>conftest.$ac_ext
15405cat >>conftest.$ac_ext <<_ACEOF
15406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015407
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408/* Override any GCC internal prototype to avoid an error.
15409 Use char because int might match the return type of a GCC
15410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015411#ifdef __cplusplus
15412extern "C"
15413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015414char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015415int
15416main ()
15417{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015419 ;
15420 return 0;
15421}
15422_ACEOF
15423rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424if { (ac_try="$ac_link"
15425case "(($ac_try" in
15426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15427 *) ac_try_echo=$ac_try;;
15428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015430 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015432 grep -v '^ *+' conftest.er1 >conftest.err
15433 rm -f conftest.er1
15434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436 (exit $ac_status); } && {
15437 test -z "$ac_c_werror_flag" ||
15438 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015439 } && test -s conftest$ac_exeext &&
15440 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015444sed 's/^/| /' conftest.$ac_ext >&5
15445
Martin v. Löwiseba40652007-08-30 20:10:57 +000015446 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015448
15449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015451LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015453{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15454echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15455if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015456 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015457fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015458 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015459{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15460echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015461if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015462 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015463else
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015465LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015467/* confdefs.h. */
15468_ACEOF
15469cat confdefs.h >>conftest.$ac_ext
15470cat >>conftest.$ac_ext <<_ACEOF
15471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015472
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473/* Override any GCC internal prototype to avoid an error.
15474 Use char because int might match the return type of a GCC
15475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015476#ifdef __cplusplus
15477extern "C"
15478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015479char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015480int
15481main ()
15482{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 ;
15485 return 0;
15486}
15487_ACEOF
15488rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489if { (ac_try="$ac_link"
15490case "(($ac_try" in
15491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15492 *) ac_try_echo=$ac_try;;
15493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015495 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015497 grep -v '^ *+' conftest.er1 >conftest.err
15498 rm -f conftest.er1
15499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501 (exit $ac_status); } && {
15502 test -z "$ac_c_werror_flag" ||
15503 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015504 } && test -s conftest$ac_exeext &&
15505 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015506 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015509sed 's/^/| /' conftest.$ac_ext >&5
15510
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015513
15514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015516LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015517fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015518{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15519echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15520if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015521 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015522fi
15523 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015524
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015525case "$ac_sys_system" in
15526BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015527{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15528echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015529if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015531else
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015533LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015535/* confdefs.h. */
15536_ACEOF
15537cat confdefs.h >>conftest.$ac_ext
15538cat >>conftest.$ac_ext <<_ACEOF
15539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541/* Override any GCC internal prototype to avoid an error.
15542 Use char because int might match the return type of a GCC
15543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015544#ifdef __cplusplus
15545extern "C"
15546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015547char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015548int
15549main ()
15550{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 ;
15553 return 0;
15554}
15555_ACEOF
15556rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015557if { (ac_try="$ac_link"
15558case "(($ac_try" in
15559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15560 *) ac_try_echo=$ac_try;;
15561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015563 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015565 grep -v '^ *+' conftest.er1 >conftest.err
15566 rm -f conftest.er1
15567 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569 (exit $ac_status); } && {
15570 test -z "$ac_c_werror_flag" ||
15571 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015572 } && test -s conftest$ac_exeext &&
15573 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015574 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015577sed 's/^/| /' conftest.$ac_ext >&5
15578
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581
15582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015584LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015585fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015586{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15587echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15588if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015589 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015590fi
15591 # BeOS
15592;;
15593esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015594
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015595{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15596echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015597
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015599if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015601{ echo "$as_me:$LINENO: result: $withval" >&5
15602echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015603LIBS="$withval $LIBS"
15604
15605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015606 { echo "$as_me:$LINENO: result: no" >&5
15607echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015608fi
15609
Guido van Rossum7f43da71994-08-01 12:15:30 +000015610
Benjamin Peterson2c196742009-12-31 03:17:18 +000015611# Check for use of the system expat library
15612{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15613echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15614
15615# Check whether --with-system_expat was given.
15616if test "${with_system_expat+set}" = set; then
15617 withval=$with_system_expat;
15618fi
15619
15620
15621{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15622echo "${ECHO_T}$with_system_expat" >&6; }
15623
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015624# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015625{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15626echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015627
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015629if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 withval=$with_system_ffi;
15631fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015632
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015633
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015634if test "$with_system_ffi" = "yes"; then
15635 if test -n "$ac_tool_prefix"; then
15636 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15637set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15638{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15640if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15641 echo $ECHO_N "(cached) $ECHO_C" >&6
15642else
15643 case $PKG_CONFIG in
15644 [\\/]* | ?:[\\/]*)
15645 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15646 ;;
15647 *)
15648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15649for as_dir in $PATH
15650do
15651 IFS=$as_save_IFS
15652 test -z "$as_dir" && as_dir=.
15653 for ac_exec_ext in '' $ac_executable_extensions; do
15654 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15655 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15656 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15657 break 2
15658 fi
15659done
15660done
15661IFS=$as_save_IFS
15662
15663 ;;
15664esac
15665fi
15666PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15667if test -n "$PKG_CONFIG"; then
15668 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15669echo "${ECHO_T}$PKG_CONFIG" >&6; }
15670else
15671 { echo "$as_me:$LINENO: result: no" >&5
15672echo "${ECHO_T}no" >&6; }
15673fi
15674
15675
15676fi
15677if test -z "$ac_cv_path_PKG_CONFIG"; then
15678 ac_pt_PKG_CONFIG=$PKG_CONFIG
15679 # Extract the first word of "pkg-config", so it can be a program name with args.
15680set dummy pkg-config; ac_word=$2
15681{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15683if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15684 echo $ECHO_N "(cached) $ECHO_C" >&6
15685else
15686 case $ac_pt_PKG_CONFIG in
15687 [\\/]* | ?:[\\/]*)
15688 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15689 ;;
15690 *)
15691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15692for as_dir in $PATH
15693do
15694 IFS=$as_save_IFS
15695 test -z "$as_dir" && as_dir=.
15696 for ac_exec_ext in '' $ac_executable_extensions; do
15697 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15698 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15699 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15700 break 2
15701 fi
15702done
15703done
15704IFS=$as_save_IFS
15705
15706 ;;
15707esac
15708fi
15709ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15710if test -n "$ac_pt_PKG_CONFIG"; then
15711 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15712echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15713else
15714 { echo "$as_me:$LINENO: result: no" >&5
15715echo "${ECHO_T}no" >&6; }
15716fi
15717
15718 if test "x$ac_pt_PKG_CONFIG" = x; then
15719 PKG_CONFIG=""
15720 else
15721 case $cross_compiling:$ac_tool_warned in
15722yes:)
15723{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15724whose name does not start with the host triplet. If you think this
15725configuration is useful to you, please write to autoconf@gnu.org." >&5
15726echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15727whose name does not start with the host triplet. If you think this
15728configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15729ac_tool_warned=yes ;;
15730esac
15731 PKG_CONFIG=$ac_pt_PKG_CONFIG
15732 fi
15733else
15734 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15735fi
15736
15737 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15738else
15739 LIBFFI_INCLUDEDIR=""
15740fi
15741
15742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015743{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15744echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015745
Benjamin Peterson867475c2009-04-29 20:36:25 +000015746# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015747{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15748echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015749
15750# Check whether --with-dbmliborder was given.
15751if test "${with_dbmliborder+set}" = set; then
15752 withval=$with_dbmliborder;
15753if test x$with_dbmliborder = xyes
15754then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015755{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15756echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015757 { (exit 1); exit 1; }; }
15758else
15759 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15760 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15761 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015762 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15763echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015764 { (exit 1); exit 1; }; }
15765 fi
15766 done
15767fi
15768fi
15769
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015770{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15771echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015772
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015773# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015774
15775
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015776{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15777echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015780if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 withval=$with_signal_module;
15782fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015783
15784
15785if test -z "$with_signal_module"
15786then with_signal_module="yes"
15787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015788{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15789echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015790
15791if test "${with_signal_module}" = "yes"; then
15792 USE_SIGNAL_MODULE=""
15793 SIGNAL_OBJS=""
15794else
15795 USE_SIGNAL_MODULE="#"
15796 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15797fi
15798
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015799# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015800
Barry Warsawc0d24d82000-06-29 16:12:00 +000015801USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015803{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15804echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015805
Guido van Rossumec2f0731997-01-22 20:54:01 +000015806
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015808if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015810{ echo "$as_me:$LINENO: result: $withval" >&5
15811echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015812LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015813if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015814 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015815fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015816else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015817 { echo "$as_me:$LINENO: result: no" >&5
15818echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015819fi
15820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821
15822# Templates for things AC_DEFINEd more than once.
15823# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015824
15825
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
15827
15828
15829
15830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015831{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15832echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015833
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015835if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836 withval=$with_threads;
15837fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015838
15839
Barry Warsawc0d24d82000-06-29 16:12:00 +000015840# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015841
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015843if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844 withval=$with_thread; with_threads=$with_thread
15845fi
15846
Barry Warsawc0d24d82000-06-29 16:12:00 +000015847
15848if test -z "$with_threads"
15849then with_threads="yes"
15850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015851{ echo "$as_me:$LINENO: result: $with_threads" >&5
15852echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015853
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015854
Barry Warsawc0d24d82000-06-29 16:12:00 +000015855if test "$with_threads" = "no"
15856then
15857 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015858elif test "$ac_cv_pthread_is_default" = yes
15859then
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015861#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015862_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015863
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015864 # Defining _REENTRANT on system with POSIX threads should not hurt.
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 _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015868
15869 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015871elif test "$ac_cv_kpthread" = "yes"
15872then
15873 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015874 if test "$ac_cv_cxx_thread" = "yes"; then
15875 CXX="$CXX -Kpthread"
15876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015878#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015879_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015880
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015881 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015882 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015883elif test "$ac_cv_kthread" = "yes"
15884then
15885 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015886 if test "$ac_cv_cxx_thread" = "yes"; then
15887 CXX="$CXX -Kthread"
15888 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015889 cat >>confdefs.h <<\_ACEOF
15890#define WITH_THREAD 1
15891_ACEOF
15892
15893 posix_threads=yes
15894 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015895elif test "$ac_cv_pthread" = "yes"
15896then
15897 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015898 if test "$ac_cv_cxx_thread" = "yes"; then
15899 CXX="$CXX -pthread"
15900 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015901 cat >>confdefs.h <<\_ACEOF
15902#define WITH_THREAD 1
15903_ACEOF
15904
15905 posix_threads=yes
15906 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015907else
15908 if test ! -z "$with_threads" -a -d "$with_threads"
15909 then LDFLAGS="$LDFLAGS -L$with_threads"
15910 fi
15911 if test ! -z "$withval" -a -d "$withval"
15912 then LDFLAGS="$LDFLAGS -L$withval"
15913 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015914
15915 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015916 # define _POSIX_THREADS in unistd.h. Some apparently don't
15917 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015918 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15919echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015921/* confdefs.h. */
15922_ACEOF
15923cat confdefs.h >>conftest.$ac_ext
15924cat >>conftest.$ac_ext <<_ACEOF
15925/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015926
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015927#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015928#ifdef _POSIX_THREADS
15929yes
15930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
15932_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015934 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015935 unistd_defines_pthreads=yes
15936else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015937 unistd_defines_pthreads=no
15938fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000015939rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015941 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15942echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015945#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015946_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015947
Martin v. Löwis11437992002-04-12 09:54:03 +000015948 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015949 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15950echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015951if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015953fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15955echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015956else
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015958{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15959echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015961/* confdefs.h. */
15962_ACEOF
15963cat confdefs.h >>conftest.$ac_ext
15964cat >>conftest.$ac_ext <<_ACEOF
15965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015966$ac_includes_default
15967#include <cthreads.h>
15968_ACEOF
15969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015970if { (ac_try="$ac_compile"
15971case "(($ac_try" in
15972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15973 *) ac_try_echo=$ac_try;;
15974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015978 grep -v '^ *+' conftest.er1 >conftest.err
15979 rm -f conftest.er1
15980 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982 (exit $ac_status); } && {
15983 test -z "$ac_c_werror_flag" ||
15984 test ! -s conftest.err
15985 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 ac_header_compiler=yes
15987else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015989sed 's/^/| /' conftest.$ac_ext >&5
15990
Martin v. Löwiseba40652007-08-30 20:10:57 +000015991 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993
15994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015995{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15996echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
15998# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015999{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16000echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016002/* confdefs.h. */
16003_ACEOF
16004cat confdefs.h >>conftest.$ac_ext
16005cat >>conftest.$ac_ext <<_ACEOF
16006/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016007#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016008_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009if { (ac_try="$ac_cpp conftest.$ac_ext"
16010case "(($ac_try" in
16011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16012 *) ac_try_echo=$ac_try;;
16013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016016 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016017 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 rm -f conftest.er1
16019 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016021 (exit $ac_status); } >/dev/null && {
16022 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16023 test ! -s conftest.err
16024 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 ac_header_preproc=yes
16026else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016028sed 's/^/| /' conftest.$ac_ext >&5
16029
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016034{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16035echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016036
16037# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016038case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16039 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016040 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16041echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16042 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16043echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016044 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016045 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016046 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016047 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16048echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16049 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16050echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16051 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16052echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16053 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16054echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16055 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16056echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16057 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16058echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016059 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016060## -------------------------------------- ##
16061## Report this to http://bugs.python.org/ ##
16062## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016063_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016065 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016067{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16068echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016069if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016070 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016071else
16072 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016073fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016074{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16075echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016076
16077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016078if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016080#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016081_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016082
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016084#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016085_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016086
Martin v. Löwis11437992002-04-12 09:54:03 +000016087
16088cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016089#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016090_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016091
16092 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016093 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016094else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016097 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16098echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016099if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016101fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016102{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16103echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016106{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16107echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016109/* confdefs.h. */
16110_ACEOF
16111cat confdefs.h >>conftest.$ac_ext
16112cat >>conftest.$ac_ext <<_ACEOF
16113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016114$ac_includes_default
16115#include <mach/cthreads.h>
16116_ACEOF
16117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016118if { (ac_try="$ac_compile"
16119case "(($ac_try" in
16120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16121 *) ac_try_echo=$ac_try;;
16122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016126 grep -v '^ *+' conftest.er1 >conftest.err
16127 rm -f conftest.er1
16128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016130 (exit $ac_status); } && {
16131 test -z "$ac_c_werror_flag" ||
16132 test ! -s conftest.err
16133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 ac_header_compiler=yes
16135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016137sed 's/^/| /' conftest.$ac_ext >&5
16138
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141
16142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016143{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16144echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016145
16146# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016147{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16148echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016150/* confdefs.h. */
16151_ACEOF
16152cat confdefs.h >>conftest.$ac_ext
16153cat >>conftest.$ac_ext <<_ACEOF
16154/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016155#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016156_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016157if { (ac_try="$ac_cpp conftest.$ac_ext"
16158case "(($ac_try" in
16159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16160 *) ac_try_echo=$ac_try;;
16161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016163 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016165 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016166 rm -f conftest.er1
16167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016169 (exit $ac_status); } >/dev/null && {
16170 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16171 test ! -s conftest.err
16172 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 ac_header_preproc=yes
16174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016176sed 's/^/| /' conftest.$ac_ext >&5
16177
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016180
Martin v. Löwis11437992002-04-12 09:54:03 +000016181rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016182{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16183echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016184
16185# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16187 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016188 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16189echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16190 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16191echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016192 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016193 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016195 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16196echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16197 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16198echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16199 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16200echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16201 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16202echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16203 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16204echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16205 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16206echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016207 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016208## -------------------------------------- ##
16209## Report this to http://bugs.python.org/ ##
16210## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016211_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016212 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016213 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016215{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16216echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016217if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016218 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016219else
16220 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016222{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16223echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016224
16225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016227 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016228#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016229_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016230
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016232#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016233_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016234
Martin v. Löwis11437992002-04-12 09:54:03 +000016235
16236cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016237#define MACH_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öwis2d7e2642002-04-05 16:50:53 +000016240 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016241else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016243 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16244echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016245
Martin v. Löwiseba40652007-08-30 20:10:57 +000016246# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016247if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016248 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16249echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016250 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016251#define WITH_THREAD 1
16252_ACEOF
16253
16254
16255cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016256#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016257_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016258
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016259 LIBS="-lpth $LIBS"
16260 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016261else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016262 { echo "$as_me:$LINENO: result: no" >&5
16263echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016264
16265 # Just looking for pthread_create in libpthread is not enough:
16266 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16267 # So we really have to include pthread.h, and then link.
16268 _libs=$LIBS
16269 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016270 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16271echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016273/* confdefs.h. */
16274_ACEOF
16275cat confdefs.h >>conftest.$ac_ext
16276cat >>conftest.$ac_ext <<_ACEOF
16277/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016278#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016279
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016280void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016281int
16282main ()
16283{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016284
16285pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 ;
16287 return 0;
16288}
16289_ACEOF
16290rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291if { (ac_try="$ac_link"
16292case "(($ac_try" in
16293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16294 *) ac_try_echo=$ac_try;;
16295esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016297 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016299 grep -v '^ *+' conftest.er1 >conftest.err
16300 rm -f conftest.er1
16301 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303 (exit $ac_status); } && {
16304 test -z "$ac_c_werror_flag" ||
16305 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016306 } && test -s conftest$ac_exeext &&
16307 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016309 { echo "$as_me:$LINENO: result: yes" >&5
16310echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016312#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016313_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016314
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016315 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016316 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016319sed 's/^/| /' conftest.$ac_ext >&5
16320
Martin v. Löwis11437992002-04-12 09:54:03 +000016321
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016322 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016323 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16324echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016325if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016327else
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016329/* confdefs.h. */
16330_ACEOF
16331cat confdefs.h >>conftest.$ac_ext
16332cat >>conftest.$ac_ext <<_ACEOF
16333/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016334/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16335 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16336#define pthread_detach innocuous_pthread_detach
16337
Guido van Rossumad678af1998-10-02 14:42:15 +000016338/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016339 which can conflict with char pthread_detach (); below.
16340 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016341 <limits.h> exists even on freestanding compilers. */
16342
16343#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016344# include <limits.h>
16345#else
16346# include <assert.h>
16347#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016348
16349#undef pthread_detach
16350
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351/* Override any GCC internal prototype to avoid an error.
16352 Use char because int might match the return type of a GCC
16353 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016354#ifdef __cplusplus
16355extern "C"
16356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016357char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016358/* The GNU C library defines this for functions which it implements
16359 to always fail with ENOSYS. Some functions are actually named
16360 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016362choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016363#endif
16364
Skip Montanaro6dead952003-09-25 14:50:04 +000016365int
16366main ()
16367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ;
16370 return 0;
16371}
16372_ACEOF
16373rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374if { (ac_try="$ac_link"
16375case "(($ac_try" in
16376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16377 *) ac_try_echo=$ac_try;;
16378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016382 grep -v '^ *+' conftest.er1 >conftest.err
16383 rm -f conftest.er1
16384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386 (exit $ac_status); } && {
16387 test -z "$ac_c_werror_flag" ||
16388 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016389 } && test -s conftest$ac_exeext &&
16390 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016394sed 's/^/| /' conftest.$ac_ext >&5
16395
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016398
16399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016400 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016401fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016402{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16403echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16404if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016406#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016407_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016408
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016409 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016410 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016411else
Guido van Rossumad678af1998-10-02 14:42:15 +000016412
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016413 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016414 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16415echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016416if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016418fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016419{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16420echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016421else
16422 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016423{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16424echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016426/* confdefs.h. */
16427_ACEOF
16428cat confdefs.h >>conftest.$ac_ext
16429cat >>conftest.$ac_ext <<_ACEOF
16430/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016431$ac_includes_default
16432#include <atheos/threads.h>
16433_ACEOF
16434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435if { (ac_try="$ac_compile"
16436case "(($ac_try" in
16437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16438 *) ac_try_echo=$ac_try;;
16439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016443 grep -v '^ *+' conftest.er1 >conftest.err
16444 rm -f conftest.er1
16445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016447 (exit $ac_status); } && {
16448 test -z "$ac_c_werror_flag" ||
16449 test ! -s conftest.err
16450 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016451 ac_header_compiler=yes
16452else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016454sed 's/^/| /' conftest.$ac_ext >&5
16455
Martin v. Löwiseba40652007-08-30 20:10:57 +000016456 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458
16459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016460{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16461echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016462
16463# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016464{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16465echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016467/* confdefs.h. */
16468_ACEOF
16469cat confdefs.h >>conftest.$ac_ext
16470cat >>conftest.$ac_ext <<_ACEOF
16471/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016472#include <atheos/threads.h>
16473_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474if { (ac_try="$ac_cpp conftest.$ac_ext"
16475case "(($ac_try" in
16476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16477 *) ac_try_echo=$ac_try;;
16478esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016481 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016482 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016483 rm -f conftest.er1
16484 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016486 (exit $ac_status); } >/dev/null && {
16487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16488 test ! -s conftest.err
16489 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016490 ac_header_preproc=yes
16491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016493sed 's/^/| /' conftest.$ac_ext >&5
16494
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016495 ac_header_preproc=no
16496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016497
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016498rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016499{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16500echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016501
16502# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16504 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016505 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16506echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16507 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16508echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016509 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016510 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016511 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016512 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16513echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16514 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16515echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16516 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16517echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16518 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16519echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16520 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16521echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16522 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16523echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016524 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016525## -------------------------------------- ##
16526## Report this to http://bugs.python.org/ ##
16527## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016528_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016529 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016530 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016532{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16533echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016534if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016536else
16537 ac_cv_header_atheos_threads_h=$ac_header_preproc
16538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016539{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16540echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016541
16542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016543if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016544 cat >>confdefs.h <<\_ACEOF
16545#define WITH_THREAD 1
16546_ACEOF
16547
16548
16549cat >>confdefs.h <<\_ACEOF
16550#define ATHEOS_THREADS 1
16551_ACEOF
16552
16553 THREADOBJ="Python/thread.o"
16554else
16555
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016557 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16558echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016559if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016562{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16563echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016564else
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016566{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16567echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016569/* confdefs.h. */
16570_ACEOF
16571cat confdefs.h >>conftest.$ac_ext
16572cat >>conftest.$ac_ext <<_ACEOF
16573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016574$ac_includes_default
16575#include <kernel/OS.h>
16576_ACEOF
16577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016578if { (ac_try="$ac_compile"
16579case "(($ac_try" in
16580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16581 *) ac_try_echo=$ac_try;;
16582esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016586 grep -v '^ *+' conftest.er1 >conftest.err
16587 rm -f conftest.er1
16588 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016590 (exit $ac_status); } && {
16591 test -z "$ac_c_werror_flag" ||
16592 test ! -s conftest.err
16593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 ac_header_compiler=yes
16595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016597sed 's/^/| /' conftest.$ac_ext >&5
16598
Martin v. Löwiseba40652007-08-30 20:10:57 +000016599 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016601
16602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016603{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16604echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016605
16606# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016607{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16608echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016610/* confdefs.h. */
16611_ACEOF
16612cat confdefs.h >>conftest.$ac_ext
16613cat >>conftest.$ac_ext <<_ACEOF
16614/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016615#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016616_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016617if { (ac_try="$ac_cpp conftest.$ac_ext"
16618case "(($ac_try" in
16619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16620 *) ac_try_echo=$ac_try;;
16621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016625 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 rm -f conftest.er1
16627 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016629 (exit $ac_status); } >/dev/null && {
16630 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16631 test ! -s conftest.err
16632 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ac_header_preproc=yes
16634else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016636sed 's/^/| /' conftest.$ac_ext >&5
16637
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016640
Martin v. Löwis11437992002-04-12 09:54:03 +000016641rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016642{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16643echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016644
Martin v. Löwis11437992002-04-12 09:54:03 +000016645# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016646case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16647 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016648 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16649echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16650 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16651echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016652 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016653 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016654 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016655 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16656echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16657 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16658echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16659 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16660echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16661 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16662echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16663 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16664echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16665 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16666echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016667 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016668## -------------------------------------- ##
16669## Report this to http://bugs.python.org/ ##
16670## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016671_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016673 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016675{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16676echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016677if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016679else
16680 ac_cv_header_kernel_OS_h=$ac_header_preproc
16681fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016682{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16683echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016684
16685fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016686if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016687 cat >>confdefs.h <<\_ACEOF
16688#define WITH_THREAD 1
16689_ACEOF
16690
16691
16692cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016693#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016694_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016695
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016696 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016697else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016699 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16700echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016701if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016703else
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016705LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016707/* confdefs.h. */
16708_ACEOF
16709cat confdefs.h >>conftest.$ac_ext
16710cat >>conftest.$ac_ext <<_ACEOF
16711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
Martin v. Löwiseba40652007-08-30 20:10:57 +000016713/* Override any GCC internal prototype to avoid an error.
16714 Use char because int might match the return type of a GCC
16715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016716#ifdef __cplusplus
16717extern "C"
16718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016719char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016720int
16721main ()
16722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016723return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 ;
16725 return 0;
16726}
16727_ACEOF
16728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729if { (ac_try="$ac_link"
16730case "(($ac_try" in
16731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16732 *) ac_try_echo=$ac_try;;
16733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016737 grep -v '^ *+' conftest.er1 >conftest.err
16738 rm -f conftest.er1
16739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016741 (exit $ac_status); } && {
16742 test -z "$ac_c_werror_flag" ||
16743 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016744 } && test -s conftest$ac_exeext &&
16745 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016749sed 's/^/| /' conftest.$ac_ext >&5
16750
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753
16754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016756LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016757fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016758{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16759echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16760if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016762#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016763_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016764
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016765 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016766 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016767 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016768else
Greg Steinadf63d62000-07-05 10:38:09 +000016769
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016770 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16771echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016772if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016773 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016774else
Martin v. Löwis11437992002-04-12 09:54:03 +000016775 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016776LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016778/* confdefs.h. */
16779_ACEOF
16780cat confdefs.h >>conftest.$ac_ext
16781cat >>conftest.$ac_ext <<_ACEOF
16782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016783
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784/* Override any GCC internal prototype to avoid an error.
16785 Use char because int might match the return type of a GCC
16786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016787#ifdef __cplusplus
16788extern "C"
16789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016790char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016791int
16792main ()
16793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016794return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016795 ;
16796 return 0;
16797}
16798_ACEOF
16799rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800if { (ac_try="$ac_link"
16801case "(($ac_try" in
16802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16803 *) ac_try_echo=$ac_try;;
16804esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016808 grep -v '^ *+' conftest.er1 >conftest.err
16809 rm -f conftest.er1
16810 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016812 (exit $ac_status); } && {
16813 test -z "$ac_c_werror_flag" ||
16814 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016815 } && test -s conftest$ac_exeext &&
16816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016817 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016820sed 's/^/| /' conftest.$ac_ext >&5
16821
Martin v. Löwiseba40652007-08-30 20:10:57 +000016822 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824
16825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016828fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016829{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16830echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16831if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016833#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016834_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016835
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016836 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016837 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016838 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016839else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016840
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016841 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16842echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016843if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016844 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016845else
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016847LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016848cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855/* Override any GCC internal prototype to avoid an error.
16856 Use char because int might match the return type of a GCC
16857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016858#ifdef __cplusplus
16859extern "C"
16860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016861char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016862int
16863main ()
16864{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016865return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016866 ;
16867 return 0;
16868}
16869_ACEOF
16870rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871if { (ac_try="$ac_link"
16872case "(($ac_try" in
16873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16874 *) ac_try_echo=$ac_try;;
16875esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016879 grep -v '^ *+' conftest.er1 >conftest.err
16880 rm -f conftest.er1
16881 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883 (exit $ac_status); } && {
16884 test -z "$ac_c_werror_flag" ||
16885 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016886 } && test -s conftest$ac_exeext &&
16887 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016888 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016891sed 's/^/| /' conftest.$ac_ext >&5
16892
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016895
16896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016899fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016900{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16901echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16902if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016904#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016905_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016906
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016907 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016908 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016909 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016910else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016912 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16913echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016914if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016916else
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016918LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016920/* confdefs.h. */
16921_ACEOF
16922cat confdefs.h >>conftest.$ac_ext
16923cat >>conftest.$ac_ext <<_ACEOF
16924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016925
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926/* Override any GCC internal prototype to avoid an error.
16927 Use char because int might match the return type of a GCC
16928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016929#ifdef __cplusplus
16930extern "C"
16931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016932char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016933int
16934main ()
16935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942if { (ac_try="$ac_link"
16943case "(($ac_try" in
16944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16945 *) ac_try_echo=$ac_try;;
16946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016950 grep -v '^ *+' conftest.er1 >conftest.err
16951 rm -f conftest.er1
16952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954 (exit $ac_status); } && {
16955 test -z "$ac_c_werror_flag" ||
16956 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016957 } && test -s conftest$ac_exeext &&
16958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016962sed 's/^/| /' conftest.$ac_ext >&5
16963
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016966
16967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016969LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016970fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016971{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16972echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16973if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016974 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016975#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016976_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016977
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016978 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016979 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016980 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016981else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016982
Martin v. Löwis130fb172001-07-19 11:00:41 +000016983 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016984fi
16985
Guido van Rossum627b2d71993-12-24 10:39:16 +000016986
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016987fi
16988
Guido van Rossum0be3e491997-05-22 20:33:33 +000016989fi
16990
Guido van Rossum49545951997-12-02 19:28:29 +000016991fi
16992
Guido van Rossumb93a8621998-05-07 13:27:32 +000016993fi
16994
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016995
Michael W. Hudson54241132001-12-07 15:38:26 +000016996fi
16997
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016998
16999fi
17000
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017002
17003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017005fi
17006
Martin v. Löwis11437992002-04-12 09:54:03 +000017007fi
17008
17009
17010fi
17011
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017012
Michael W. Hudson54241132001-12-07 15:38:26 +000017013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017014 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17015echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017016if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017018else
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017020LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017022/* confdefs.h. */
17023_ACEOF
17024cat confdefs.h >>conftest.$ac_ext
17025cat >>conftest.$ac_ext <<_ACEOF
17026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
Martin v. Löwiseba40652007-08-30 20:10:57 +000017028/* Override any GCC internal prototype to avoid an error.
17029 Use char because int might match the return type of a GCC
17030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017031#ifdef __cplusplus
17032extern "C"
17033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017034char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017035int
17036main ()
17037{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 ;
17040 return 0;
17041}
17042_ACEOF
17043rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044if { (ac_try="$ac_link"
17045case "(($ac_try" in
17046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17047 *) ac_try_echo=$ac_try;;
17048esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017050 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017052 grep -v '^ *+' conftest.er1 >conftest.err
17053 rm -f conftest.er1
17054 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017056 (exit $ac_status); } && {
17057 test -z "$ac_c_werror_flag" ||
17058 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017059 } && test -s conftest$ac_exeext &&
17060 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017061 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017064sed 's/^/| /' conftest.$ac_ext >&5
17065
Martin v. Löwiseba40652007-08-30 20:10:57 +000017066 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017068
17069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017071LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017073{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17074echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17075if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017077#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017078_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017079
Martin v. Löwis130fb172001-07-19 11:00:41 +000017080 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017081 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017082 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017083fi
17084
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017085
Neal Norwitza978ab02002-11-02 16:58:05 +000017086 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017087 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17088echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017089if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017091else
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017093LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017095/* confdefs.h. */
17096_ACEOF
17097cat confdefs.h >>conftest.$ac_ext
17098cat >>conftest.$ac_ext <<_ACEOF
17099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017100
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101/* Override any GCC internal prototype to avoid an error.
17102 Use char because int might match the return type of a GCC
17103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017104#ifdef __cplusplus
17105extern "C"
17106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017107char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017108int
17109main ()
17110{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 ;
17113 return 0;
17114}
17115_ACEOF
17116rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117if { (ac_try="$ac_link"
17118case "(($ac_try" in
17119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17120 *) ac_try_echo=$ac_try;;
17121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017125 grep -v '^ *+' conftest.er1 >conftest.err
17126 rm -f conftest.er1
17127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017129 (exit $ac_status); } && {
17130 test -z "$ac_c_werror_flag" ||
17131 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017132 } && test -s conftest$ac_exeext &&
17133 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017134 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017137sed 's/^/| /' conftest.$ac_ext >&5
17138
Martin v. Löwiseba40652007-08-30 20:10:57 +000017139 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017141
17142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017145fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017146{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17147echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17148if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017150#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017152
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017153 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017154 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017155 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017156fi
17157
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017158 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017159
Martin v. Löwis130fb172001-07-19 11:00:41 +000017160 if test "$USE_THREAD_MODULE" != "#"
17161 then
17162 # If the above checks didn't disable threads, (at least) OSF1
17163 # needs this '-threads' argument during linking.
17164 case $ac_sys_system in
17165 OSF1) LDLAST=-threads;;
17166 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017167 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017168fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017169
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017170if test "$posix_threads" = "yes"; then
17171 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017172
17173cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017174#define _POSIX_THREADS 1
17175_ACEOF
17176
17177 fi
17178
17179 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17180 case $ac_sys_system/$ac_sys_release in
17181 SunOS/5.6)
17182cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017183#define HAVE_PTHREAD_DESTRUCTOR 1
17184_ACEOF
17185
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017186 ;;
17187 SunOS/5.8)
17188cat >>confdefs.h <<\_ACEOF
17189#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17190_ACEOF
17191
17192 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017193 AIX/5)
17194cat >>confdefs.h <<\_ACEOF
17195#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17196_ACEOF
17197
17198 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017199 esac
17200
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017201 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17202echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017203 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017204 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017205else
17206 if test "$cross_compiling" = yes; then
17207 ac_cv_pthread_system_supported=no
17208else
17209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017210/* confdefs.h. */
17211_ACEOF
17212cat confdefs.h >>conftest.$ac_ext
17213cat >>conftest.$ac_ext <<_ACEOF
17214/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017215#include <pthread.h>
17216 void *foo(void *parm) {
17217 return NULL;
17218 }
17219 main() {
17220 pthread_attr_t attr;
17221 pthread_t id;
17222 if (pthread_attr_init(&attr)) exit(-1);
17223 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17224 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17225 exit(0);
17226 }
17227_ACEOF
17228rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229if { (ac_try="$ac_link"
17230case "(($ac_try" in
17231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17232 *) ac_try_echo=$ac_try;;
17233esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017235 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017236 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017239 { (case "(($ac_try" in
17240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17241 *) ac_try_echo=$ac_try;;
17242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017245 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017247 (exit $ac_status); }; }; then
17248 ac_cv_pthread_system_supported=yes
17249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017250 echo "$as_me: program exited with status $ac_status" >&5
17251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017252sed 's/^/| /' conftest.$ac_ext >&5
17253
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017254( exit $ac_status )
17255ac_cv_pthread_system_supported=no
17256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257rm -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 +000017258fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017259
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260
17261
Guido van Rossum627b2d71993-12-24 10:39:16 +000017262fi
17263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017264 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17265echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017266 if test "$ac_cv_pthread_system_supported" = "yes"; then
17267
17268cat >>confdefs.h <<\_ACEOF
17269#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17270_ACEOF
17271
17272 fi
17273
17274for ac_func in pthread_sigmask
17275do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017276as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17277{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17278echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017279if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017280 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017281else
17282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017283/* confdefs.h. */
17284_ACEOF
17285cat confdefs.h >>conftest.$ac_ext
17286cat >>conftest.$ac_ext <<_ACEOF
17287/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017288/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17289 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17290#define $ac_func innocuous_$ac_func
17291
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017292/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017293 which can conflict with char $ac_func (); below.
17294 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017295 <limits.h> exists even on freestanding compilers. */
17296
17297#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017298# include <limits.h>
17299#else
17300# include <assert.h>
17301#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017302
17303#undef $ac_func
17304
Martin v. Löwiseba40652007-08-30 20:10:57 +000017305/* Override any GCC internal prototype to avoid an error.
17306 Use char because int might match the return type of a GCC
17307 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017308#ifdef __cplusplus
17309extern "C"
17310#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017311char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017312/* The GNU C library defines this for functions which it implements
17313 to always fail with ENOSYS. Some functions are actually named
17314 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017315#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017316choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017317#endif
17318
Skip Montanaro6dead952003-09-25 14:50:04 +000017319int
17320main ()
17321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017323 ;
17324 return 0;
17325}
17326_ACEOF
17327rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017328if { (ac_try="$ac_link"
17329case "(($ac_try" in
17330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17331 *) ac_try_echo=$ac_try;;
17332esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017334 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017336 grep -v '^ *+' conftest.er1 >conftest.err
17337 rm -f conftest.er1
17338 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017340 (exit $ac_status); } && {
17341 test -z "$ac_c_werror_flag" ||
17342 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017343 } && test -s conftest$ac_exeext &&
17344 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017345 eval "$as_ac_var=yes"
17346else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017348sed 's/^/| /' conftest.$ac_ext >&5
17349
Martin v. Löwiseba40652007-08-30 20:10:57 +000017350 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017352
17353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017354 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017355fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017356ac_res=`eval echo '${'$as_ac_var'}'`
17357 { echo "$as_me:$LINENO: result: $ac_res" >&5
17358echo "${ECHO_T}$ac_res" >&6; }
17359if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017360 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017361#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017362_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017363 case $ac_sys_system in
17364 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017365
Jason Tishlerfac083d2003-07-22 15:20:49 +000017366cat >>confdefs.h <<\_ACEOF
17367#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17368_ACEOF
17369
17370 ;;
17371 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017372fi
17373done
17374
17375fi
17376
17377
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017378# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017379
17380
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017381{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17382echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017383# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017384if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017385 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017386 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017387 { echo "$as_me:$LINENO: result: no" >&5
17388echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017389 ipv6=no
17390 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017391 *) { echo "$as_me:$LINENO: result: yes" >&5
17392echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017393 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017395_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017396
17397 ipv6=yes
17398 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017399 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017400else
Martin v. Löwis11437992002-04-12 09:54:03 +000017401
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017402 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017403 { echo "$as_me:$LINENO: result: no" >&5
17404echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017405 ipv6=no
17406
17407else
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017409/* confdefs.h. */
17410_ACEOF
17411cat confdefs.h >>conftest.$ac_ext
17412cat >>conftest.$ac_ext <<_ACEOF
17413/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017414 /* AF_INET6 available check */
17415#include <sys/types.h>
17416#include <sys/socket.h>
17417main()
17418{
17419 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17420 exit(1);
17421 else
17422 exit(0);
17423}
17424
Martin v. Löwis11437992002-04-12 09:54:03 +000017425_ACEOF
17426rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017427if { (ac_try="$ac_link"
17428case "(($ac_try" in
17429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17430 *) ac_try_echo=$ac_try;;
17431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017433 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017434 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017437 { (case "(($ac_try" in
17438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17439 *) ac_try_echo=$ac_try;;
17440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017442 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017446 { echo "$as_me:$LINENO: result: yes" >&5
17447echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017448 ipv6=yes
17449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017450 echo "$as_me: program exited with status $ac_status" >&5
17451echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017452sed 's/^/| /' conftest.$ac_ext >&5
17453
Martin v. Löwis11437992002-04-12 09:54:03 +000017454( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017455{ echo "$as_me:$LINENO: result: no" >&5
17456echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017457 ipv6=no
17458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017459rm -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 +000017460fi
17461
Martin v. Löwiseba40652007-08-30 20:10:57 +000017462
17463
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017464if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017465 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17466echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017468/* confdefs.h. */
17469_ACEOF
17470cat confdefs.h >>conftest.$ac_ext
17471cat >>conftest.$ac_ext <<_ACEOF
17472/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017473#include <sys/types.h>
17474#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017475int
17476main ()
17477{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017478struct sockaddr_in6 x;
17479x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017480 ;
17481 return 0;
17482}
17483_ACEOF
17484rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017485if { (ac_try="$ac_compile"
17486case "(($ac_try" in
17487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17488 *) ac_try_echo=$ac_try;;
17489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017493 grep -v '^ *+' conftest.er1 >conftest.err
17494 rm -f conftest.er1
17495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497 (exit $ac_status); } && {
17498 test -z "$ac_c_werror_flag" ||
17499 test ! -s conftest.err
17500 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017501 { echo "$as_me:$LINENO: result: yes" >&5
17502echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017503 ipv6=yes
17504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017506sed 's/^/| /' conftest.$ac_ext >&5
17507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017508 { echo "$as_me:$LINENO: result: no" >&5
17509echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017510 ipv6=no
17511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017512
17513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017514fi
17515
17516if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017517 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017518#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017519_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017520
17521fi
17522
Martin v. Löwiseba40652007-08-30 20:10:57 +000017523fi
17524
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017525
17526ipv6type=unknown
17527ipv6lib=none
17528ipv6trylibc=no
17529
17530if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017531 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17532echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017533 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17534 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017535 case $i in
17536 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017538/* confdefs.h. */
17539_ACEOF
17540cat confdefs.h >>conftest.$ac_ext
17541cat >>conftest.$ac_ext <<_ACEOF
17542/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017543
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017544#include <netinet/in.h>
17545#ifdef IPV6_INRIA_VERSION
17546yes
17547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017548_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017550 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017551 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017552fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017553rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017554
17555 ;;
17556 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017558/* confdefs.h. */
17559_ACEOF
17560cat confdefs.h >>conftest.$ac_ext
17561cat >>conftest.$ac_ext <<_ACEOF
17562/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017563
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017564#include <netinet/in.h>
17565#ifdef __KAME__
17566yes
17567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017568_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017570 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017571 ipv6type=$i;
17572 ipv6lib=inet6
17573 ipv6libdir=/usr/local/v6/lib
17574 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017575fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017576rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017577
17578 ;;
17579 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017581/* confdefs.h. */
17582_ACEOF
17583cat confdefs.h >>conftest.$ac_ext
17584cat >>conftest.$ac_ext <<_ACEOF
17585/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017586
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017587#include <features.h>
17588#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17589yes
17590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017591_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017593 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017594 ipv6type=$i;
17595 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017596fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017597rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017598
17599 ;;
17600 linux-inet6)
17601 if test -d /usr/inet6; then
17602 ipv6type=$i
17603 ipv6lib=inet6
17604 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017605 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017606 fi
17607 ;;
17608 solaris)
17609 if test -f /etc/netconfig; then
17610 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17611 ipv6type=$i
17612 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017613 fi
17614 fi
17615 ;;
17616 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017618/* confdefs.h. */
17619_ACEOF
17620cat confdefs.h >>conftest.$ac_ext
17621cat >>conftest.$ac_ext <<_ACEOF
17622/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017623
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017624#include <sys/param.h>
17625#ifdef _TOSHIBA_INET6
17626yes
17627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017628_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017630 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017631 ipv6type=$i;
17632 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017633 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017634fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017635rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017636
17637 ;;
17638 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017640/* confdefs.h. */
17641_ACEOF
17642cat confdefs.h >>conftest.$ac_ext
17643cat >>conftest.$ac_ext <<_ACEOF
17644/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017645
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017646#include </usr/local/v6/include/sys/v6config.h>
17647#ifdef __V6D__
17648yes
17649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017650_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017652 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017653 ipv6type=$i;
17654 ipv6lib=v6;
17655 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017656 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017657fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017658rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017659
17660 ;;
17661 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017663/* confdefs.h. */
17664_ACEOF
17665cat confdefs.h >>conftest.$ac_ext
17666cat >>conftest.$ac_ext <<_ACEOF
17667/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017669#include <sys/param.h>
17670#ifdef _ZETA_MINAMI_INET6
17671yes
17672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017673_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017675 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017676 ipv6type=$i;
17677 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017678 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017679fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017680rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017681
17682 ;;
17683 esac
17684 if test "$ipv6type" != "unknown"; then
17685 break
17686 fi
17687 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017688 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17689echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017690fi
17691
17692if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17693 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17694 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17695 echo "using lib$ipv6lib"
17696 else
17697 if test $ipv6trylibc = "yes"; then
17698 echo "using libc"
17699 else
17700 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17701 echo "You need to fetch lib$ipv6lib.a from appropriate"
17702 echo 'ipv6 kit and compile beforehand.'
17703 exit 1
17704 fi
17705 fi
17706fi
17707
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017708{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17709echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017710cat >conftest.$ac_ext <<_ACEOF
17711/* confdefs.h. */
17712_ACEOF
17713cat confdefs.h >>conftest.$ac_ext
17714cat >>conftest.$ac_ext <<_ACEOF
17715/* end confdefs.h. */
17716#include <Carbon/Carbon.h>
17717int
17718main ()
17719{
17720FSIORefNum fRef = 0
17721 ;
17722 return 0;
17723}
17724_ACEOF
17725rm -f conftest.$ac_objext
17726if { (ac_try="$ac_compile"
17727case "(($ac_try" in
17728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17729 *) ac_try_echo=$ac_try;;
17730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017732 (eval "$ac_compile") 2>conftest.er1
17733 ac_status=$?
17734 grep -v '^ *+' conftest.er1 >conftest.err
17735 rm -f conftest.er1
17736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017738 (exit $ac_status); } && {
17739 test -z "$ac_c_werror_flag" ||
17740 test ! -s conftest.err
17741 } && test -s conftest.$ac_objext; then
17742
17743cat >>confdefs.h <<\_ACEOF
17744#define HAVE_OSX105_SDK 1
17745_ACEOF
17746
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017747 { echo "$as_me:$LINENO: result: yes" >&5
17748echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017750 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017751sed 's/^/| /' conftest.$ac_ext >&5
17752
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017753 { echo "$as_me:$LINENO: result: no" >&5
17754echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017755
17756fi
17757
17758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17759
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017760# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017761{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17762echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017763
Martin v. Löwiseba40652007-08-30 20:10:57 +000017764# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017765if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017766 withval=$with_doc_strings;
17767fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017768
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017769
17770if test -z "$with_doc_strings"
17771then with_doc_strings="yes"
17772fi
17773if test "$with_doc_strings" != "no"
17774then
17775
17776cat >>confdefs.h <<\_ACEOF
17777#define WITH_DOC_STRINGS 1
17778_ACEOF
17779
17780fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017781{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17782echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017783
Neil Schemenauera35c6882001-02-27 04:45:05 +000017784# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017785{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17786echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017787
Martin v. Löwiseba40652007-08-30 20:10:57 +000017788# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017789if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017790 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017791if test "$withval" != no
17792then
17793
17794cat >>confdefs.h <<\_ACEOF
17795#define WITH_TSC 1
17796_ACEOF
17797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017798 { echo "$as_me:$LINENO: result: yes" >&5
17799echo "${ECHO_T}yes" >&6; }
17800else { echo "$as_me:$LINENO: result: no" >&5
17801echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017802fi
17803else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017804 { echo "$as_me:$LINENO: result: no" >&5
17805echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806fi
17807
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017808
17809# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017810{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17811echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017812
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017814if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017815 withval=$with_pymalloc;
17816fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017817
Neil Schemenauera35c6882001-02-27 04:45:05 +000017818
Neil Schemenauer16c22972002-03-22 15:34:49 +000017819if test -z "$with_pymalloc"
17820then with_pymalloc="yes"
17821fi
17822if test "$with_pymalloc" != "no"
17823then
Martin v. Löwis11437992002-04-12 09:54:03 +000017824
17825cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017826#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017827_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017828
17829fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017830{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17831echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017832
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017833# Check for Valgrind support
17834{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17835echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17836
17837# Check whether --with-valgrind was given.
17838if test "${with_valgrind+set}" = set; then
17839 withval=$with_valgrind;
17840else
17841 with_valgrind=no
17842fi
17843
17844{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17845echo "${ECHO_T}$with_valgrind" >&6; }
17846if test "$with_valgrind" != no; then
17847 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17848 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17849echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17850if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17851 echo $ECHO_N "(cached) $ECHO_C" >&6
17852fi
17853{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17854echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17855else
17856 # Is the header compilable?
17857{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17858echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17859cat >conftest.$ac_ext <<_ACEOF
17860/* confdefs.h. */
17861_ACEOF
17862cat confdefs.h >>conftest.$ac_ext
17863cat >>conftest.$ac_ext <<_ACEOF
17864/* end confdefs.h. */
17865$ac_includes_default
17866#include <valgrind/valgrind.h>
17867_ACEOF
17868rm -f conftest.$ac_objext
17869if { (ac_try="$ac_compile"
17870case "(($ac_try" in
17871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872 *) ac_try_echo=$ac_try;;
17873esac
17874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17875 (eval "$ac_compile") 2>conftest.er1
17876 ac_status=$?
17877 grep -v '^ *+' conftest.er1 >conftest.err
17878 rm -f conftest.er1
17879 cat conftest.err >&5
17880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17881 (exit $ac_status); } && {
17882 test -z "$ac_c_werror_flag" ||
17883 test ! -s conftest.err
17884 } && test -s conftest.$ac_objext; then
17885 ac_header_compiler=yes
17886else
17887 echo "$as_me: failed program was:" >&5
17888sed 's/^/| /' conftest.$ac_ext >&5
17889
17890 ac_header_compiler=no
17891fi
17892
17893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17894{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17895echo "${ECHO_T}$ac_header_compiler" >&6; }
17896
17897# Is the header present?
17898{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17899echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17900cat >conftest.$ac_ext <<_ACEOF
17901/* confdefs.h. */
17902_ACEOF
17903cat confdefs.h >>conftest.$ac_ext
17904cat >>conftest.$ac_ext <<_ACEOF
17905/* end confdefs.h. */
17906#include <valgrind/valgrind.h>
17907_ACEOF
17908if { (ac_try="$ac_cpp conftest.$ac_ext"
17909case "(($ac_try" in
17910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17911 *) ac_try_echo=$ac_try;;
17912esac
17913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17914 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17915 ac_status=$?
17916 grep -v '^ *+' conftest.er1 >conftest.err
17917 rm -f conftest.er1
17918 cat conftest.err >&5
17919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17920 (exit $ac_status); } >/dev/null && {
17921 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17922 test ! -s conftest.err
17923 }; then
17924 ac_header_preproc=yes
17925else
17926 echo "$as_me: failed program was:" >&5
17927sed 's/^/| /' conftest.$ac_ext >&5
17928
17929 ac_header_preproc=no
17930fi
17931
17932rm -f conftest.err conftest.$ac_ext
17933{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17934echo "${ECHO_T}$ac_header_preproc" >&6; }
17935
17936# So? What about this header?
17937case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17938 yes:no: )
17939 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17940echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17941 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17942echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17943 ac_header_preproc=yes
17944 ;;
17945 no:yes:* )
17946 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17947echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17948 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17949echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17950 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17951echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17952 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17953echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17954 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17955echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17956 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17957echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17958 ( cat <<\_ASBOX
17959## -------------------------------------- ##
17960## Report this to http://bugs.python.org/ ##
17961## -------------------------------------- ##
17962_ASBOX
17963 ) | sed "s/^/$as_me: WARNING: /" >&2
17964 ;;
17965esac
17966{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17967echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17968if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17969 echo $ECHO_N "(cached) $ECHO_C" >&6
17970else
17971 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17972fi
17973{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17974echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17975
17976fi
17977if test $ac_cv_header_valgrind_valgrind_h = yes; then
17978
17979cat >>confdefs.h <<\_ACEOF
17980#define WITH_VALGRIND 1
17981_ACEOF
17982
17983else
17984 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17985echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17986 { (exit 1); exit 1; }; }
17987
17988fi
17989
17990
17991fi
17992
Barry Warsawef82cd72000-06-30 16:21:01 +000017993# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017994{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17995echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017996
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017998if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018000if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018001then
18002
18003cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018004#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018005_ACEOF
18006
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018007 { echo "$as_me:$LINENO: result: yes" >&5
18008echo "${ECHO_T}yes" >&6; }
18009else { echo "$as_me:$LINENO: result: no" >&5
18010echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018011fi
18012else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018013 { echo "$as_me:$LINENO: result: no" >&5
18014echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018015fi
18016
Barry Warsawef82cd72000-06-30 16:21:01 +000018017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018018# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018019
Guido van Rossum98935bf2001-09-05 19:13:16 +000018020DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018021
Guido van Rossume97ee181999-12-20 21:27:22 +000018022# the dlopen() function means we might want to use dynload_shlib.o. some
18023# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018024
Thomas Wouters3a584202000-08-05 23:28:51 +000018025for ac_func in dlopen
18026do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18028{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018030if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018031 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018032else
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018034/* confdefs.h. */
18035_ACEOF
18036cat confdefs.h >>conftest.$ac_ext
18037cat >>conftest.$ac_ext <<_ACEOF
18038/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018039/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18040 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18041#define $ac_func innocuous_$ac_func
18042
Guido van Rossume97ee181999-12-20 21:27:22 +000018043/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018044 which can conflict with char $ac_func (); below.
18045 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018046 <limits.h> exists even on freestanding compilers. */
18047
18048#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018049# include <limits.h>
18050#else
18051# include <assert.h>
18052#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018053
18054#undef $ac_func
18055
Martin v. Löwiseba40652007-08-30 20:10:57 +000018056/* Override any GCC internal prototype to avoid an error.
18057 Use char because int might match the return type of a GCC
18058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018059#ifdef __cplusplus
18060extern "C"
18061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018062char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018063/* The GNU C library defines this for functions which it implements
18064 to always fail with ENOSYS. Some functions are actually named
18065 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018066#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018067choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018068#endif
18069
Skip Montanaro6dead952003-09-25 14:50:04 +000018070int
18071main ()
18072{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018073return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018074 ;
18075 return 0;
18076}
18077_ACEOF
18078rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018079if { (ac_try="$ac_link"
18080case "(($ac_try" in
18081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18082 *) ac_try_echo=$ac_try;;
18083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018085 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018087 grep -v '^ *+' conftest.er1 >conftest.err
18088 rm -f conftest.er1
18089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018091 (exit $ac_status); } && {
18092 test -z "$ac_c_werror_flag" ||
18093 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018094 } && test -s conftest$ac_exeext &&
18095 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018096 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018099sed 's/^/| /' conftest.$ac_ext >&5
18100
Martin v. Löwiseba40652007-08-30 20:10:57 +000018101 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018103
18104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018105 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018106fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018107ac_res=`eval echo '${'$as_ac_var'}'`
18108 { echo "$as_me:$LINENO: result: $ac_res" >&5
18109echo "${ECHO_T}$ac_res" >&6; }
18110if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018111 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018113_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018114
Guido van Rossume97ee181999-12-20 21:27:22 +000018115fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018116done
Guido van Rossume97ee181999-12-20 21:27:22 +000018117
Michael W. Hudson54241132001-12-07 15:38:26 +000018118
Guido van Rossume97ee181999-12-20 21:27:22 +000018119# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18120# loading of modules.
18121
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018122{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18123echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018124if test -z "$DYNLOADFILE"
18125then
18126 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018127 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18128 if test "$ac_cv_func_dlopen" = yes
18129 then DYNLOADFILE="dynload_shlib.o"
18130 else DYNLOADFILE="dynload_aix.o"
18131 fi
18132 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018133 BeOS*) DYNLOADFILE="dynload_beos.o";;
18134 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018135 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18136 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018137 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018138 *)
18139 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18140 # out any dynamic loading
18141 if test "$ac_cv_func_dlopen" = yes
18142 then DYNLOADFILE="dynload_shlib.o"
18143 else DYNLOADFILE="dynload_stub.o"
18144 fi
18145 ;;
18146 esac
18147fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018148{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18149echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018150if test "$DYNLOADFILE" != "dynload_stub.o"
18151then
Martin v. Löwis11437992002-04-12 09:54:03 +000018152
18153cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018154#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018155_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018156
18157fi
18158
Neil Schemenauer4e425612001-06-19 15:44:15 +000018159# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18160
Michael W. Hudson54241132001-12-07 15:38:26 +000018161
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018162{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18163echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018164if test -z "$MACHDEP_OBJS"
18165then
Jack Jansene578a632001-08-15 01:27:14 +000018166 MACHDEP_OBJS=$extra_machdep_objs
18167else
18168 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018170{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18171echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018172
Guido van Rossum627b2d71993-12-24 10:39:16 +000018173# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
Martin v. Löwisd6320502004-08-12 13:45:08 +000018245
Martin v. Löwisc3001752005-01-23 09:27:24 +000018246
18247
Neal Norwitz05a45592006-03-20 06:30:08 +000018248
18249
Martin v. Löwis382abef2007-02-19 10:55:19 +000018250
18251
Christian Heimes36281872007-11-30 21:11:28 +000018252
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018253
18254
Jesse Noller355b1262009-04-02 00:03:28 +000018255
18256
18257
18258
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018272
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018273for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18274 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018275 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018276 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018277 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018278 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018279 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018280 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18281 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018282 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018283 setlocale setregid setreuid setresuid setresgid \
18284 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018285 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018286 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018287 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018288do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018289as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18290{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18291echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018292if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018293 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018294else
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018296/* confdefs.h. */
18297_ACEOF
18298cat confdefs.h >>conftest.$ac_ext
18299cat >>conftest.$ac_ext <<_ACEOF
18300/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018301/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18302 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18303#define $ac_func innocuous_$ac_func
18304
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018305/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018306 which can conflict with char $ac_func (); below.
18307 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018308 <limits.h> exists even on freestanding compilers. */
18309
18310#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018311# include <limits.h>
18312#else
18313# include <assert.h>
18314#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018315
18316#undef $ac_func
18317
Martin v. Löwiseba40652007-08-30 20:10:57 +000018318/* Override any GCC internal prototype to avoid an error.
18319 Use char because int might match the return type of a GCC
18320 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018321#ifdef __cplusplus
18322extern "C"
18323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018324char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018325/* The GNU C library defines this for functions which it implements
18326 to always fail with ENOSYS. Some functions are actually named
18327 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018328#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018329choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018330#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018331
Skip Montanaro6dead952003-09-25 14:50:04 +000018332int
18333main ()
18334{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018335return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 ;
18337 return 0;
18338}
18339_ACEOF
18340rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018341if { (ac_try="$ac_link"
18342case "(($ac_try" in
18343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18344 *) ac_try_echo=$ac_try;;
18345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018349 grep -v '^ *+' conftest.er1 >conftest.err
18350 rm -f conftest.er1
18351 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018353 (exit $ac_status); } && {
18354 test -z "$ac_c_werror_flag" ||
18355 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018356 } && test -s conftest$ac_exeext &&
18357 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018358 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018359else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018361sed 's/^/| /' conftest.$ac_ext >&5
18362
Martin v. Löwiseba40652007-08-30 20:10:57 +000018363 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018365
18366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018367 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018368fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018369ac_res=`eval echo '${'$as_ac_var'}'`
18370 { echo "$as_me:$LINENO: result: $ac_res" >&5
18371echo "${ECHO_T}$ac_res" >&6; }
18372if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018374#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018375_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018376
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018377fi
18378done
18379
Michael W. Hudson54241132001-12-07 15:38:26 +000018380
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018381# For some functions, having a definition is not sufficient, since
18382# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018383{ echo "$as_me:$LINENO: checking for chroot" >&5
18384echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018386/* confdefs.h. */
18387_ACEOF
18388cat confdefs.h >>conftest.$ac_ext
18389cat >>conftest.$ac_ext <<_ACEOF
18390/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018391#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018392int
18393main ()
18394{
18395void *x=chroot
18396 ;
18397 return 0;
18398}
18399_ACEOF
18400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401if { (ac_try="$ac_compile"
18402case "(($ac_try" in
18403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18404 *) ac_try_echo=$ac_try;;
18405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018409 grep -v '^ *+' conftest.er1 >conftest.err
18410 rm -f conftest.er1
18411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018413 (exit $ac_status); } && {
18414 test -z "$ac_c_werror_flag" ||
18415 test ! -s conftest.err
18416 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018417
18418cat >>confdefs.h <<\_ACEOF
18419#define HAVE_CHROOT 1
18420_ACEOF
18421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018422 { echo "$as_me:$LINENO: result: yes" >&5
18423echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018426sed 's/^/| /' conftest.$ac_ext >&5
18427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018428 { echo "$as_me:$LINENO: result: no" >&5
18429echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018430
18431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432
18433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018434{ echo "$as_me:$LINENO: checking for link" >&5
18435echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018437/* confdefs.h. */
18438_ACEOF
18439cat confdefs.h >>conftest.$ac_ext
18440cat >>conftest.$ac_ext <<_ACEOF
18441/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018442#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018443int
18444main ()
18445{
18446void *x=link
18447 ;
18448 return 0;
18449}
18450_ACEOF
18451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452if { (ac_try="$ac_compile"
18453case "(($ac_try" in
18454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18455 *) ac_try_echo=$ac_try;;
18456esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018460 grep -v '^ *+' conftest.er1 >conftest.err
18461 rm -f conftest.er1
18462 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018464 (exit $ac_status); } && {
18465 test -z "$ac_c_werror_flag" ||
18466 test ! -s conftest.err
18467 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018468
18469cat >>confdefs.h <<\_ACEOF
18470#define HAVE_LINK 1
18471_ACEOF
18472
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018473 { echo "$as_me:$LINENO: result: yes" >&5
18474echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018477sed 's/^/| /' conftest.$ac_ext >&5
18478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018479 { echo "$as_me:$LINENO: result: no" >&5
18480echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018481
18482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018483
18484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018485{ echo "$as_me:$LINENO: checking for symlink" >&5
18486echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018488/* confdefs.h. */
18489_ACEOF
18490cat confdefs.h >>conftest.$ac_ext
18491cat >>conftest.$ac_ext <<_ACEOF
18492/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018493#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018494int
18495main ()
18496{
18497void *x=symlink
18498 ;
18499 return 0;
18500}
18501_ACEOF
18502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018503if { (ac_try="$ac_compile"
18504case "(($ac_try" in
18505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18506 *) ac_try_echo=$ac_try;;
18507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018511 grep -v '^ *+' conftest.er1 >conftest.err
18512 rm -f conftest.er1
18513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018515 (exit $ac_status); } && {
18516 test -z "$ac_c_werror_flag" ||
18517 test ! -s conftest.err
18518 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018519
18520cat >>confdefs.h <<\_ACEOF
18521#define HAVE_SYMLINK 1
18522_ACEOF
18523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018524 { echo "$as_me:$LINENO: result: yes" >&5
18525echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018526else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018528sed 's/^/| /' conftest.$ac_ext >&5
18529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018530 { echo "$as_me:$LINENO: result: no" >&5
18531echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018532
18533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018534
18535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018536{ echo "$as_me:$LINENO: checking for fchdir" >&5
18537echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018539/* confdefs.h. */
18540_ACEOF
18541cat confdefs.h >>conftest.$ac_ext
18542cat >>conftest.$ac_ext <<_ACEOF
18543/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018544#include <unistd.h>
18545int
18546main ()
18547{
18548void *x=fchdir
18549 ;
18550 return 0;
18551}
18552_ACEOF
18553rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554if { (ac_try="$ac_compile"
18555case "(($ac_try" in
18556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18557 *) ac_try_echo=$ac_try;;
18558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018562 grep -v '^ *+' conftest.er1 >conftest.err
18563 rm -f conftest.er1
18564 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018566 (exit $ac_status); } && {
18567 test -z "$ac_c_werror_flag" ||
18568 test ! -s conftest.err
18569 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018570
18571cat >>confdefs.h <<\_ACEOF
18572#define HAVE_FCHDIR 1
18573_ACEOF
18574
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018575 { echo "$as_me:$LINENO: result: yes" >&5
18576echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018579sed 's/^/| /' conftest.$ac_ext >&5
18580
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018581 { echo "$as_me:$LINENO: result: no" >&5
18582echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018583
18584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018585
18586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018587{ echo "$as_me:$LINENO: checking for fsync" >&5
18588echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018590/* confdefs.h. */
18591_ACEOF
18592cat confdefs.h >>conftest.$ac_ext
18593cat >>conftest.$ac_ext <<_ACEOF
18594/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018595#include <unistd.h>
18596int
18597main ()
18598{
18599void *x=fsync
18600 ;
18601 return 0;
18602}
18603_ACEOF
18604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018605if { (ac_try="$ac_compile"
18606case "(($ac_try" in
18607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18608 *) ac_try_echo=$ac_try;;
18609esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018613 grep -v '^ *+' conftest.er1 >conftest.err
18614 rm -f conftest.er1
18615 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018617 (exit $ac_status); } && {
18618 test -z "$ac_c_werror_flag" ||
18619 test ! -s conftest.err
18620 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018621
18622cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018623#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018624_ACEOF
18625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018626 { echo "$as_me:$LINENO: result: yes" >&5
18627echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018630sed 's/^/| /' conftest.$ac_ext >&5
18631
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018632 { echo "$as_me:$LINENO: result: no" >&5
18633echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018634
18635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018636
18637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018638{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18639echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018641/* confdefs.h. */
18642_ACEOF
18643cat confdefs.h >>conftest.$ac_ext
18644cat >>conftest.$ac_ext <<_ACEOF
18645/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018646#include <unistd.h>
18647int
18648main ()
18649{
18650void *x=fdatasync
18651 ;
18652 return 0;
18653}
18654_ACEOF
18655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656if { (ac_try="$ac_compile"
18657case "(($ac_try" in
18658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18659 *) ac_try_echo=$ac_try;;
18660esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018662 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018664 grep -v '^ *+' conftest.er1 >conftest.err
18665 rm -f conftest.er1
18666 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018668 (exit $ac_status); } && {
18669 test -z "$ac_c_werror_flag" ||
18670 test ! -s conftest.err
18671 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018672
18673cat >>confdefs.h <<\_ACEOF
18674#define HAVE_FDATASYNC 1
18675_ACEOF
18676
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018677 { echo "$as_me:$LINENO: result: yes" >&5
18678echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018681sed 's/^/| /' conftest.$ac_ext >&5
18682
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018683 { echo "$as_me:$LINENO: result: no" >&5
18684echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018685
18686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018687
18688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018689{ echo "$as_me:$LINENO: checking for epoll" >&5
18690echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018691cat >conftest.$ac_ext <<_ACEOF
18692/* confdefs.h. */
18693_ACEOF
18694cat confdefs.h >>conftest.$ac_ext
18695cat >>conftest.$ac_ext <<_ACEOF
18696/* end confdefs.h. */
18697#include <sys/epoll.h>
18698int
18699main ()
18700{
18701void *x=epoll_create
18702 ;
18703 return 0;
18704}
18705_ACEOF
18706rm -f conftest.$ac_objext
18707if { (ac_try="$ac_compile"
18708case "(($ac_try" in
18709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18710 *) ac_try_echo=$ac_try;;
18711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018713 (eval "$ac_compile") 2>conftest.er1
18714 ac_status=$?
18715 grep -v '^ *+' conftest.er1 >conftest.err
18716 rm -f conftest.er1
18717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018719 (exit $ac_status); } && {
18720 test -z "$ac_c_werror_flag" ||
18721 test ! -s conftest.err
18722 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018723
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018724cat >>confdefs.h <<\_ACEOF
18725#define HAVE_EPOLL 1
18726_ACEOF
18727
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018728 { echo "$as_me:$LINENO: result: yes" >&5
18729echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018730else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018731 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018732sed 's/^/| /' conftest.$ac_ext >&5
18733
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018734 { echo "$as_me:$LINENO: result: no" >&5
18735echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018736
18737fi
18738
18739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018740{ echo "$as_me:$LINENO: checking for kqueue" >&5
18741echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018742cat >conftest.$ac_ext <<_ACEOF
18743/* confdefs.h. */
18744_ACEOF
18745cat confdefs.h >>conftest.$ac_ext
18746cat >>conftest.$ac_ext <<_ACEOF
18747/* end confdefs.h. */
18748
18749#include <sys/types.h>
18750#include <sys/event.h>
18751
18752int
18753main ()
18754{
18755int x=kqueue()
18756 ;
18757 return 0;
18758}
18759_ACEOF
18760rm -f conftest.$ac_objext
18761if { (ac_try="$ac_compile"
18762case "(($ac_try" in
18763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18764 *) ac_try_echo=$ac_try;;
18765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018767 (eval "$ac_compile") 2>conftest.er1
18768 ac_status=$?
18769 grep -v '^ *+' conftest.er1 >conftest.err
18770 rm -f conftest.er1
18771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018773 (exit $ac_status); } && {
18774 test -z "$ac_c_werror_flag" ||
18775 test ! -s conftest.err
18776 } && test -s conftest.$ac_objext; then
18777
18778cat >>confdefs.h <<\_ACEOF
18779#define HAVE_KQUEUE 1
18780_ACEOF
18781
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018782 { echo "$as_me:$LINENO: result: yes" >&5
18783echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018784else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018785 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018786sed 's/^/| /' conftest.$ac_ext >&5
18787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018788 { echo "$as_me:$LINENO: result: no" >&5
18789echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018790
18791fi
18792
18793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018794# On some systems (eg. FreeBSD 5), we would find a definition of the
18795# functions ctermid_r, setgroups in the library, but no prototype
18796# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18797# address to avoid compiler warnings and potential miscompilations
18798# because of the missing prototypes.
18799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018800{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18801echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018803/* confdefs.h. */
18804_ACEOF
18805cat confdefs.h >>conftest.$ac_ext
18806cat >>conftest.$ac_ext <<_ACEOF
18807/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018808
18809#include "confdefs.h"
18810#include <stdio.h>
18811
Martin v. Löwisd5843682002-11-21 20:41:28 +000018812int
18813main ()
18814{
18815void* p = ctermid_r
18816 ;
18817 return 0;
18818}
18819_ACEOF
18820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018821if { (ac_try="$ac_compile"
18822case "(($ac_try" in
18823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18824 *) ac_try_echo=$ac_try;;
18825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018829 grep -v '^ *+' conftest.er1 >conftest.err
18830 rm -f conftest.er1
18831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018833 (exit $ac_status); } && {
18834 test -z "$ac_c_werror_flag" ||
18835 test ! -s conftest.err
18836 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018837
18838cat >>confdefs.h <<\_ACEOF
18839#define HAVE_CTERMID_R 1
18840_ACEOF
18841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018842 { echo "$as_me:$LINENO: result: yes" >&5
18843echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018846sed 's/^/| /' conftest.$ac_ext >&5
18847
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018848 { echo "$as_me:$LINENO: result: no" >&5
18849echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018850
18851fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018852
Martin v. Löwiseba40652007-08-30 20:10:57 +000018853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18854
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018855{ echo "$as_me:$LINENO: checking for flock" >&5
18856echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018858/* confdefs.h. */
18859_ACEOF
18860cat confdefs.h >>conftest.$ac_ext
18861cat >>conftest.$ac_ext <<_ACEOF
18862/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018863
18864#include "confdefs.h"
18865#include <sys/file.h>
18866
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018867int
18868main ()
18869{
18870void* p = flock
18871 ;
18872 return 0;
18873}
18874_ACEOF
18875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018876if { (ac_try="$ac_compile"
18877case "(($ac_try" in
18878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879 *) ac_try_echo=$ac_try;;
18880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018888 (exit $ac_status); } && {
18889 test -z "$ac_c_werror_flag" ||
18890 test ! -s conftest.err
18891 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018892
18893cat >>confdefs.h <<\_ACEOF
18894#define HAVE_FLOCK 1
18895_ACEOF
18896
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018897 { echo "$as_me:$LINENO: result: yes" >&5
18898echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018901sed 's/^/| /' conftest.$ac_ext >&5
18902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018903 { echo "$as_me:$LINENO: result: no" >&5
18904echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018905
18906fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018907
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018910{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18911echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018913/* confdefs.h. */
18914_ACEOF
18915cat confdefs.h >>conftest.$ac_ext
18916cat >>conftest.$ac_ext <<_ACEOF
18917/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018918
18919#include "confdefs.h"
18920#include <unistd.h>
18921
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018922int
18923main ()
18924{
18925void* p = getpagesize
18926 ;
18927 return 0;
18928}
18929_ACEOF
18930rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931if { (ac_try="$ac_compile"
18932case "(($ac_try" in
18933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18934 *) ac_try_echo=$ac_try;;
18935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018939 grep -v '^ *+' conftest.er1 >conftest.err
18940 rm -f conftest.er1
18941 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943 (exit $ac_status); } && {
18944 test -z "$ac_c_werror_flag" ||
18945 test ! -s conftest.err
18946 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018947
18948cat >>confdefs.h <<\_ACEOF
18949#define HAVE_GETPAGESIZE 1
18950_ACEOF
18951
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018952 { echo "$as_me:$LINENO: result: yes" >&5
18953echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018956sed 's/^/| /' conftest.$ac_ext >&5
18957
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018958 { echo "$as_me:$LINENO: result: no" >&5
18959echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018960
18961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962
18963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018964
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018965for ac_prog in true
18966do
18967 # Extract the first word of "$ac_prog", so it can be a program name with args.
18968set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018969{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18970echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018971if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018973else
18974 if test -n "$TRUE"; then
18975 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18976else
18977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18978for as_dir in $PATH
18979do
18980 IFS=$as_save_IFS
18981 test -z "$as_dir" && as_dir=.
18982 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018983 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 +000018984 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018985 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018986 break 2
18987 fi
18988done
18989done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018990IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018991
18992fi
18993fi
18994TRUE=$ac_cv_prog_TRUE
18995if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018996 { echo "$as_me:$LINENO: result: $TRUE" >&5
18997echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018999 { echo "$as_me:$LINENO: result: no" >&5
19000echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019001fi
19002
Martin v. Löwiseba40652007-08-30 20:10:57 +000019003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019004 test -n "$TRUE" && break
19005done
19006test -n "$TRUE" || TRUE="/bin/true"
19007
19008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019009{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19010echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019011if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019012 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019013else
19014 ac_check_lib_save_LIBS=$LIBS
19015LIBS="-lc $LIBS"
19016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019017/* confdefs.h. */
19018_ACEOF
19019cat confdefs.h >>conftest.$ac_ext
19020cat >>conftest.$ac_ext <<_ACEOF
19021/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019022
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023/* Override any GCC internal prototype to avoid an error.
19024 Use char because int might match the return type of a GCC
19025 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019026#ifdef __cplusplus
19027extern "C"
19028#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019029char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019030int
19031main ()
19032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019033return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019034 ;
19035 return 0;
19036}
19037_ACEOF
19038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019039if { (ac_try="$ac_link"
19040case "(($ac_try" in
19041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19042 *) ac_try_echo=$ac_try;;
19043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019047 grep -v '^ *+' conftest.er1 >conftest.err
19048 rm -f conftest.er1
19049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019051 (exit $ac_status); } && {
19052 test -z "$ac_c_werror_flag" ||
19053 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019054 } && test -s conftest$ac_exeext &&
19055 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019056 ac_cv_lib_c_inet_aton=yes
19057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019059sed 's/^/| /' conftest.$ac_ext >&5
19060
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019063
19064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019066LIBS=$ac_check_lib_save_LIBS
19067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019068{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19069echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19070if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019071 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019072else
19073
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019074{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19075echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019076if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019077 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019078else
19079 ac_check_lib_save_LIBS=$LIBS
19080LIBS="-lresolv $LIBS"
19081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019082/* confdefs.h. */
19083_ACEOF
19084cat confdefs.h >>conftest.$ac_ext
19085cat >>conftest.$ac_ext <<_ACEOF
19086/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019087
Martin v. Löwiseba40652007-08-30 20:10:57 +000019088/* Override any GCC internal prototype to avoid an error.
19089 Use char because int might match the return type of a GCC
19090 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019091#ifdef __cplusplus
19092extern "C"
19093#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019094char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019095int
19096main ()
19097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019098return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019099 ;
19100 return 0;
19101}
19102_ACEOF
19103rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019104if { (ac_try="$ac_link"
19105case "(($ac_try" in
19106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19107 *) ac_try_echo=$ac_try;;
19108esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019112 grep -v '^ *+' conftest.er1 >conftest.err
19113 rm -f conftest.er1
19114 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019116 (exit $ac_status); } && {
19117 test -z "$ac_c_werror_flag" ||
19118 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019119 } && test -s conftest$ac_exeext &&
19120 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019121 ac_cv_lib_resolv_inet_aton=yes
19122else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019124sed 's/^/| /' conftest.$ac_ext >&5
19125
Martin v. Löwiseba40652007-08-30 20:10:57 +000019126 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019128
19129rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019131LIBS=$ac_check_lib_save_LIBS
19132fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019133{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19134echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19135if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019136 cat >>confdefs.h <<_ACEOF
19137#define HAVE_LIBRESOLV 1
19138_ACEOF
19139
19140 LIBS="-lresolv $LIBS"
19141
19142fi
19143
19144
19145fi
19146
19147
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019148# On Tru64, chflags seems to be present, but calling it will
19149# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019150{ echo "$as_me:$LINENO: checking for chflags" >&5
19151echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019152if test "${ac_cv_have_chflags+set}" = set; then
19153 echo $ECHO_N "(cached) $ECHO_C" >&6
19154else
19155 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019156 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019157else
19158 cat >conftest.$ac_ext <<_ACEOF
19159/* confdefs.h. */
19160_ACEOF
19161cat confdefs.h >>conftest.$ac_ext
19162cat >>conftest.$ac_ext <<_ACEOF
19163/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019164[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019165#include <sys/stat.h>
19166#include <unistd.h>
19167int main(int argc, char*argv[])
19168{
19169 if(chflags(argv[0], 0) != 0)
19170 return 1;
19171 return 0;
19172}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019173]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019174_ACEOF
19175rm -f conftest$ac_exeext
19176if { (ac_try="$ac_link"
19177case "(($ac_try" in
19178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19179 *) ac_try_echo=$ac_try;;
19180esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019182 (eval "$ac_link") 2>&5
19183 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019185 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19186 { (case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019191 (eval "$ac_try") 2>&5
19192 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019194 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019195 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019196else
19197 echo "$as_me: program exited with status $ac_status" >&5
19198echo "$as_me: failed program was:" >&5
19199sed 's/^/| /' conftest.$ac_ext >&5
19200
19201( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019202ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019203fi
19204rm -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 +000019205fi
19206
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019207
19208
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019209fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019210{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19211echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019212if test "$ac_cv_have_chflags" = cross ; then
19213 { echo "$as_me:$LINENO: checking for chflags" >&5
19214echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19215if test "${ac_cv_func_chflags+set}" = set; then
19216 echo $ECHO_N "(cached) $ECHO_C" >&6
19217else
19218 cat >conftest.$ac_ext <<_ACEOF
19219/* confdefs.h. */
19220_ACEOF
19221cat confdefs.h >>conftest.$ac_ext
19222cat >>conftest.$ac_ext <<_ACEOF
19223/* end confdefs.h. */
19224/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19225 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19226#define chflags innocuous_chflags
19227
19228/* System header to define __stub macros and hopefully few prototypes,
19229 which can conflict with char chflags (); below.
19230 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19231 <limits.h> exists even on freestanding compilers. */
19232
19233#ifdef __STDC__
19234# include <limits.h>
19235#else
19236# include <assert.h>
19237#endif
19238
19239#undef chflags
19240
19241/* Override any GCC internal prototype to avoid an error.
19242 Use char because int might match the return type of a GCC
19243 builtin and then its argument prototype would still apply. */
19244#ifdef __cplusplus
19245extern "C"
19246#endif
19247char chflags ();
19248/* The GNU C library defines this for functions which it implements
19249 to always fail with ENOSYS. Some functions are actually named
19250 something starting with __ and the normal name is an alias. */
19251#if defined __stub_chflags || defined __stub___chflags
19252choke me
19253#endif
19254
19255int
19256main ()
19257{
19258return chflags ();
19259 ;
19260 return 0;
19261}
19262_ACEOF
19263rm -f conftest.$ac_objext conftest$ac_exeext
19264if { (ac_try="$ac_link"
19265case "(($ac_try" in
19266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19267 *) ac_try_echo=$ac_try;;
19268esac
19269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19270 (eval "$ac_link") 2>conftest.er1
19271 ac_status=$?
19272 grep -v '^ *+' conftest.er1 >conftest.err
19273 rm -f conftest.er1
19274 cat conftest.err >&5
19275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19276 (exit $ac_status); } && {
19277 test -z "$ac_c_werror_flag" ||
19278 test ! -s conftest.err
19279 } && test -s conftest$ac_exeext &&
19280 $as_test_x conftest$ac_exeext; then
19281 ac_cv_func_chflags=yes
19282else
19283 echo "$as_me: failed program was:" >&5
19284sed 's/^/| /' conftest.$ac_ext >&5
19285
19286 ac_cv_func_chflags=no
19287fi
19288
19289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19290 conftest$ac_exeext conftest.$ac_ext
19291fi
19292{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19293echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19294if test $ac_cv_func_chflags = yes; then
19295 ac_cv_have_chflags="yes"
19296else
19297 ac_cv_have_chflags="no"
19298fi
19299
19300fi
19301if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019302
19303cat >>confdefs.h <<\_ACEOF
19304#define HAVE_CHFLAGS 1
19305_ACEOF
19306
19307fi
19308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309{ echo "$as_me:$LINENO: checking for lchflags" >&5
19310echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019311if test "${ac_cv_have_lchflags+set}" = set; then
19312 echo $ECHO_N "(cached) $ECHO_C" >&6
19313else
19314 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019315 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019316else
19317 cat >conftest.$ac_ext <<_ACEOF
19318/* confdefs.h. */
19319_ACEOF
19320cat confdefs.h >>conftest.$ac_ext
19321cat >>conftest.$ac_ext <<_ACEOF
19322/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019323[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019324#include <sys/stat.h>
19325#include <unistd.h>
19326int main(int argc, char*argv[])
19327{
19328 if(lchflags(argv[0], 0) != 0)
19329 return 1;
19330 return 0;
19331}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019332]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019333_ACEOF
19334rm -f conftest$ac_exeext
19335if { (ac_try="$ac_link"
19336case "(($ac_try" in
19337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19338 *) ac_try_echo=$ac_try;;
19339esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019341 (eval "$ac_link") 2>&5
19342 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19345 { (case "(($ac_try" in
19346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19347 *) ac_try_echo=$ac_try;;
19348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019350 (eval "$ac_try") 2>&5
19351 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019353 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019354 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019355else
19356 echo "$as_me: program exited with status $ac_status" >&5
19357echo "$as_me: failed program was:" >&5
19358sed 's/^/| /' conftest.$ac_ext >&5
19359
19360( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019361ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019362fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19364fi
19365
19366
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019367
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019368fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019369{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19370echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019371if test "$ac_cv_have_lchflags" = cross ; then
19372 { echo "$as_me:$LINENO: checking for lchflags" >&5
19373echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19374if test "${ac_cv_func_lchflags+set}" = set; then
19375 echo $ECHO_N "(cached) $ECHO_C" >&6
19376else
19377 cat >conftest.$ac_ext <<_ACEOF
19378/* confdefs.h. */
19379_ACEOF
19380cat confdefs.h >>conftest.$ac_ext
19381cat >>conftest.$ac_ext <<_ACEOF
19382/* end confdefs.h. */
19383/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19385#define lchflags innocuous_lchflags
19386
19387/* System header to define __stub macros and hopefully few prototypes,
19388 which can conflict with char lchflags (); below.
19389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19390 <limits.h> exists even on freestanding compilers. */
19391
19392#ifdef __STDC__
19393# include <limits.h>
19394#else
19395# include <assert.h>
19396#endif
19397
19398#undef lchflags
19399
19400/* Override any GCC internal prototype to avoid an error.
19401 Use char because int might match the return type of a GCC
19402 builtin and then its argument prototype would still apply. */
19403#ifdef __cplusplus
19404extern "C"
19405#endif
19406char lchflags ();
19407/* The GNU C library defines this for functions which it implements
19408 to always fail with ENOSYS. Some functions are actually named
19409 something starting with __ and the normal name is an alias. */
19410#if defined __stub_lchflags || defined __stub___lchflags
19411choke me
19412#endif
19413
19414int
19415main ()
19416{
19417return lchflags ();
19418 ;
19419 return 0;
19420}
19421_ACEOF
19422rm -f conftest.$ac_objext conftest$ac_exeext
19423if { (ac_try="$ac_link"
19424case "(($ac_try" in
19425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19426 *) ac_try_echo=$ac_try;;
19427esac
19428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19429 (eval "$ac_link") 2>conftest.er1
19430 ac_status=$?
19431 grep -v '^ *+' conftest.er1 >conftest.err
19432 rm -f conftest.er1
19433 cat conftest.err >&5
19434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19435 (exit $ac_status); } && {
19436 test -z "$ac_c_werror_flag" ||
19437 test ! -s conftest.err
19438 } && test -s conftest$ac_exeext &&
19439 $as_test_x conftest$ac_exeext; then
19440 ac_cv_func_lchflags=yes
19441else
19442 echo "$as_me: failed program was:" >&5
19443sed 's/^/| /' conftest.$ac_ext >&5
19444
19445 ac_cv_func_lchflags=no
19446fi
19447
19448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19449 conftest$ac_exeext conftest.$ac_ext
19450fi
19451{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19452echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19453if test $ac_cv_func_lchflags = yes; then
19454 ac_cv_have_lchflags="yes"
19455else
19456 ac_cv_have_lchflags="no"
19457fi
19458
19459fi
19460if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019461
19462cat >>confdefs.h <<\_ACEOF
19463#define HAVE_LCHFLAGS 1
19464_ACEOF
19465
19466fi
19467
Ronald Oussorenf8752642006-07-06 10:13:35 +000019468case $ac_sys_system/$ac_sys_release in
19469Darwin/*)
19470 _CUR_CFLAGS="${CFLAGS}"
19471 _CUR_LDFLAGS="${LDFLAGS}"
19472 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19473 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19474 ;;
19475esac
19476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019477{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19478echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019479if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019480 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019481else
19482 ac_check_lib_save_LIBS=$LIBS
19483LIBS="-lz $LIBS"
19484cat >conftest.$ac_ext <<_ACEOF
19485/* confdefs.h. */
19486_ACEOF
19487cat confdefs.h >>conftest.$ac_ext
19488cat >>conftest.$ac_ext <<_ACEOF
19489/* end confdefs.h. */
19490
Martin v. Löwiseba40652007-08-30 20:10:57 +000019491/* Override any GCC internal prototype to avoid an error.
19492 Use char because int might match the return type of a GCC
19493 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019494#ifdef __cplusplus
19495extern "C"
19496#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019497char inflateCopy ();
19498int
19499main ()
19500{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019502 ;
19503 return 0;
19504}
19505_ACEOF
19506rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019507if { (ac_try="$ac_link"
19508case "(($ac_try" in
19509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19510 *) ac_try_echo=$ac_try;;
19511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019513 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019514 ac_status=$?
19515 grep -v '^ *+' conftest.er1 >conftest.err
19516 rm -f conftest.er1
19517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019519 (exit $ac_status); } && {
19520 test -z "$ac_c_werror_flag" ||
19521 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019522 } && test -s conftest$ac_exeext &&
19523 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019524 ac_cv_lib_z_inflateCopy=yes
19525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019526 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019527sed 's/^/| /' conftest.$ac_ext >&5
19528
Martin v. Löwiseba40652007-08-30 20:10:57 +000019529 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019531
19532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019533 conftest$ac_exeext conftest.$ac_ext
19534LIBS=$ac_check_lib_save_LIBS
19535fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019536{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19537echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19538if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019539
19540cat >>confdefs.h <<\_ACEOF
19541#define HAVE_ZLIB_COPY 1
19542_ACEOF
19543
19544fi
19545
19546
Ronald Oussorenf8752642006-07-06 10:13:35 +000019547case $ac_sys_system/$ac_sys_release in
19548Darwin/*)
19549 CFLAGS="${_CUR_CFLAGS}"
19550 LDFLAGS="${_CUR_LDFLAGS}"
19551 ;;
19552esac
19553
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019554{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19555echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019557/* confdefs.h. */
19558_ACEOF
19559cat confdefs.h >>conftest.$ac_ext
19560cat >>conftest.$ac_ext <<_ACEOF
19561/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019562
19563#include "confdefs.h"
19564#include <netdb.h>
19565
Martin v. Löwise9416172003-05-03 10:12:45 +000019566int
19567main ()
19568{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019569void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019570 ;
19571 return 0;
19572}
19573_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019574rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019575if { (ac_try="$ac_link"
19576case "(($ac_try" in
19577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19578 *) ac_try_echo=$ac_try;;
19579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019581 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019583 grep -v '^ *+' conftest.er1 >conftest.err
19584 rm -f conftest.er1
19585 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019587 (exit $ac_status); } && {
19588 test -z "$ac_c_werror_flag" ||
19589 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019590 } && test -s conftest$ac_exeext &&
19591 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019592
19593cat >>confdefs.h <<\_ACEOF
19594#define HAVE_HSTRERROR 1
19595_ACEOF
19596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019597 { echo "$as_me:$LINENO: result: yes" >&5
19598echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019599else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019601sed 's/^/| /' conftest.$ac_ext >&5
19602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019603 { echo "$as_me:$LINENO: result: no" >&5
19604echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019605
19606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019607
19608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019609 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019611{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19612echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019614/* confdefs.h. */
19615_ACEOF
19616cat confdefs.h >>conftest.$ac_ext
19617cat >>conftest.$ac_ext <<_ACEOF
19618/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019619
19620#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019621#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019622#include <sys/socket.h>
19623#include <netinet/in.h>
19624#include <arpa/inet.h>
19625
Martin v. Löwise9416172003-05-03 10:12:45 +000019626int
19627main ()
19628{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019629void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019630 ;
19631 return 0;
19632}
19633_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019634rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635if { (ac_try="$ac_link"
19636case "(($ac_try" in
19637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19638 *) ac_try_echo=$ac_try;;
19639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019641 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019643 grep -v '^ *+' conftest.er1 >conftest.err
19644 rm -f conftest.er1
19645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019647 (exit $ac_status); } && {
19648 test -z "$ac_c_werror_flag" ||
19649 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019650 } && test -s conftest$ac_exeext &&
19651 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019652
19653cat >>confdefs.h <<\_ACEOF
19654#define HAVE_INET_ATON 1
19655_ACEOF
19656
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019657 { echo "$as_me:$LINENO: result: yes" >&5
19658echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019659else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019661sed 's/^/| /' conftest.$ac_ext >&5
19662
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663 { echo "$as_me:$LINENO: result: no" >&5
19664echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019665
19666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667
19668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019670
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019671{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19672echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019674/* confdefs.h. */
19675_ACEOF
19676cat confdefs.h >>conftest.$ac_ext
19677cat >>conftest.$ac_ext <<_ACEOF
19678/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019679
19680#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019681#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019682#include <sys/socket.h>
19683#include <netinet/in.h>
19684#include <arpa/inet.h>
19685
Martin v. Löwise9416172003-05-03 10:12:45 +000019686int
19687main ()
19688{
19689void* p = inet_pton
19690 ;
19691 return 0;
19692}
19693_ACEOF
19694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695if { (ac_try="$ac_compile"
19696case "(($ac_try" in
19697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19698 *) ac_try_echo=$ac_try;;
19699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
19710 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019711
19712cat >>confdefs.h <<\_ACEOF
19713#define HAVE_INET_PTON 1
19714_ACEOF
19715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019716 { echo "$as_me:$LINENO: result: yes" >&5
19717echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019720sed 's/^/| /' conftest.$ac_ext >&5
19721
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019722 { echo "$as_me:$LINENO: result: no" >&5
19723echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019724
19725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726
19727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019728
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019729# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019730{ echo "$as_me:$LINENO: checking for setgroups" >&5
19731echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019733/* confdefs.h. */
19734_ACEOF
19735cat confdefs.h >>conftest.$ac_ext
19736cat >>conftest.$ac_ext <<_ACEOF
19737/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019738
19739#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019740#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019741#ifdef HAVE_GRP_H
19742#include <grp.h>
19743#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019744
Martin v. Löwisd5843682002-11-21 20:41:28 +000019745int
19746main ()
19747{
19748void* p = setgroups
19749 ;
19750 return 0;
19751}
19752_ACEOF
19753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019754if { (ac_try="$ac_compile"
19755case "(($ac_try" in
19756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19757 *) ac_try_echo=$ac_try;;
19758esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019762 grep -v '^ *+' conftest.er1 >conftest.err
19763 rm -f conftest.er1
19764 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766 (exit $ac_status); } && {
19767 test -z "$ac_c_werror_flag" ||
19768 test ! -s conftest.err
19769 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019770
19771cat >>confdefs.h <<\_ACEOF
19772#define HAVE_SETGROUPS 1
19773_ACEOF
19774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019775 { echo "$as_me:$LINENO: result: yes" >&5
19776echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019779sed 's/^/| /' conftest.$ac_ext >&5
19780
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019781 { echo "$as_me:$LINENO: result: no" >&5
19782echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019783
19784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019785
19786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019788# check for openpty and forkpty
19789
Martin v. Löwis11437992002-04-12 09:54:03 +000019790
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019791for ac_func in openpty
19792do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019793as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19794{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19795echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019796if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019798else
Martin v. Löwis11437992002-04-12 09:54:03 +000019799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019800/* confdefs.h. */
19801_ACEOF
19802cat confdefs.h >>conftest.$ac_ext
19803cat >>conftest.$ac_ext <<_ACEOF
19804/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019805/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19806 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19807#define $ac_func innocuous_$ac_func
19808
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019809/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019810 which can conflict with char $ac_func (); below.
19811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019812 <limits.h> exists even on freestanding compilers. */
19813
19814#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019815# include <limits.h>
19816#else
19817# include <assert.h>
19818#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019819
19820#undef $ac_func
19821
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822/* Override any GCC internal prototype to avoid an error.
19823 Use char because int might match the return type of a GCC
19824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019825#ifdef __cplusplus
19826extern "C"
19827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019828char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019829/* The GNU C library defines this for functions which it implements
19830 to always fail with ENOSYS. Some functions are actually named
19831 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019832#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019833choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019834#endif
19835
Skip Montanaro6dead952003-09-25 14:50:04 +000019836int
19837main ()
19838{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019839return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019840 ;
19841 return 0;
19842}
19843_ACEOF
19844rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019845if { (ac_try="$ac_link"
19846case "(($ac_try" in
19847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19848 *) ac_try_echo=$ac_try;;
19849esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019851 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019853 grep -v '^ *+' conftest.er1 >conftest.err
19854 rm -f conftest.er1
19855 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019857 (exit $ac_status); } && {
19858 test -z "$ac_c_werror_flag" ||
19859 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019860 } && test -s conftest$ac_exeext &&
19861 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019862 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019863else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019865sed 's/^/| /' conftest.$ac_ext >&5
19866
Martin v. Löwiseba40652007-08-30 20:10:57 +000019867 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869
19870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019871 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019872fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019873ac_res=`eval echo '${'$as_ac_var'}'`
19874 { echo "$as_me:$LINENO: result: $ac_res" >&5
19875echo "${ECHO_T}$ac_res" >&6; }
19876if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019878#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019879_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019880
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019881else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019882 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19883echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019884if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019885 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019886else
Martin v. Löwis11437992002-04-12 09:54:03 +000019887 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019888LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019890/* confdefs.h. */
19891_ACEOF
19892cat confdefs.h >>conftest.$ac_ext
19893cat >>conftest.$ac_ext <<_ACEOF
19894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019895
Martin v. Löwiseba40652007-08-30 20:10:57 +000019896/* Override any GCC internal prototype to avoid an error.
19897 Use char because int might match the return type of a GCC
19898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019899#ifdef __cplusplus
19900extern "C"
19901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019902char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019903int
19904main ()
19905{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019906return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019907 ;
19908 return 0;
19909}
19910_ACEOF
19911rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912if { (ac_try="$ac_link"
19913case "(($ac_try" in
19914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19915 *) ac_try_echo=$ac_try;;
19916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019918 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019920 grep -v '^ *+' conftest.er1 >conftest.err
19921 rm -f conftest.er1
19922 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924 (exit $ac_status); } && {
19925 test -z "$ac_c_werror_flag" ||
19926 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019927 } && test -s conftest$ac_exeext &&
19928 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019932sed 's/^/| /' conftest.$ac_ext >&5
19933
Martin v. Löwiseba40652007-08-30 20:10:57 +000019934 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936
19937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019939LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019940fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019941{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19942echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19943if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019944 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019945#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019946_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019947 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019948else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019949 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19950echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019951if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019953else
19954 ac_check_lib_save_LIBS=$LIBS
19955LIBS="-lbsd $LIBS"
19956cat >conftest.$ac_ext <<_ACEOF
19957/* confdefs.h. */
19958_ACEOF
19959cat confdefs.h >>conftest.$ac_ext
19960cat >>conftest.$ac_ext <<_ACEOF
19961/* end confdefs.h. */
19962
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963/* Override any GCC internal prototype to avoid an error.
19964 Use char because int might match the return type of a GCC
19965 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019966#ifdef __cplusplus
19967extern "C"
19968#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019969char openpty ();
19970int
19971main ()
19972{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019974 ;
19975 return 0;
19976}
19977_ACEOF
19978rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979if { (ac_try="$ac_link"
19980case "(($ac_try" in
19981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19982 *) ac_try_echo=$ac_try;;
19983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019985 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019986 ac_status=$?
19987 grep -v '^ *+' conftest.er1 >conftest.err
19988 rm -f conftest.er1
19989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019991 (exit $ac_status); } && {
19992 test -z "$ac_c_werror_flag" ||
19993 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019994 } && test -s conftest$ac_exeext &&
19995 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019996 ac_cv_lib_bsd_openpty=yes
19997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019998 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019999sed 's/^/| /' conftest.$ac_ext >&5
20000
Martin v. Löwiseba40652007-08-30 20:10:57 +000020001 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020003
20004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020005 conftest$ac_exeext conftest.$ac_ext
20006LIBS=$ac_check_lib_save_LIBS
20007fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020008{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20009echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20010if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020011 cat >>confdefs.h <<\_ACEOF
20012#define HAVE_OPENPTY 1
20013_ACEOF
20014 LIBS="$LIBS -lbsd"
20015fi
20016
20017
20018fi
20019
Fred Drake8cef4cf2000-06-28 16:40:38 +000020020
20021fi
20022done
20023
Martin v. Löwis11437992002-04-12 09:54:03 +000020024
Fred Drake8cef4cf2000-06-28 16:40:38 +000020025for ac_func in forkpty
20026do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20028{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020030if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020031 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020032else
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020034/* confdefs.h. */
20035_ACEOF
20036cat confdefs.h >>conftest.$ac_ext
20037cat >>conftest.$ac_ext <<_ACEOF
20038/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020039/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20040 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20041#define $ac_func innocuous_$ac_func
20042
Fred Drake8cef4cf2000-06-28 16:40:38 +000020043/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020044 which can conflict with char $ac_func (); below.
20045 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020046 <limits.h> exists even on freestanding compilers. */
20047
20048#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020049# include <limits.h>
20050#else
20051# include <assert.h>
20052#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020053
20054#undef $ac_func
20055
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056/* Override any GCC internal prototype to avoid an error.
20057 Use char because int might match the return type of a GCC
20058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020059#ifdef __cplusplus
20060extern "C"
20061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020062char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020063/* The GNU C library defines this for functions which it implements
20064 to always fail with ENOSYS. Some functions are actually named
20065 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020067choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020068#endif
20069
Skip Montanaro6dead952003-09-25 14:50:04 +000020070int
20071main ()
20072{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 ;
20075 return 0;
20076}
20077_ACEOF
20078rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079if { (ac_try="$ac_link"
20080case "(($ac_try" in
20081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20082 *) ac_try_echo=$ac_try;;
20083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020087 grep -v '^ *+' conftest.er1 >conftest.err
20088 rm -f conftest.er1
20089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091 (exit $ac_status); } && {
20092 test -z "$ac_c_werror_flag" ||
20093 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020094 } && test -s conftest$ac_exeext &&
20095 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020096 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020099sed 's/^/| /' conftest.$ac_ext >&5
20100
Martin v. Löwiseba40652007-08-30 20:10:57 +000020101 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103
20104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020105 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020106fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020107ac_res=`eval echo '${'$as_ac_var'}'`
20108 { echo "$as_me:$LINENO: result: $ac_res" >&5
20109echo "${ECHO_T}$ac_res" >&6; }
20110if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020113_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020114
Fred Drake8cef4cf2000-06-28 16:40:38 +000020115else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020116 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20117echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020118if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020119 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020120else
Martin v. Löwis11437992002-04-12 09:54:03 +000020121 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020122LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020124/* confdefs.h. */
20125_ACEOF
20126cat confdefs.h >>conftest.$ac_ext
20127cat >>conftest.$ac_ext <<_ACEOF
20128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020129
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130/* Override any GCC internal prototype to avoid an error.
20131 Use char because int might match the return type of a GCC
20132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020133#ifdef __cplusplus
20134extern "C"
20135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020136char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020137int
20138main ()
20139{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020141 ;
20142 return 0;
20143}
20144_ACEOF
20145rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020146if { (ac_try="$ac_link"
20147case "(($ac_try" in
20148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20149 *) ac_try_echo=$ac_try;;
20150esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020152 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020154 grep -v '^ *+' conftest.er1 >conftest.err
20155 rm -f conftest.er1
20156 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020158 (exit $ac_status); } && {
20159 test -z "$ac_c_werror_flag" ||
20160 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020161 } && test -s conftest$ac_exeext &&
20162 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020163 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020166sed 's/^/| /' conftest.$ac_ext >&5
20167
Martin v. Löwiseba40652007-08-30 20:10:57 +000020168 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020170
20171rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020172 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020173LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020174fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020175{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20176echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20177if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020179#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020180_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020181 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020182else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020183 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20184echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020185if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020186 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020187else
20188 ac_check_lib_save_LIBS=$LIBS
20189LIBS="-lbsd $LIBS"
20190cat >conftest.$ac_ext <<_ACEOF
20191/* confdefs.h. */
20192_ACEOF
20193cat confdefs.h >>conftest.$ac_ext
20194cat >>conftest.$ac_ext <<_ACEOF
20195/* end confdefs.h. */
20196
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197/* Override any GCC internal prototype to avoid an error.
20198 Use char because int might match the return type of a GCC
20199 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020200#ifdef __cplusplus
20201extern "C"
20202#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020203char forkpty ();
20204int
20205main ()
20206{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020208 ;
20209 return 0;
20210}
20211_ACEOF
20212rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213if { (ac_try="$ac_link"
20214case "(($ac_try" in
20215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20216 *) ac_try_echo=$ac_try;;
20217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020220 ac_status=$?
20221 grep -v '^ *+' conftest.er1 >conftest.err
20222 rm -f conftest.er1
20223 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225 (exit $ac_status); } && {
20226 test -z "$ac_c_werror_flag" ||
20227 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020228 } && test -s conftest$ac_exeext &&
20229 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020230 ac_cv_lib_bsd_forkpty=yes
20231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020232 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020233sed 's/^/| /' conftest.$ac_ext >&5
20234
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237
20238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020239 conftest$ac_exeext conftest.$ac_ext
20240LIBS=$ac_check_lib_save_LIBS
20241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020242{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20243echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20244if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020245 cat >>confdefs.h <<\_ACEOF
20246#define HAVE_FORKPTY 1
20247_ACEOF
20248 LIBS="$LIBS -lbsd"
20249fi
20250
20251
20252fi
20253
Fred Drake8cef4cf2000-06-28 16:40:38 +000020254
20255fi
20256done
20257
Jack Jansendd19cf82001-12-06 22:36:17 +000020258
Brett Cannonaa5778d2008-03-18 04:09:00 +000020259# Stuff for expat.
20260
20261for ac_func in memmove
20262do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020263as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20264{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20265echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020266if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020267 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020268else
20269 cat >conftest.$ac_ext <<_ACEOF
20270/* confdefs.h. */
20271_ACEOF
20272cat confdefs.h >>conftest.$ac_ext
20273cat >>conftest.$ac_ext <<_ACEOF
20274/* end confdefs.h. */
20275/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20276 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20277#define $ac_func innocuous_$ac_func
20278
20279/* System header to define __stub macros and hopefully few prototypes,
20280 which can conflict with char $ac_func (); below.
20281 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20282 <limits.h> exists even on freestanding compilers. */
20283
20284#ifdef __STDC__
20285# include <limits.h>
20286#else
20287# include <assert.h>
20288#endif
20289
20290#undef $ac_func
20291
20292/* Override any GCC internal prototype to avoid an error.
20293 Use char because int might match the return type of a GCC
20294 builtin and then its argument prototype would still apply. */
20295#ifdef __cplusplus
20296extern "C"
20297#endif
20298char $ac_func ();
20299/* The GNU C library defines this for functions which it implements
20300 to always fail with ENOSYS. Some functions are actually named
20301 something starting with __ and the normal name is an alias. */
20302#if defined __stub_$ac_func || defined __stub___$ac_func
20303choke me
20304#endif
20305
20306int
20307main ()
20308{
20309return $ac_func ();
20310 ;
20311 return 0;
20312}
20313_ACEOF
20314rm -f conftest.$ac_objext conftest$ac_exeext
20315if { (ac_try="$ac_link"
20316case "(($ac_try" in
20317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20318 *) ac_try_echo=$ac_try;;
20319esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020321 (eval "$ac_link") 2>conftest.er1
20322 ac_status=$?
20323 grep -v '^ *+' conftest.er1 >conftest.err
20324 rm -f conftest.er1
20325 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020327 (exit $ac_status); } && {
20328 test -z "$ac_c_werror_flag" ||
20329 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020330 } && test -s conftest$ac_exeext &&
20331 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020332 eval "$as_ac_var=yes"
20333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020334 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020335sed 's/^/| /' conftest.$ac_ext >&5
20336
20337 eval "$as_ac_var=no"
20338fi
20339
20340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20341 conftest$ac_exeext conftest.$ac_ext
20342fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020343ac_res=`eval echo '${'$as_ac_var'}'`
20344 { echo "$as_me:$LINENO: result: $ac_res" >&5
20345echo "${ECHO_T}$ac_res" >&6; }
20346if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020347 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020348#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020349_ACEOF
20350
20351fi
20352done
20353
20354
Michael W. Hudson54241132001-12-07 15:38:26 +000020355# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020356
20357
20358
20359
20360
20361
Fred Drake8cef4cf2000-06-28 16:40:38 +000020362for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20363do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020364as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20365{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20366echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020369else
Martin v. Löwis11437992002-04-12 09:54:03 +000020370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020371/* confdefs.h. */
20372_ACEOF
20373cat confdefs.h >>conftest.$ac_ext
20374cat >>conftest.$ac_ext <<_ACEOF
20375/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020376/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20377 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20378#define $ac_func innocuous_$ac_func
20379
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020380/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020381 which can conflict with char $ac_func (); below.
20382 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020383 <limits.h> exists even on freestanding compilers. */
20384
20385#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020386# include <limits.h>
20387#else
20388# include <assert.h>
20389#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020390
20391#undef $ac_func
20392
Martin v. Löwiseba40652007-08-30 20:10:57 +000020393/* Override any GCC internal prototype to avoid an error.
20394 Use char because int might match the return type of a GCC
20395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020396#ifdef __cplusplus
20397extern "C"
20398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020399char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020400/* The GNU C library defines this for functions which it implements
20401 to always fail with ENOSYS. Some functions are actually named
20402 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020403#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020404choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020405#endif
20406
Skip Montanaro6dead952003-09-25 14:50:04 +000020407int
20408main ()
20409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020411 ;
20412 return 0;
20413}
20414_ACEOF
20415rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020416if { (ac_try="$ac_link"
20417case "(($ac_try" in
20418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20419 *) ac_try_echo=$ac_try;;
20420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020424 grep -v '^ *+' conftest.er1 >conftest.err
20425 rm -f conftest.er1
20426 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428 (exit $ac_status); } && {
20429 test -z "$ac_c_werror_flag" ||
20430 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020431 } && test -s conftest$ac_exeext &&
20432 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020433 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020434else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020436sed 's/^/| /' conftest.$ac_ext >&5
20437
Martin v. Löwiseba40652007-08-30 20:10:57 +000020438 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440
20441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020442 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020443fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020444ac_res=`eval echo '${'$as_ac_var'}'`
20445 { echo "$as_me:$LINENO: result: $ac_res" >&5
20446echo "${ECHO_T}$ac_res" >&6; }
20447if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020449#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020450_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020451
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020452fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020453done
20454
Michael W. Hudson54241132001-12-07 15:38:26 +000020455
Martin v. Löwis11437992002-04-12 09:54:03 +000020456
20457
20458
Brett Cannonaa5778d2008-03-18 04:09:00 +000020459for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020460do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020461as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20462{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20463echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020464if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020465 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020466else
Martin v. Löwis11437992002-04-12 09:54:03 +000020467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020468/* confdefs.h. */
20469_ACEOF
20470cat confdefs.h >>conftest.$ac_ext
20471cat >>conftest.$ac_ext <<_ACEOF
20472/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020473/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20474 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20475#define $ac_func innocuous_$ac_func
20476
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020477/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020478 which can conflict with char $ac_func (); below.
20479 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020480 <limits.h> exists even on freestanding compilers. */
20481
20482#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020483# include <limits.h>
20484#else
20485# include <assert.h>
20486#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020487
20488#undef $ac_func
20489
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490/* Override any GCC internal prototype to avoid an error.
20491 Use char because int might match the return type of a GCC
20492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020493#ifdef __cplusplus
20494extern "C"
20495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020496char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020497/* The GNU C library defines this for functions which it implements
20498 to always fail with ENOSYS. Some functions are actually named
20499 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020500#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020501choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020502#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020503
Skip Montanaro6dead952003-09-25 14:50:04 +000020504int
20505main ()
20506{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020507return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 ;
20509 return 0;
20510}
20511_ACEOF
20512rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020513if { (ac_try="$ac_link"
20514case "(($ac_try" in
20515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20516 *) ac_try_echo=$ac_try;;
20517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020521 grep -v '^ *+' conftest.er1 >conftest.err
20522 rm -f conftest.er1
20523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020525 (exit $ac_status); } && {
20526 test -z "$ac_c_werror_flag" ||
20527 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020528 } && test -s conftest$ac_exeext &&
20529 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020530 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020533sed 's/^/| /' conftest.$ac_ext >&5
20534
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020537
20538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020541ac_res=`eval echo '${'$as_ac_var'}'`
20542 { echo "$as_me:$LINENO: result: $ac_res" >&5
20543echo "${ECHO_T}$ac_res" >&6; }
20544if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020545 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020547_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020548
Martin v. Löwis1142de32002-03-29 16:28:31 +000020549else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020550 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020551 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20553 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020554esac
20555
Martin v. Löwis1142de32002-03-29 16:28:31 +000020556fi
20557done
20558
20559
Martin v. Löwis11437992002-04-12 09:54:03 +000020560
Martin v. Löwis1142de32002-03-29 16:28:31 +000020561for ac_func in getpgrp
20562do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020563as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20564{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20565echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020566if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020567 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020568else
Martin v. Löwis11437992002-04-12 09:54:03 +000020569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020570/* confdefs.h. */
20571_ACEOF
20572cat confdefs.h >>conftest.$ac_ext
20573cat >>conftest.$ac_ext <<_ACEOF
20574/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020575/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20576 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20577#define $ac_func innocuous_$ac_func
20578
Martin v. Löwis1142de32002-03-29 16:28:31 +000020579/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020580 which can conflict with char $ac_func (); below.
20581 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020582 <limits.h> exists even on freestanding compilers. */
20583
20584#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020585# include <limits.h>
20586#else
20587# include <assert.h>
20588#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020589
20590#undef $ac_func
20591
Martin v. Löwiseba40652007-08-30 20:10:57 +000020592/* Override any GCC internal prototype to avoid an error.
20593 Use char because int might match the return type of a GCC
20594 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020595#ifdef __cplusplus
20596extern "C"
20597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020598char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020599/* The GNU C library defines this for functions which it implements
20600 to always fail with ENOSYS. Some functions are actually named
20601 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020602#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020603choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020604#endif
20605
Skip Montanaro6dead952003-09-25 14:50:04 +000020606int
20607main ()
20608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020610 ;
20611 return 0;
20612}
20613_ACEOF
20614rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020615if { (ac_try="$ac_link"
20616case "(($ac_try" in
20617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20618 *) ac_try_echo=$ac_try;;
20619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020623 grep -v '^ *+' conftest.er1 >conftest.err
20624 rm -f conftest.er1
20625 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020627 (exit $ac_status); } && {
20628 test -z "$ac_c_werror_flag" ||
20629 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020630 } && test -s conftest$ac_exeext &&
20631 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020635sed 's/^/| /' conftest.$ac_ext >&5
20636
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020639
20640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020641 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020642fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020643ac_res=`eval echo '${'$as_ac_var'}'`
20644 { echo "$as_me:$LINENO: result: $ac_res" >&5
20645echo "${ECHO_T}$ac_res" >&6; }
20646if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020648#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020649_ACEOF
20650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020651/* confdefs.h. */
20652_ACEOF
20653cat confdefs.h >>conftest.$ac_ext
20654cat >>conftest.$ac_ext <<_ACEOF
20655/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020656#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020657int
20658main ()
20659{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020660getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020661 ;
20662 return 0;
20663}
20664_ACEOF
20665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666if { (ac_try="$ac_compile"
20667case "(($ac_try" in
20668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20669 *) ac_try_echo=$ac_try;;
20670esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020674 grep -v '^ *+' conftest.er1 >conftest.err
20675 rm -f conftest.er1
20676 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020678 (exit $ac_status); } && {
20679 test -z "$ac_c_werror_flag" ||
20680 test ! -s conftest.err
20681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020682
20683cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020684#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020685_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020686
Martin v. Löwis11437992002-04-12 09:54:03 +000020687
Guido van Rossumf78abae1997-01-21 22:02:36 +000020688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020690sed 's/^/| /' conftest.$ac_ext >&5
20691
Martin v. Löwiseba40652007-08-30 20:10:57 +000020692
Guido van Rossum627b2d71993-12-24 10:39:16 +000020693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694
20695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020696
Guido van Rossum627b2d71993-12-24 10:39:16 +000020697fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020698done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020699
Jack Jansen150753c2003-03-29 22:07:47 +000020700
20701for ac_func in setpgrp
20702do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020703as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20704{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20705echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020706if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020708else
Martin v. Löwis11437992002-04-12 09:54:03 +000020709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020710/* confdefs.h. */
20711_ACEOF
20712cat confdefs.h >>conftest.$ac_ext
20713cat >>conftest.$ac_ext <<_ACEOF
20714/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020715/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20717#define $ac_func innocuous_$ac_func
20718
Jack Jansen150753c2003-03-29 22:07:47 +000020719/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020720 which can conflict with char $ac_func (); below.
20721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020722 <limits.h> exists even on freestanding compilers. */
20723
20724#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020725# include <limits.h>
20726#else
20727# include <assert.h>
20728#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020729
20730#undef $ac_func
20731
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732/* Override any GCC internal prototype to avoid an error.
20733 Use char because int might match the return type of a GCC
20734 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020735#ifdef __cplusplus
20736extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020737#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020738char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020739/* The GNU C library defines this for functions which it implements
20740 to always fail with ENOSYS. Some functions are actually named
20741 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020742#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020743choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020744#endif
20745
Skip Montanaro6dead952003-09-25 14:50:04 +000020746int
20747main ()
20748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020750 ;
20751 return 0;
20752}
20753_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020754rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755if { (ac_try="$ac_link"
20756case "(($ac_try" in
20757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20758 *) ac_try_echo=$ac_try;;
20759esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020763 grep -v '^ *+' conftest.er1 >conftest.err
20764 rm -f conftest.er1
20765 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767 (exit $ac_status); } && {
20768 test -z "$ac_c_werror_flag" ||
20769 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020770 } && test -s conftest$ac_exeext &&
20771 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020772 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020775sed 's/^/| /' conftest.$ac_ext >&5
20776
Martin v. Löwiseba40652007-08-30 20:10:57 +000020777 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779
20780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020781 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020783ac_res=`eval echo '${'$as_ac_var'}'`
20784 { echo "$as_me:$LINENO: result: $ac_res" >&5
20785echo "${ECHO_T}$ac_res" >&6; }
20786if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020787 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020788#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020789_ACEOF
20790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020791/* confdefs.h. */
20792_ACEOF
20793cat confdefs.h >>conftest.$ac_ext
20794cat >>conftest.$ac_ext <<_ACEOF
20795/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020796#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020797int
20798main ()
20799{
20800setpgrp(0,0);
20801 ;
20802 return 0;
20803}
20804_ACEOF
20805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020806if { (ac_try="$ac_compile"
20807case "(($ac_try" in
20808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20809 *) ac_try_echo=$ac_try;;
20810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020812 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020814 grep -v '^ *+' conftest.er1 >conftest.err
20815 rm -f conftest.er1
20816 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020818 (exit $ac_status); } && {
20819 test -z "$ac_c_werror_flag" ||
20820 test ! -s conftest.err
20821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020822
20823cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020824#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020825_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020826
Jack Jansen150753c2003-03-29 22:07:47 +000020827
20828else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020830sed 's/^/| /' conftest.$ac_ext >&5
20831
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834
20835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020836
20837fi
20838done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020839
Martin v. Löwis11437992002-04-12 09:54:03 +000020840
Thomas Wouters3a584202000-08-05 23:28:51 +000020841for ac_func in gettimeofday
20842do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20844{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020846if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020848else
Martin v. Löwis11437992002-04-12 09:54:03 +000020849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020850/* confdefs.h. */
20851_ACEOF
20852cat confdefs.h >>conftest.$ac_ext
20853cat >>conftest.$ac_ext <<_ACEOF
20854/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020855/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20856 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20857#define $ac_func innocuous_$ac_func
20858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020859/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020860 which can conflict with char $ac_func (); below.
20861 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020862 <limits.h> exists even on freestanding compilers. */
20863
20864#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020865# include <limits.h>
20866#else
20867# include <assert.h>
20868#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020869
20870#undef $ac_func
20871
Martin v. Löwiseba40652007-08-30 20:10:57 +000020872/* Override any GCC internal prototype to avoid an error.
20873 Use char because int might match the return type of a GCC
20874 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020875#ifdef __cplusplus
20876extern "C"
20877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020878char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020879/* The GNU C library defines this for functions which it implements
20880 to always fail with ENOSYS. Some functions are actually named
20881 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020882#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020883choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884#endif
20885
Skip Montanaro6dead952003-09-25 14:50:04 +000020886int
20887main ()
20888{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020890 ;
20891 return 0;
20892}
20893_ACEOF
20894rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020895if { (ac_try="$ac_link"
20896case "(($ac_try" in
20897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20898 *) ac_try_echo=$ac_try;;
20899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020901 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020903 grep -v '^ *+' conftest.er1 >conftest.err
20904 rm -f conftest.er1
20905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020907 (exit $ac_status); } && {
20908 test -z "$ac_c_werror_flag" ||
20909 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020910 } && test -s conftest$ac_exeext &&
20911 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020912 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020915sed 's/^/| /' conftest.$ac_ext >&5
20916
Martin v. Löwiseba40652007-08-30 20:10:57 +000020917 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020919
20920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020921 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020922fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020923ac_res=`eval echo '${'$as_ac_var'}'`
20924 { echo "$as_me:$LINENO: result: $ac_res" >&5
20925echo "${ECHO_T}$ac_res" >&6; }
20926if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020929_ACEOF
20930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020931/* confdefs.h. */
20932_ACEOF
20933cat confdefs.h >>conftest.$ac_ext
20934cat >>conftest.$ac_ext <<_ACEOF
20935/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020936#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020937int
20938main ()
20939{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020940gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020941 ;
20942 return 0;
20943}
20944_ACEOF
20945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020946if { (ac_try="$ac_compile"
20947case "(($ac_try" in
20948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20949 *) ac_try_echo=$ac_try;;
20950esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020954 grep -v '^ *+' conftest.er1 >conftest.err
20955 rm -f conftest.er1
20956 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020958 (exit $ac_status); } && {
20959 test -z "$ac_c_werror_flag" ||
20960 test ! -s conftest.err
20961 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020962 :
20963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020965sed 's/^/| /' conftest.$ac_ext >&5
20966
Martin v. Löwis11437992002-04-12 09:54:03 +000020967
20968cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020969#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020970_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020971
Martin v. Löwis11437992002-04-12 09:54:03 +000020972
Guido van Rossum627b2d71993-12-24 10:39:16 +000020973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974
20975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020976
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020977fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020978done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979
Michael W. Hudson54241132001-12-07 15:38:26 +000020980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020981{ echo "$as_me:$LINENO: checking for major" >&5
20982echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020984/* confdefs.h. */
20985_ACEOF
20986cat confdefs.h >>conftest.$ac_ext
20987cat >>conftest.$ac_ext <<_ACEOF
20988/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020989
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020990#if defined(MAJOR_IN_MKDEV)
20991#include <sys/mkdev.h>
20992#elif defined(MAJOR_IN_SYSMACROS)
20993#include <sys/sysmacros.h>
20994#else
20995#include <sys/types.h>
20996#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020997
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020998int
20999main ()
21000{
21001
21002 makedev(major(0),minor(0));
21003
21004 ;
21005 return 0;
21006}
21007_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021008rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021009if { (ac_try="$ac_link"
21010case "(($ac_try" in
21011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21012 *) ac_try_echo=$ac_try;;
21013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021017 grep -v '^ *+' conftest.er1 >conftest.err
21018 rm -f conftest.er1
21019 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021021 (exit $ac_status); } && {
21022 test -z "$ac_c_werror_flag" ||
21023 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021024 } && test -s conftest$ac_exeext &&
21025 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021026
21027
21028cat >>confdefs.h <<\_ACEOF
21029#define HAVE_DEVICE_MACROS 1
21030_ACEOF
21031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021032 { echo "$as_me:$LINENO: result: yes" >&5
21033echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021034
21035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021037sed 's/^/| /' conftest.$ac_ext >&5
21038
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021040 { echo "$as_me:$LINENO: result: no" >&5
21041echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021042
21043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021044
21045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021046 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021047
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021048# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021049# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021050{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21051echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021053/* confdefs.h. */
21054_ACEOF
21055cat confdefs.h >>conftest.$ac_ext
21056cat >>conftest.$ac_ext <<_ACEOF
21057/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021058
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021059#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021060#include <sys/socket.h>
21061#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021062#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021063
Martin v. Löwis11437992002-04-12 09:54:03 +000021064int
21065main ()
21066{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021067getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021068 ;
21069 return 0;
21070}
21071_ACEOF
21072rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073if { (ac_try="$ac_link"
21074case "(($ac_try" in
21075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21076 *) ac_try_echo=$ac_try;;
21077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021081 grep -v '^ *+' conftest.er1 >conftest.err
21082 rm -f conftest.er1
21083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021085 (exit $ac_status); } && {
21086 test -z "$ac_c_werror_flag" ||
21087 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021088 } && test -s conftest$ac_exeext &&
21089 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021090 have_getaddrinfo=yes
21091else
21092 echo "$as_me: failed program was:" >&5
21093sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021094
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021095 have_getaddrinfo=no
21096fi
21097
21098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21099 conftest$ac_exeext conftest.$ac_ext
21100{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21101echo "${ECHO_T}$have_getaddrinfo" >&6; }
21102if test $have_getaddrinfo = yes
21103then
21104 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021105echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021106 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21107 echo $ECHO_N "(cached) $ECHO_C" >&6
21108else
21109 if test "$cross_compiling" = yes; then
21110 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021111else
Martin v. Löwis11437992002-04-12 09:54:03 +000021112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021113/* confdefs.h. */
21114_ACEOF
21115cat confdefs.h >>conftest.$ac_ext
21116cat >>conftest.$ac_ext <<_ACEOF
21117/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021118
21119#include <sys/types.h>
21120#include <netdb.h>
21121#include <string.h>
21122#include <sys/socket.h>
21123#include <netinet/in.h>
21124
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021125int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021126{
21127 int passive, gaierr, inet4 = 0, inet6 = 0;
21128 struct addrinfo hints, *ai, *aitop;
21129 char straddr[INET6_ADDRSTRLEN], strport[16];
21130
21131 for (passive = 0; passive <= 1; passive++) {
21132 memset(&hints, 0, sizeof(hints));
21133 hints.ai_family = AF_UNSPEC;
21134 hints.ai_flags = passive ? AI_PASSIVE : 0;
21135 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021136 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021137 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21138 (void)gai_strerror(gaierr);
21139 goto bad;
21140 }
21141 for (ai = aitop; ai; ai = ai->ai_next) {
21142 if (ai->ai_addr == NULL ||
21143 ai->ai_addrlen == 0 ||
21144 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21145 straddr, sizeof(straddr), strport, sizeof(strport),
21146 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21147 goto bad;
21148 }
21149 switch (ai->ai_family) {
21150 case AF_INET:
21151 if (strcmp(strport, "54321") != 0) {
21152 goto bad;
21153 }
21154 if (passive) {
21155 if (strcmp(straddr, "0.0.0.0") != 0) {
21156 goto bad;
21157 }
21158 } else {
21159 if (strcmp(straddr, "127.0.0.1") != 0) {
21160 goto bad;
21161 }
21162 }
21163 inet4++;
21164 break;
21165 case AF_INET6:
21166 if (strcmp(strport, "54321") != 0) {
21167 goto bad;
21168 }
21169 if (passive) {
21170 if (strcmp(straddr, "::") != 0) {
21171 goto bad;
21172 }
21173 } else {
21174 if (strcmp(straddr, "::1") != 0) {
21175 goto bad;
21176 }
21177 }
21178 inet6++;
21179 break;
21180 case AF_UNSPEC:
21181 goto bad;
21182 break;
21183 default:
21184 /* another family support? */
21185 break;
21186 }
21187 }
21188 }
21189
21190 if (!(inet4 == 0 || inet4 == 2))
21191 goto bad;
21192 if (!(inet6 == 0 || inet6 == 2))
21193 goto bad;
21194
21195 if (aitop)
21196 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021197 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021198
21199 bad:
21200 if (aitop)
21201 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021202 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021203}
21204
Martin v. Löwis11437992002-04-12 09:54:03 +000021205_ACEOF
21206rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207if { (ac_try="$ac_link"
21208case "(($ac_try" in
21209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21210 *) ac_try_echo=$ac_try;;
21211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021213 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021214 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021217 { (case "(($ac_try" in
21218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21219 *) ac_try_echo=$ac_try;;
21220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021226 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021228 echo "$as_me: program exited with status $ac_status" >&5
21229echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021230sed 's/^/| /' conftest.$ac_ext >&5
21231
Martin v. Löwis11437992002-04-12 09:54:03 +000021232( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021233ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235rm -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 +000021236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021237
21238
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021239fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021240
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021242
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021243if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021244then
21245 if test $ipv6 = yes
21246 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021247 echo 'Fatal: You must get working getaddrinfo() function.'
21248 echo ' or you can specify "--disable-ipv6"'.
21249 exit 1
21250 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021251else
Martin v. Löwis11437992002-04-12 09:54:03 +000021252
21253cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021254#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021255_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021256
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021258
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021259for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021260do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021261as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21262{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21263echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021264if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021265 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266else
Martin v. Löwis11437992002-04-12 09:54:03 +000021267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021268/* confdefs.h. */
21269_ACEOF
21270cat confdefs.h >>conftest.$ac_ext
21271cat >>conftest.$ac_ext <<_ACEOF
21272/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021273/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21275#define $ac_func innocuous_$ac_func
21276
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021277/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021278 which can conflict with char $ac_func (); below.
21279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021280 <limits.h> exists even on freestanding compilers. */
21281
21282#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021283# include <limits.h>
21284#else
21285# include <assert.h>
21286#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021287
21288#undef $ac_func
21289
Martin v. Löwiseba40652007-08-30 20:10:57 +000021290/* Override any GCC internal prototype to avoid an error.
21291 Use char because int might match the return type of a GCC
21292 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021293#ifdef __cplusplus
21294extern "C"
21295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021296char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021297/* The GNU C library defines this for functions which it implements
21298 to always fail with ENOSYS. Some functions are actually named
21299 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021300#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021301choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021302#endif
21303
Skip Montanaro6dead952003-09-25 14:50:04 +000021304int
21305main ()
21306{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021307return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 ;
21309 return 0;
21310}
21311_ACEOF
21312rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021313if { (ac_try="$ac_link"
21314case "(($ac_try" in
21315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21316 *) ac_try_echo=$ac_try;;
21317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021321 grep -v '^ *+' conftest.er1 >conftest.err
21322 rm -f conftest.er1
21323 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325 (exit $ac_status); } && {
21326 test -z "$ac_c_werror_flag" ||
21327 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021328 } && test -s conftest$ac_exeext &&
21329 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021330 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021333sed 's/^/| /' conftest.$ac_ext >&5
21334
Martin v. Löwiseba40652007-08-30 20:10:57 +000021335 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337
21338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021339 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021341ac_res=`eval echo '${'$as_ac_var'}'`
21342 { echo "$as_me:$LINENO: result: $ac_res" >&5
21343echo "${ECHO_T}$ac_res" >&6; }
21344if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021345 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021346#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021347_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021348
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021349fi
21350done
21351
Michael W. Hudson54241132001-12-07 15:38:26 +000021352
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021353# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021354{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21355echo $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 +000021356if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021358else
Martin v. Löwis11437992002-04-12 09:54:03 +000021359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021360/* confdefs.h. */
21361_ACEOF
21362cat confdefs.h >>conftest.$ac_ext
21363cat >>conftest.$ac_ext <<_ACEOF
21364/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021365#include <sys/types.h>
21366#include <sys/time.h>
21367#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021368
Martin v. Löwis11437992002-04-12 09:54:03 +000021369int
21370main ()
21371{
21372if ((struct tm *) 0)
21373return 0;
21374 ;
21375 return 0;
21376}
21377_ACEOF
21378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021379if { (ac_try="$ac_compile"
21380case "(($ac_try" in
21381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21382 *) ac_try_echo=$ac_try;;
21383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021387 grep -v '^ *+' conftest.er1 >conftest.err
21388 rm -f conftest.er1
21389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021391 (exit $ac_status); } && {
21392 test -z "$ac_c_werror_flag" ||
21393 test ! -s conftest.err
21394 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021395 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021396else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021398sed 's/^/| /' conftest.$ac_ext >&5
21399
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402
21403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021404fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021405{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21406echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021407if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021408
21409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021410#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021412
21413fi
21414
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021415{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21416echo $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 +000021417if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021419else
Martin v. Löwis11437992002-04-12 09:54:03 +000021420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021421/* confdefs.h. */
21422_ACEOF
21423cat confdefs.h >>conftest.$ac_ext
21424cat >>conftest.$ac_ext <<_ACEOF
21425/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021426#include <sys/types.h>
21427#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021428
Martin v. Löwis11437992002-04-12 09:54:03 +000021429int
21430main ()
21431{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432struct tm tm;
21433 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021434 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021435 ;
21436 return 0;
21437}
21438_ACEOF
21439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440if { (ac_try="$ac_compile"
21441case "(($ac_try" in
21442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21443 *) ac_try_echo=$ac_try;;
21444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021448 grep -v '^ *+' conftest.er1 >conftest.err
21449 rm -f conftest.er1
21450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452 (exit $ac_status); } && {
21453 test -z "$ac_c_werror_flag" ||
21454 test ! -s conftest.err
21455 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021456 ac_cv_struct_tm=time.h
21457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021459sed 's/^/| /' conftest.$ac_ext >&5
21460
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021463
21464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021465fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021466{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21467echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021468if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021469
21470cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021471#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021472_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021473
21474fi
21475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021476{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21477echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021478if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021480else
Martin v. Löwis11437992002-04-12 09:54:03 +000021481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021482/* confdefs.h. */
21483_ACEOF
21484cat confdefs.h >>conftest.$ac_ext
21485cat >>conftest.$ac_ext <<_ACEOF
21486/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021487#include <sys/types.h>
21488#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021489
21490
Martin v. Löwis11437992002-04-12 09:54:03 +000021491int
21492main ()
21493{
21494static struct tm ac_aggr;
21495if (ac_aggr.tm_zone)
21496return 0;
21497 ;
21498 return 0;
21499}
21500_ACEOF
21501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502if { (ac_try="$ac_compile"
21503case "(($ac_try" in
21504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21505 *) ac_try_echo=$ac_try;;
21506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021510 grep -v '^ *+' conftest.er1 >conftest.err
21511 rm -f conftest.er1
21512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021514 (exit $ac_status); } && {
21515 test -z "$ac_c_werror_flag" ||
21516 test ! -s conftest.err
21517 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021521sed 's/^/| /' conftest.$ac_ext >&5
21522
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021524/* confdefs.h. */
21525_ACEOF
21526cat confdefs.h >>conftest.$ac_ext
21527cat >>conftest.$ac_ext <<_ACEOF
21528/* end confdefs.h. */
21529#include <sys/types.h>
21530#include <$ac_cv_struct_tm>
21531
21532
21533int
21534main ()
21535{
21536static struct tm ac_aggr;
21537if (sizeof ac_aggr.tm_zone)
21538return 0;
21539 ;
21540 return 0;
21541}
21542_ACEOF
21543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021544if { (ac_try="$ac_compile"
21545case "(($ac_try" in
21546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21547 *) ac_try_echo=$ac_try;;
21548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021552 grep -v '^ *+' conftest.er1 >conftest.err
21553 rm -f conftest.er1
21554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021556 (exit $ac_status); } && {
21557 test -z "$ac_c_werror_flag" ||
21558 test ! -s conftest.err
21559 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021560 ac_cv_member_struct_tm_tm_zone=yes
21561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021563sed 's/^/| /' conftest.$ac_ext >&5
21564
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021567
21568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021570
21571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021572fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021573{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21574echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21575if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021576
21577cat >>confdefs.h <<_ACEOF
21578#define HAVE_STRUCT_TM_TM_ZONE 1
21579_ACEOF
21580
21581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021582fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021583
Martin v. Löwis11437992002-04-12 09:54:03 +000021584if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21585
21586cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021587#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021589
21590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021591 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21592echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021594 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595else
21596 cat >conftest.$ac_ext <<_ACEOF
21597/* confdefs.h. */
21598_ACEOF
21599cat confdefs.h >>conftest.$ac_ext
21600cat >>conftest.$ac_ext <<_ACEOF
21601/* end confdefs.h. */
21602#include <time.h>
21603
21604int
21605main ()
21606{
21607#ifndef tzname
21608 (void) tzname;
21609#endif
21610
21611 ;
21612 return 0;
21613}
21614_ACEOF
21615rm -f conftest.$ac_objext
21616if { (ac_try="$ac_compile"
21617case "(($ac_try" in
21618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21619 *) ac_try_echo=$ac_try;;
21620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021622 (eval "$ac_compile") 2>conftest.er1
21623 ac_status=$?
21624 grep -v '^ *+' conftest.er1 >conftest.err
21625 rm -f conftest.er1
21626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021628 (exit $ac_status); } && {
21629 test -z "$ac_c_werror_flag" ||
21630 test ! -s conftest.err
21631 } && test -s conftest.$ac_objext; then
21632 ac_cv_have_decl_tzname=yes
21633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021634 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021635sed 's/^/| /' conftest.$ac_ext >&5
21636
21637 ac_cv_have_decl_tzname=no
21638fi
21639
21640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21641fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021642{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21643echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21644if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645
21646cat >>confdefs.h <<_ACEOF
21647#define HAVE_DECL_TZNAME 1
21648_ACEOF
21649
21650
21651else
21652 cat >>confdefs.h <<_ACEOF
21653#define HAVE_DECL_TZNAME 0
21654_ACEOF
21655
21656
21657fi
21658
21659
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021660 { echo "$as_me:$LINENO: checking for tzname" >&5
21661echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021662if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021664else
Martin v. Löwis11437992002-04-12 09:54:03 +000021665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021666/* confdefs.h. */
21667_ACEOF
21668cat confdefs.h >>conftest.$ac_ext
21669cat >>conftest.$ac_ext <<_ACEOF
21670/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021671#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672#if !HAVE_DECL_TZNAME
21673extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021675
Martin v. Löwis11437992002-04-12 09:54:03 +000021676int
21677main ()
21678{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021679return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021680 ;
21681 return 0;
21682}
21683_ACEOF
21684rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021685if { (ac_try="$ac_link"
21686case "(($ac_try" in
21687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21688 *) ac_try_echo=$ac_try;;
21689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021691 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021693 grep -v '^ *+' conftest.er1 >conftest.err
21694 rm -f conftest.er1
21695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697 (exit $ac_status); } && {
21698 test -z "$ac_c_werror_flag" ||
21699 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021700 } && test -s conftest$ac_exeext &&
21701 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021702 ac_cv_var_tzname=yes
21703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021705sed 's/^/| /' conftest.$ac_ext >&5
21706
Martin v. Löwiseba40652007-08-30 20:10:57 +000021707 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709
21710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021711 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021712fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021713{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21714echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021715 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021716
21717cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021718#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021719_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021721 fi
21722fi
21723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021724{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21725echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021726if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021728else
21729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021730/* confdefs.h. */
21731_ACEOF
21732cat confdefs.h >>conftest.$ac_ext
21733cat >>conftest.$ac_ext <<_ACEOF
21734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021735$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021736int
21737main ()
21738{
21739static struct stat ac_aggr;
21740if (ac_aggr.st_rdev)
21741return 0;
21742 ;
21743 return 0;
21744}
21745_ACEOF
21746rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021747if { (ac_try="$ac_compile"
21748case "(($ac_try" in
21749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21750 *) ac_try_echo=$ac_try;;
21751esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021755 grep -v '^ *+' conftest.er1 >conftest.err
21756 rm -f conftest.er1
21757 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021759 (exit $ac_status); } && {
21760 test -z "$ac_c_werror_flag" ||
21761 test ! -s conftest.err
21762 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021763 ac_cv_member_struct_stat_st_rdev=yes
21764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021766sed 's/^/| /' conftest.$ac_ext >&5
21767
Martin v. Löwiseba40652007-08-30 20:10:57 +000021768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021769/* confdefs.h. */
21770_ACEOF
21771cat confdefs.h >>conftest.$ac_ext
21772cat >>conftest.$ac_ext <<_ACEOF
21773/* end confdefs.h. */
21774$ac_includes_default
21775int
21776main ()
21777{
21778static struct stat ac_aggr;
21779if (sizeof ac_aggr.st_rdev)
21780return 0;
21781 ;
21782 return 0;
21783}
21784_ACEOF
21785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021786if { (ac_try="$ac_compile"
21787case "(($ac_try" in
21788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21789 *) ac_try_echo=$ac_try;;
21790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021792 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021794 grep -v '^ *+' conftest.er1 >conftest.err
21795 rm -f conftest.er1
21796 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021798 (exit $ac_status); } && {
21799 test -z "$ac_c_werror_flag" ||
21800 test ! -s conftest.err
21801 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021802 ac_cv_member_struct_stat_st_rdev=yes
21803else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021805sed 's/^/| /' conftest.$ac_ext >&5
21806
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809
21810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812
21813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021814fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021815{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21816echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21817if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021818
21819cat >>confdefs.h <<_ACEOF
21820#define HAVE_STRUCT_STAT_ST_RDEV 1
21821_ACEOF
21822
21823
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021824fi
21825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021826{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21827echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021828if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021829 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021830else
Martin v. Löwis11437992002-04-12 09:54:03 +000021831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021832/* confdefs.h. */
21833_ACEOF
21834cat confdefs.h >>conftest.$ac_ext
21835cat >>conftest.$ac_ext <<_ACEOF
21836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021837$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021838int
21839main ()
21840{
21841static struct stat ac_aggr;
21842if (ac_aggr.st_blksize)
21843return 0;
21844 ;
21845 return 0;
21846}
21847_ACEOF
21848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021849if { (ac_try="$ac_compile"
21850case "(($ac_try" in
21851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21852 *) ac_try_echo=$ac_try;;
21853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021857 grep -v '^ *+' conftest.er1 >conftest.err
21858 rm -f conftest.er1
21859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021861 (exit $ac_status); } && {
21862 test -z "$ac_c_werror_flag" ||
21863 test ! -s conftest.err
21864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021865 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021868sed 's/^/| /' conftest.$ac_ext >&5
21869
Martin v. Löwiseba40652007-08-30 20:10:57 +000021870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021871/* confdefs.h. */
21872_ACEOF
21873cat confdefs.h >>conftest.$ac_ext
21874cat >>conftest.$ac_ext <<_ACEOF
21875/* end confdefs.h. */
21876$ac_includes_default
21877int
21878main ()
21879{
21880static struct stat ac_aggr;
21881if (sizeof ac_aggr.st_blksize)
21882return 0;
21883 ;
21884 return 0;
21885}
21886_ACEOF
21887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888if { (ac_try="$ac_compile"
21889case "(($ac_try" in
21890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21891 *) ac_try_echo=$ac_try;;
21892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021896 grep -v '^ *+' conftest.er1 >conftest.err
21897 rm -f conftest.er1
21898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021900 (exit $ac_status); } && {
21901 test -z "$ac_c_werror_flag" ||
21902 test ! -s conftest.err
21903 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021904 ac_cv_member_struct_stat_st_blksize=yes
21905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021907sed 's/^/| /' conftest.$ac_ext >&5
21908
Martin v. Löwiseba40652007-08-30 20:10:57 +000021909 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021911
21912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021914
21915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021917{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21918echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21919if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021920
Martin v. Löwis11437992002-04-12 09:54:03 +000021921cat >>confdefs.h <<_ACEOF
21922#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21923_ACEOF
21924
21925
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021926fi
21927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021928{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21929echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021930if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021931 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021932else
21933 cat >conftest.$ac_ext <<_ACEOF
21934/* confdefs.h. */
21935_ACEOF
21936cat confdefs.h >>conftest.$ac_ext
21937cat >>conftest.$ac_ext <<_ACEOF
21938/* end confdefs.h. */
21939$ac_includes_default
21940int
21941main ()
21942{
21943static struct stat ac_aggr;
21944if (ac_aggr.st_flags)
21945return 0;
21946 ;
21947 return 0;
21948}
21949_ACEOF
21950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021951if { (ac_try="$ac_compile"
21952case "(($ac_try" in
21953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21954 *) ac_try_echo=$ac_try;;
21955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021957 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021958 ac_status=$?
21959 grep -v '^ *+' conftest.er1 >conftest.err
21960 rm -f conftest.er1
21961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021963 (exit $ac_status); } && {
21964 test -z "$ac_c_werror_flag" ||
21965 test ! -s conftest.err
21966 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021967 ac_cv_member_struct_stat_st_flags=yes
21968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021969 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021970sed 's/^/| /' conftest.$ac_ext >&5
21971
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021973/* confdefs.h. */
21974_ACEOF
21975cat confdefs.h >>conftest.$ac_ext
21976cat >>conftest.$ac_ext <<_ACEOF
21977/* end confdefs.h. */
21978$ac_includes_default
21979int
21980main ()
21981{
21982static struct stat ac_aggr;
21983if (sizeof ac_aggr.st_flags)
21984return 0;
21985 ;
21986 return 0;
21987}
21988_ACEOF
21989rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990if { (ac_try="$ac_compile"
21991case "(($ac_try" in
21992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21993 *) ac_try_echo=$ac_try;;
21994esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021996 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021997 ac_status=$?
21998 grep -v '^ *+' conftest.er1 >conftest.err
21999 rm -f conftest.er1
22000 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022002 (exit $ac_status); } && {
22003 test -z "$ac_c_werror_flag" ||
22004 test ! -s conftest.err
22005 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022006 ac_cv_member_struct_stat_st_flags=yes
22007else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022008 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022009sed 's/^/| /' conftest.$ac_ext >&5
22010
Martin v. Löwiseba40652007-08-30 20:10:57 +000022011 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013
22014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016
22017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022018fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022019{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22020echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22021if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022022
22023cat >>confdefs.h <<_ACEOF
22024#define HAVE_STRUCT_STAT_ST_FLAGS 1
22025_ACEOF
22026
22027
22028fi
22029
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022030{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22031echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022032if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022033 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022034else
22035 cat >conftest.$ac_ext <<_ACEOF
22036/* confdefs.h. */
22037_ACEOF
22038cat confdefs.h >>conftest.$ac_ext
22039cat >>conftest.$ac_ext <<_ACEOF
22040/* end confdefs.h. */
22041$ac_includes_default
22042int
22043main ()
22044{
22045static struct stat ac_aggr;
22046if (ac_aggr.st_gen)
22047return 0;
22048 ;
22049 return 0;
22050}
22051_ACEOF
22052rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022053if { (ac_try="$ac_compile"
22054case "(($ac_try" in
22055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22056 *) ac_try_echo=$ac_try;;
22057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022060 ac_status=$?
22061 grep -v '^ *+' conftest.er1 >conftest.err
22062 rm -f conftest.er1
22063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022065 (exit $ac_status); } && {
22066 test -z "$ac_c_werror_flag" ||
22067 test ! -s conftest.err
22068 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022069 ac_cv_member_struct_stat_st_gen=yes
22070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022071 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022072sed 's/^/| /' conftest.$ac_ext >&5
22073
Martin v. Löwiseba40652007-08-30 20:10:57 +000022074 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022075/* confdefs.h. */
22076_ACEOF
22077cat confdefs.h >>conftest.$ac_ext
22078cat >>conftest.$ac_ext <<_ACEOF
22079/* end confdefs.h. */
22080$ac_includes_default
22081int
22082main ()
22083{
22084static struct stat ac_aggr;
22085if (sizeof ac_aggr.st_gen)
22086return 0;
22087 ;
22088 return 0;
22089}
22090_ACEOF
22091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022092if { (ac_try="$ac_compile"
22093case "(($ac_try" in
22094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22095 *) ac_try_echo=$ac_try;;
22096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022099 ac_status=$?
22100 grep -v '^ *+' conftest.er1 >conftest.err
22101 rm -f conftest.er1
22102 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104 (exit $ac_status); } && {
22105 test -z "$ac_c_werror_flag" ||
22106 test ! -s conftest.err
22107 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022108 ac_cv_member_struct_stat_st_gen=yes
22109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022110 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022111sed 's/^/| /' conftest.$ac_ext >&5
22112
Martin v. Löwiseba40652007-08-30 20:10:57 +000022113 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022115
22116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118
22119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022120fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022121{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22122echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22123if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022124
22125cat >>confdefs.h <<_ACEOF
22126#define HAVE_STRUCT_STAT_ST_GEN 1
22127_ACEOF
22128
22129
22130fi
22131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022132{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22133echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022134if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022135 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022136else
22137 cat >conftest.$ac_ext <<_ACEOF
22138/* confdefs.h. */
22139_ACEOF
22140cat confdefs.h >>conftest.$ac_ext
22141cat >>conftest.$ac_ext <<_ACEOF
22142/* end confdefs.h. */
22143$ac_includes_default
22144int
22145main ()
22146{
22147static struct stat ac_aggr;
22148if (ac_aggr.st_birthtime)
22149return 0;
22150 ;
22151 return 0;
22152}
22153_ACEOF
22154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022155if { (ac_try="$ac_compile"
22156case "(($ac_try" in
22157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22158 *) ac_try_echo=$ac_try;;
22159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022162 ac_status=$?
22163 grep -v '^ *+' conftest.er1 >conftest.err
22164 rm -f conftest.er1
22165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022167 (exit $ac_status); } && {
22168 test -z "$ac_c_werror_flag" ||
22169 test ! -s conftest.err
22170 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022171 ac_cv_member_struct_stat_st_birthtime=yes
22172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022173 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022174sed 's/^/| /' conftest.$ac_ext >&5
22175
Martin v. Löwiseba40652007-08-30 20:10:57 +000022176 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022177/* confdefs.h. */
22178_ACEOF
22179cat confdefs.h >>conftest.$ac_ext
22180cat >>conftest.$ac_ext <<_ACEOF
22181/* end confdefs.h. */
22182$ac_includes_default
22183int
22184main ()
22185{
22186static struct stat ac_aggr;
22187if (sizeof ac_aggr.st_birthtime)
22188return 0;
22189 ;
22190 return 0;
22191}
22192_ACEOF
22193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022194if { (ac_try="$ac_compile"
22195case "(($ac_try" in
22196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22197 *) ac_try_echo=$ac_try;;
22198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022201 ac_status=$?
22202 grep -v '^ *+' conftest.er1 >conftest.err
22203 rm -f conftest.er1
22204 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022206 (exit $ac_status); } && {
22207 test -z "$ac_c_werror_flag" ||
22208 test ! -s conftest.err
22209 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022210 ac_cv_member_struct_stat_st_birthtime=yes
22211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022212 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022213sed 's/^/| /' conftest.$ac_ext >&5
22214
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022217
22218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220
22221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022222fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022223{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22224echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22225if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022226
22227cat >>confdefs.h <<_ACEOF
22228#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22229_ACEOF
22230
22231
22232fi
22233
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022234{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22235echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022236if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022237 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022238else
Martin v. Löwis11437992002-04-12 09:54:03 +000022239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022240/* confdefs.h. */
22241_ACEOF
22242cat confdefs.h >>conftest.$ac_ext
22243cat >>conftest.$ac_ext <<_ACEOF
22244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022245$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022246int
22247main ()
22248{
22249static struct stat ac_aggr;
22250if (ac_aggr.st_blocks)
22251return 0;
22252 ;
22253 return 0;
22254}
22255_ACEOF
22256rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022257if { (ac_try="$ac_compile"
22258case "(($ac_try" in
22259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22260 *) ac_try_echo=$ac_try;;
22261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022263 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022265 grep -v '^ *+' conftest.er1 >conftest.err
22266 rm -f conftest.er1
22267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022269 (exit $ac_status); } && {
22270 test -z "$ac_c_werror_flag" ||
22271 test ! -s conftest.err
22272 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022273 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022276sed 's/^/| /' conftest.$ac_ext >&5
22277
Martin v. Löwiseba40652007-08-30 20:10:57 +000022278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022279/* confdefs.h. */
22280_ACEOF
22281cat confdefs.h >>conftest.$ac_ext
22282cat >>conftest.$ac_ext <<_ACEOF
22283/* end confdefs.h. */
22284$ac_includes_default
22285int
22286main ()
22287{
22288static struct stat ac_aggr;
22289if (sizeof ac_aggr.st_blocks)
22290return 0;
22291 ;
22292 return 0;
22293}
22294_ACEOF
22295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022296if { (ac_try="$ac_compile"
22297case "(($ac_try" in
22298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22299 *) ac_try_echo=$ac_try;;
22300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022302 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022304 grep -v '^ *+' conftest.er1 >conftest.err
22305 rm -f conftest.er1
22306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022308 (exit $ac_status); } && {
22309 test -z "$ac_c_werror_flag" ||
22310 test ! -s conftest.err
22311 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022312 ac_cv_member_struct_stat_st_blocks=yes
22313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022315sed 's/^/| /' conftest.$ac_ext >&5
22316
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022319
22320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022322
22323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022325{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22326echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22327if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022328
Martin v. Löwis11437992002-04-12 09:54:03 +000022329cat >>confdefs.h <<_ACEOF
22330#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22331_ACEOF
22332
22333
22334cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022335#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022336_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022337
22338else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022339 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022340 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022341 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22342 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022343esac
22344
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022345fi
22346
Michael W. Hudson54241132001-12-07 15:38:26 +000022347
Martin v. Löwis11437992002-04-12 09:54:03 +000022348
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022349{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22350echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022351if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022353else
Martin v. Löwis11437992002-04-12 09:54:03 +000022354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022355/* confdefs.h. */
22356_ACEOF
22357cat confdefs.h >>conftest.$ac_ext
22358cat >>conftest.$ac_ext <<_ACEOF
22359/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022360#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022361int
22362main ()
22363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022364return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022365 ;
22366 return 0;
22367}
22368_ACEOF
22369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022370if { (ac_try="$ac_compile"
22371case "(($ac_try" in
22372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22373 *) ac_try_echo=$ac_try;;
22374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022378 grep -v '^ *+' conftest.er1 >conftest.err
22379 rm -f conftest.er1
22380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022382 (exit $ac_status); } && {
22383 test -z "$ac_c_werror_flag" ||
22384 test ! -s conftest.err
22385 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022386 ac_cv_header_time_altzone=yes
22387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022389sed 's/^/| /' conftest.$ac_ext >&5
22390
Martin v. Löwiseba40652007-08-30 20:10:57 +000022391 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022392fi
22393
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22395fi
22396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022397{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22398echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022399if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022400
22401cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022402#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022404
22405fi
22406
Guido van Rossumda88dad1995-01-26 00:46:29 +000022407was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022408{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22409echo $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 +000022410cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022411/* confdefs.h. */
22412_ACEOF
22413cat confdefs.h >>conftest.$ac_ext
22414cat >>conftest.$ac_ext <<_ACEOF
22415/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022416
22417#include <sys/types.h>
22418#include <sys/select.h>
22419#include <sys/time.h>
22420
Martin v. Löwis11437992002-04-12 09:54:03 +000022421int
22422main ()
22423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022424;
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 ;
22426 return 0;
22427}
22428_ACEOF
22429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022430if { (ac_try="$ac_compile"
22431case "(($ac_try" in
22432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22433 *) ac_try_echo=$ac_try;;
22434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022438 grep -v '^ *+' conftest.er1 >conftest.err
22439 rm -f conftest.er1
22440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022442 (exit $ac_status); } && {
22443 test -z "$ac_c_werror_flag" ||
22444 test ! -s conftest.err
22445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022446
22447
22448cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022449#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022450_ACEOF
22451
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022452 was_it_defined=yes
22453
Guido van Rossumf78abae1997-01-21 22:02:36 +000022454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022456sed 's/^/| /' conftest.$ac_ext >&5
22457
Brett Cannon19fab762007-06-02 03:02:29 +000022458
Martin v. Löwiseba40652007-08-30 20:10:57 +000022459fi
22460
22461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022462{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22463echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022465{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22466echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022467if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022468 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022469else
Martin v. Löwis11437992002-04-12 09:54:03 +000022470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022471/* confdefs.h. */
22472_ACEOF
22473cat confdefs.h >>conftest.$ac_ext
22474cat >>conftest.$ac_ext <<_ACEOF
22475/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022476
22477# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022478int
22479main ()
22480{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022481struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022482 ;
22483 return 0;
22484}
22485_ACEOF
22486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022487if { (ac_try="$ac_compile"
22488case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022495 grep -v '^ *+' conftest.er1 >conftest.err
22496 rm -f conftest.er1
22497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499 (exit $ac_status); } && {
22500 test -z "$ac_c_werror_flag" ||
22501 test ! -s conftest.err
22502 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022503 ac_cv_struct_addrinfo=yes
22504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022506sed 's/^/| /' conftest.$ac_ext >&5
22507
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022509fi
22510
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22512fi
22513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022514{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22515echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022516if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022517
22518cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022519#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022520_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022521
22522fi
22523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022524{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22525echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022526if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022528else
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022530/* confdefs.h. */
22531_ACEOF
22532cat confdefs.h >>conftest.$ac_ext
22533cat >>conftest.$ac_ext <<_ACEOF
22534/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022535
22536# include <sys/types.h>
22537# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022538int
22539main ()
22540{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022541struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022542 ;
22543 return 0;
22544}
22545_ACEOF
22546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547if { (ac_try="$ac_compile"
22548case "(($ac_try" in
22549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22550 *) ac_try_echo=$ac_try;;
22551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022555 grep -v '^ *+' conftest.er1 >conftest.err
22556 rm -f conftest.er1
22557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559 (exit $ac_status); } && {
22560 test -z "$ac_c_werror_flag" ||
22561 test ! -s conftest.err
22562 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022563 ac_cv_struct_sockaddr_storage=yes
22564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022566sed 's/^/| /' conftest.$ac_ext >&5
22567
Martin v. Löwiseba40652007-08-30 20:10:57 +000022568 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022569fi
22570
Martin v. Löwiseba40652007-08-30 20:10:57 +000022571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22572fi
22573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022574{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22575echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022576if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022577
22578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022579#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022580_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022581
22582fi
22583
Guido van Rossum627b2d71993-12-24 10:39:16 +000022584# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022585
Michael W. Hudson54241132001-12-07 15:38:26 +000022586
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022587{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22588echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022589if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022590 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022591else
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022593/* confdefs.h. */
22594_ACEOF
22595cat confdefs.h >>conftest.$ac_ext
22596cat >>conftest.$ac_ext <<_ACEOF
22597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022598$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022599int
22600main ()
22601{
22602static int test_array [1 - 2 * !(((char) -1) < 0)];
22603test_array [0] = 0
22604
22605 ;
22606 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022607}
Martin v. Löwis11437992002-04-12 09:54:03 +000022608_ACEOF
22609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022610if { (ac_try="$ac_compile"
22611case "(($ac_try" in
22612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22613 *) ac_try_echo=$ac_try;;
22614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022618 grep -v '^ *+' conftest.er1 >conftest.err
22619 rm -f conftest.er1
22620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022622 (exit $ac_status); } && {
22623 test -z "$ac_c_werror_flag" ||
22624 test ! -s conftest.err
22625 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022626 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022629sed 's/^/| /' conftest.$ac_ext >&5
22630
Martin v. Löwiseba40652007-08-30 20:10:57 +000022631 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633
22634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022635fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022636{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22637echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022638if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022639 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022640#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022642
22643fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022645{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22646echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022647if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022648 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022649else
22650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022651/* confdefs.h. */
22652_ACEOF
22653cat confdefs.h >>conftest.$ac_ext
22654cat >>conftest.$ac_ext <<_ACEOF
22655/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022656
Martin v. Löwis11437992002-04-12 09:54:03 +000022657int
22658main ()
22659{
22660/* FIXME: Include the comments suggested by Paul. */
22661#ifndef __cplusplus
22662 /* Ultrix mips cc rejects this. */
22663 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022665 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022666 char const *const *pcpcc;
22667 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 /* NEC SVR4.0.2 mips cc rejects this. */
22669 struct point {int x, y;};
22670 static struct point const zero = {0,0};
22671 /* AIX XL C 1.02.0.0 rejects this.
22672 It does not let you subtract one const X* pointer from another in
22673 an arm of an if-expression whose if-part is not a constant
22674 expression */
22675 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678 ++pcpcc;
22679 ppc = (char**) pcpcc;
22680 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 { /* SCO 3.2v4 cc rejects this. */
22682 char *t;
22683 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022684
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022687 }
22688 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22689 int x[] = {25, 17};
22690 const int *foo = &x[0];
22691 ++foo;
22692 }
22693 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22694 typedef const int *iptr;
22695 iptr p = 0;
22696 ++p;
22697 }
22698 { /* AIX XL C 1.02.0.0 rejects this saying
22699 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22700 struct s { int j; const int *ap[3]; };
22701 struct s *b; b->j = 5;
22702 }
22703 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22704 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022705 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022706 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022708#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022709
Martin v. Löwis11437992002-04-12 09:54:03 +000022710 ;
22711 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022712}
Martin v. Löwis11437992002-04-12 09:54:03 +000022713_ACEOF
22714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022715if { (ac_try="$ac_compile"
22716case "(($ac_try" in
22717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22718 *) ac_try_echo=$ac_try;;
22719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022723 grep -v '^ *+' conftest.er1 >conftest.err
22724 rm -f conftest.er1
22725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022727 (exit $ac_status); } && {
22728 test -z "$ac_c_werror_flag" ||
22729 test ! -s conftest.err
22730 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022731 ac_cv_c_const=yes
22732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022734sed 's/^/| /' conftest.$ac_ext >&5
22735
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738
22739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022741{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22742echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022743if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022744
22745cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022746#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022747_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022748
22749fi
22750
Michael W. Hudson54241132001-12-07 15:38:26 +000022751
Guido van Rossumda88dad1995-01-26 00:46:29 +000022752works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022753{ echo "$as_me:$LINENO: checking for working volatile" >&5
22754echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022756/* confdefs.h. */
22757_ACEOF
22758cat confdefs.h >>conftest.$ac_ext
22759cat >>conftest.$ac_ext <<_ACEOF
22760/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022761
Martin v. Löwis11437992002-04-12 09:54:03 +000022762int
22763main ()
22764{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022765volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 ;
22767 return 0;
22768}
22769_ACEOF
22770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022771if { (ac_try="$ac_compile"
22772case "(($ac_try" in
22773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22774 *) ac_try_echo=$ac_try;;
22775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022779 grep -v '^ *+' conftest.er1 >conftest.err
22780 rm -f conftest.er1
22781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022783 (exit $ac_status); } && {
22784 test -z "$ac_c_werror_flag" ||
22785 test ! -s conftest.err
22786 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022787 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022790sed 's/^/| /' conftest.$ac_ext >&5
22791
Martin v. Löwis11437992002-04-12 09:54:03 +000022792
22793cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022794#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022796
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022797
Guido van Rossum627b2d71993-12-24 10:39:16 +000022798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799
22800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022801{ echo "$as_me:$LINENO: result: $works" >&5
22802echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022803
Guido van Rossumda88dad1995-01-26 00:46:29 +000022804works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022805{ echo "$as_me:$LINENO: checking for working signed char" >&5
22806echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022808/* confdefs.h. */
22809_ACEOF
22810cat confdefs.h >>conftest.$ac_ext
22811cat >>conftest.$ac_ext <<_ACEOF
22812/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022813
Martin v. Löwis11437992002-04-12 09:54:03 +000022814int
22815main ()
22816{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022817signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022818 ;
22819 return 0;
22820}
22821_ACEOF
22822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022823if { (ac_try="$ac_compile"
22824case "(($ac_try" in
22825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22826 *) ac_try_echo=$ac_try;;
22827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022831 grep -v '^ *+' conftest.er1 >conftest.err
22832 rm -f conftest.er1
22833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022835 (exit $ac_status); } && {
22836 test -z "$ac_c_werror_flag" ||
22837 test ! -s conftest.err
22838 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022839 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022842sed 's/^/| /' conftest.$ac_ext >&5
22843
Martin v. Löwis11437992002-04-12 09:54:03 +000022844
22845cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022846#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022847_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022848
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022849
Guido van Rossum7f43da71994-08-01 12:15:30 +000022850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022851
22852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022853{ echo "$as_me:$LINENO: result: $works" >&5
22854echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022855
Guido van Rossumda88dad1995-01-26 00:46:29 +000022856have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022857{ echo "$as_me:$LINENO: checking for prototypes" >&5
22858echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022860/* confdefs.h. */
22861_ACEOF
22862cat confdefs.h >>conftest.$ac_ext
22863cat >>conftest.$ac_ext <<_ACEOF
22864/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022865int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022866int
22867main ()
22868{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022869return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022870 ;
22871 return 0;
22872}
22873_ACEOF
22874rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875if { (ac_try="$ac_compile"
22876case "(($ac_try" in
22877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22878 *) ac_try_echo=$ac_try;;
22879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022883 grep -v '^ *+' conftest.er1 >conftest.err
22884 rm -f conftest.er1
22885 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022887 (exit $ac_status); } && {
22888 test -z "$ac_c_werror_flag" ||
22889 test ! -s conftest.err
22890 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022891
22892
22893cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022894#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022895_ACEOF
22896
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022897 have_prototypes=yes
22898
Guido van Rossumf78abae1997-01-21 22:02:36 +000022899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022901sed 's/^/| /' conftest.$ac_ext >&5
22902
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903
Guido van Rossum7f43da71994-08-01 12:15:30 +000022904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905
22906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022907{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22908echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022909
Guido van Rossumda88dad1995-01-26 00:46:29 +000022910works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022911{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22912echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022914/* confdefs.h. */
22915_ACEOF
22916cat confdefs.h >>conftest.$ac_ext
22917cat >>conftest.$ac_ext <<_ACEOF
22918/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022919
22920#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022921int foo(int x, ...) {
22922 va_list va;
22923 va_start(va, x);
22924 va_arg(va, int);
22925 va_arg(va, char *);
22926 va_arg(va, double);
22927 return 0;
22928}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022929
Martin v. Löwis11437992002-04-12 09:54:03 +000022930int
22931main ()
22932{
Guido van Rossum90eea071996-08-30 20:58:57 +000022933return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022934 ;
22935 return 0;
22936}
22937_ACEOF
22938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939if { (ac_try="$ac_compile"
22940case "(($ac_try" in
22941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22942 *) ac_try_echo=$ac_try;;
22943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022947 grep -v '^ *+' conftest.er1 >conftest.err
22948 rm -f conftest.er1
22949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022951 (exit $ac_status); } && {
22952 test -z "$ac_c_werror_flag" ||
22953 test ! -s conftest.err
22954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022955
22956
22957cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022958#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022959_ACEOF
22960
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022961 works=yes
22962
Guido van Rossumf78abae1997-01-21 22:02:36 +000022963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022965sed 's/^/| /' conftest.$ac_ext >&5
22966
Martin v. Löwiseba40652007-08-30 20:10:57 +000022967
Guido van Rossum627b2d71993-12-24 10:39:16 +000022968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022969
22970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022971{ echo "$as_me:$LINENO: result: $works" >&5
22972echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022973
Martin v. Löwisd6320502004-08-12 13:45:08 +000022974# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022975{ echo "$as_me:$LINENO: checking for socketpair" >&5
22976echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022977cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022978/* confdefs.h. */
22979_ACEOF
22980cat confdefs.h >>conftest.$ac_ext
22981cat >>conftest.$ac_ext <<_ACEOF
22982/* end confdefs.h. */
22983
22984#include <sys/types.h>
22985#include <sys/socket.h>
22986
22987int
22988main ()
22989{
22990void *x=socketpair
22991 ;
22992 return 0;
22993}
22994_ACEOF
22995rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996if { (ac_try="$ac_compile"
22997case "(($ac_try" in
22998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22999 *) ac_try_echo=$ac_try;;
23000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023004 grep -v '^ *+' conftest.er1 >conftest.err
23005 rm -f conftest.er1
23006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008 (exit $ac_status); } && {
23009 test -z "$ac_c_werror_flag" ||
23010 test ! -s conftest.err
23011 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023012
23013cat >>confdefs.h <<\_ACEOF
23014#define HAVE_SOCKETPAIR 1
23015_ACEOF
23016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023017 { echo "$as_me:$LINENO: result: yes" >&5
23018echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023019else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023020 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023021sed 's/^/| /' conftest.$ac_ext >&5
23022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023023 { echo "$as_me:$LINENO: result: no" >&5
23024echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023025
23026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027
23028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023029
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023030# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023031{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23032echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023034/* confdefs.h. */
23035_ACEOF
23036cat confdefs.h >>conftest.$ac_ext
23037cat >>conftest.$ac_ext <<_ACEOF
23038/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023039#include <sys/types.h>
23040#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023041int
23042main ()
23043{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023044struct sockaddr x;
23045x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023046 ;
23047 return 0;
23048}
23049_ACEOF
23050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023051if { (ac_try="$ac_compile"
23052case "(($ac_try" in
23053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23054 *) ac_try_echo=$ac_try;;
23055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023059 grep -v '^ *+' conftest.er1 >conftest.err
23060 rm -f conftest.er1
23061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063 (exit $ac_status); } && {
23064 test -z "$ac_c_werror_flag" ||
23065 test ! -s conftest.err
23066 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023067 { echo "$as_me:$LINENO: result: yes" >&5
23068echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023069
23070cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023071#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023072_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023073
23074else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023076sed 's/^/| /' conftest.$ac_ext >&5
23077
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023078 { echo "$as_me:$LINENO: result: no" >&5
23079echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023081
23082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023083
Guido van Rossumda88dad1995-01-26 00:46:29 +000023084va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023085{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23086echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023088/* confdefs.h. */
23089_ACEOF
23090cat confdefs.h >>conftest.$ac_ext
23091cat >>conftest.$ac_ext <<_ACEOF
23092/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023093
23094#ifdef HAVE_STDARG_PROTOTYPES
23095#include <stdarg.h>
23096#else
23097#include <varargs.h>
23098#endif
23099
Martin v. Löwis11437992002-04-12 09:54:03 +000023100int
23101main ()
23102{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023103va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023104 ;
23105 return 0;
23106}
23107_ACEOF
23108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023109if { (ac_try="$ac_compile"
23110case "(($ac_try" in
23111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23112 *) ac_try_echo=$ac_try;;
23113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023117 grep -v '^ *+' conftest.er1 >conftest.err
23118 rm -f conftest.er1
23119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023121 (exit $ac_status); } && {
23122 test -z "$ac_c_werror_flag" ||
23123 test ! -s conftest.err
23124 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023125 :
23126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023128sed 's/^/| /' conftest.$ac_ext >&5
23129
Martin v. Löwis11437992002-04-12 09:54:03 +000023130
23131
23132cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023133#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023134_ACEOF
23135
Guido van Rossumda88dad1995-01-26 00:46:29 +000023136 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023137
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023139
23140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023141{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23142echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023143
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023144# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023145
23146
23147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023148{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23149echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023150if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023152else
Martin v. Löwis11437992002-04-12 09:54:03 +000023153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023154/* confdefs.h. */
23155_ACEOF
23156cat confdefs.h >>conftest.$ac_ext
23157cat >>conftest.$ac_ext <<_ACEOF
23158/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023159/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23160 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23161#define gethostbyname_r innocuous_gethostbyname_r
23162
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023163/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023164 which can conflict with char gethostbyname_r (); below.
23165 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023166 <limits.h> exists even on freestanding compilers. */
23167
23168#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023169# include <limits.h>
23170#else
23171# include <assert.h>
23172#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023173
23174#undef gethostbyname_r
23175
Martin v. Löwiseba40652007-08-30 20:10:57 +000023176/* Override any GCC internal prototype to avoid an error.
23177 Use char because int might match the return type of a GCC
23178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023179#ifdef __cplusplus
23180extern "C"
23181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023182char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023183/* The GNU C library defines this for functions which it implements
23184 to always fail with ENOSYS. Some functions are actually named
23185 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023186#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023187choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023188#endif
23189
Skip Montanaro6dead952003-09-25 14:50:04 +000023190int
23191main ()
23192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023193return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023194 ;
23195 return 0;
23196}
23197_ACEOF
23198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023199if { (ac_try="$ac_link"
23200case "(($ac_try" in
23201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23202 *) ac_try_echo=$ac_try;;
23203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023207 grep -v '^ *+' conftest.er1 >conftest.err
23208 rm -f conftest.er1
23209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023211 (exit $ac_status); } && {
23212 test -z "$ac_c_werror_flag" ||
23213 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023214 } && test -s conftest$ac_exeext &&
23215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023216 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023219sed 's/^/| /' conftest.$ac_ext >&5
23220
Martin v. Löwiseba40652007-08-30 20:10:57 +000023221 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223
23224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023225 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023227{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23228echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23229if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023230
Martin v. Löwis11437992002-04-12 09:54:03 +000023231 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023232#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023233_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023235 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23236echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023237 OLD_CFLAGS=$CFLAGS
23238 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023240/* confdefs.h. */
23241_ACEOF
23242cat confdefs.h >>conftest.$ac_ext
23243cat >>conftest.$ac_ext <<_ACEOF
23244/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023245
23246# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023247
Martin v. Löwis11437992002-04-12 09:54:03 +000023248int
23249main ()
23250{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023251
23252 char *name;
23253 struct hostent *he, *res;
23254 char buffer[2048];
23255 int buflen = 2048;
23256 int h_errnop;
23257
23258 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023259
23260 ;
23261 return 0;
23262}
23263_ACEOF
23264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023265if { (ac_try="$ac_compile"
23266case "(($ac_try" in
23267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23268 *) ac_try_echo=$ac_try;;
23269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023273 grep -v '^ *+' conftest.er1 >conftest.err
23274 rm -f conftest.er1
23275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277 (exit $ac_status); } && {
23278 test -z "$ac_c_werror_flag" ||
23279 test ! -s conftest.err
23280 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023281
23282 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023283#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023284_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023285
Martin v. Löwis11437992002-04-12 09:54:03 +000023286
23287cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023288#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023289_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023291 { echo "$as_me:$LINENO: result: yes" >&5
23292echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023293
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023296sed 's/^/| /' conftest.$ac_ext >&5
23297
Martin v. Löwis11437992002-04-12 09:54:03 +000023298
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023299 { echo "$as_me:$LINENO: result: no" >&5
23300echo "${ECHO_T}no" >&6; }
23301 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23302echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023304/* confdefs.h. */
23305_ACEOF
23306cat confdefs.h >>conftest.$ac_ext
23307cat >>conftest.$ac_ext <<_ACEOF
23308/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023309
23310# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023311
Martin v. Löwis11437992002-04-12 09:54:03 +000023312int
23313main ()
23314{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023315
23316 char *name;
23317 struct hostent *he;
23318 char buffer[2048];
23319 int buflen = 2048;
23320 int h_errnop;
23321
23322 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023323
23324 ;
23325 return 0;
23326}
23327_ACEOF
23328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023329if { (ac_try="$ac_compile"
23330case "(($ac_try" in
23331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23332 *) ac_try_echo=$ac_try;;
23333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023337 grep -v '^ *+' conftest.er1 >conftest.err
23338 rm -f conftest.er1
23339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023341 (exit $ac_status); } && {
23342 test -z "$ac_c_werror_flag" ||
23343 test ! -s conftest.err
23344 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023345
23346 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023347#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023348_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023349
Martin v. Löwis11437992002-04-12 09:54:03 +000023350
23351cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023352#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023353_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023354
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023355 { echo "$as_me:$LINENO: result: yes" >&5
23356echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023357
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023360sed 's/^/| /' conftest.$ac_ext >&5
23361
Martin v. Löwis11437992002-04-12 09:54:03 +000023362
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023363 { echo "$as_me:$LINENO: result: no" >&5
23364echo "${ECHO_T}no" >&6; }
23365 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23366echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023368/* confdefs.h. */
23369_ACEOF
23370cat confdefs.h >>conftest.$ac_ext
23371cat >>conftest.$ac_ext <<_ACEOF
23372/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023373
23374# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023375
Martin v. Löwis11437992002-04-12 09:54:03 +000023376int
23377main ()
23378{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023379
23380 char *name;
23381 struct hostent *he;
23382 struct hostent_data data;
23383
23384 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023385
23386 ;
23387 return 0;
23388}
23389_ACEOF
23390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023391if { (ac_try="$ac_compile"
23392case "(($ac_try" in
23393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23394 *) ac_try_echo=$ac_try;;
23395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023399 grep -v '^ *+' conftest.er1 >conftest.err
23400 rm -f conftest.er1
23401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023403 (exit $ac_status); } && {
23404 test -z "$ac_c_werror_flag" ||
23405 test ! -s conftest.err
23406 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023407
23408 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023409#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023410_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023411
Martin v. Löwis11437992002-04-12 09:54:03 +000023412
23413cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023414#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023415_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023416
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023417 { echo "$as_me:$LINENO: result: yes" >&5
23418echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023419
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023422sed 's/^/| /' conftest.$ac_ext >&5
23423
Martin v. Löwis11437992002-04-12 09:54:03 +000023424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023425 { echo "$as_me:$LINENO: result: no" >&5
23426echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023429
23430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023431
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023433
23434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023437
23438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023439 CFLAGS=$OLD_CFLAGS
23440
23441else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023442
Martin v. Löwis11437992002-04-12 09:54:03 +000023443
23444for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023445do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023446as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23447{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23448echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023449if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023451else
Martin v. Löwis11437992002-04-12 09:54:03 +000023452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023453/* confdefs.h. */
23454_ACEOF
23455cat confdefs.h >>conftest.$ac_ext
23456cat >>conftest.$ac_ext <<_ACEOF
23457/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023458/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23459 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23460#define $ac_func innocuous_$ac_func
23461
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023462/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023463 which can conflict with char $ac_func (); below.
23464 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023465 <limits.h> exists even on freestanding compilers. */
23466
23467#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023468# include <limits.h>
23469#else
23470# include <assert.h>
23471#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023472
23473#undef $ac_func
23474
Martin v. Löwiseba40652007-08-30 20:10:57 +000023475/* Override any GCC internal prototype to avoid an error.
23476 Use char because int might match the return type of a GCC
23477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023478#ifdef __cplusplus
23479extern "C"
23480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023481char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023482/* The GNU C library defines this for functions which it implements
23483 to always fail with ENOSYS. Some functions are actually named
23484 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023485#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023486choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023487#endif
23488
Skip Montanaro6dead952003-09-25 14:50:04 +000023489int
23490main ()
23491{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023492return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023493 ;
23494 return 0;
23495}
23496_ACEOF
23497rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023498if { (ac_try="$ac_link"
23499case "(($ac_try" in
23500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23501 *) ac_try_echo=$ac_try;;
23502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023504 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023506 grep -v '^ *+' conftest.er1 >conftest.err
23507 rm -f conftest.er1
23508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023510 (exit $ac_status); } && {
23511 test -z "$ac_c_werror_flag" ||
23512 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023513 } && test -s conftest$ac_exeext &&
23514 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023515 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023518sed 's/^/| /' conftest.$ac_ext >&5
23519
Martin v. Löwiseba40652007-08-30 20:10:57 +000023520 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023522
23523rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023524 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023525fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023526ac_res=`eval echo '${'$as_ac_var'}'`
23527 { echo "$as_me:$LINENO: result: $ac_res" >&5
23528echo "${ECHO_T}$ac_res" >&6; }
23529if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023530 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023531#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023532_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023534fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023535done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023536
Michael W. Hudson54241132001-12-07 15:38:26 +000023537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023538fi
23539
Michael W. Hudson54241132001-12-07 15:38:26 +000023540
23541
23542
23543
23544
23545
Guido van Rossum627b2d71993-12-24 10:39:16 +000023546# checks for system services
23547# (none yet)
23548
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023549# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023550{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23551echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023552if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023553 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023554else
Martin v. Löwis11437992002-04-12 09:54:03 +000023555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023556/* confdefs.h. */
23557_ACEOF
23558cat confdefs.h >>conftest.$ac_ext
23559cat >>conftest.$ac_ext <<_ACEOF
23560/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023561/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23562 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23563#define __fpu_control innocuous___fpu_control
23564
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023565/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023566 which can conflict with char __fpu_control (); below.
23567 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023568 <limits.h> exists even on freestanding compilers. */
23569
23570#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023571# include <limits.h>
23572#else
23573# include <assert.h>
23574#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023575
23576#undef __fpu_control
23577
Martin v. Löwiseba40652007-08-30 20:10:57 +000023578/* Override any GCC internal prototype to avoid an error.
23579 Use char because int might match the return type of a GCC
23580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023581#ifdef __cplusplus
23582extern "C"
23583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023584char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023585/* The GNU C library defines this for functions which it implements
23586 to always fail with ENOSYS. Some functions are actually named
23587 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023588#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023589choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023590#endif
23591
Skip Montanaro6dead952003-09-25 14:50:04 +000023592int
23593main ()
23594{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023595return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023596 ;
23597 return 0;
23598}
23599_ACEOF
23600rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023601if { (ac_try="$ac_link"
23602case "(($ac_try" in
23603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23604 *) ac_try_echo=$ac_try;;
23605esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023607 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023609 grep -v '^ *+' conftest.er1 >conftest.err
23610 rm -f conftest.er1
23611 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613 (exit $ac_status); } && {
23614 test -z "$ac_c_werror_flag" ||
23615 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023616 } && test -s conftest$ac_exeext &&
23617 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023618 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023619else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023621sed 's/^/| /' conftest.$ac_ext >&5
23622
Martin v. Löwiseba40652007-08-30 20:10:57 +000023623 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023625
23626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023627 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023628fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023629{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23630echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23631if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023632 :
23633else
Martin v. Löwis11437992002-04-12 09:54:03 +000023634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023635{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23636echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023637if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023638 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023639else
Martin v. Löwis11437992002-04-12 09:54:03 +000023640 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023641LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023643/* confdefs.h. */
23644_ACEOF
23645cat confdefs.h >>conftest.$ac_ext
23646cat >>conftest.$ac_ext <<_ACEOF
23647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023648
Martin v. Löwiseba40652007-08-30 20:10:57 +000023649/* Override any GCC internal prototype to avoid an error.
23650 Use char because int might match the return type of a GCC
23651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023652#ifdef __cplusplus
23653extern "C"
23654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023655char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023656int
23657main ()
23658{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023659return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023660 ;
23661 return 0;
23662}
23663_ACEOF
23664rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023665if { (ac_try="$ac_link"
23666case "(($ac_try" in
23667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23668 *) ac_try_echo=$ac_try;;
23669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023671 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023673 grep -v '^ *+' conftest.er1 >conftest.err
23674 rm -f conftest.er1
23675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023677 (exit $ac_status); } && {
23678 test -z "$ac_c_werror_flag" ||
23679 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023680 } && test -s conftest$ac_exeext &&
23681 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023682 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023685sed 's/^/| /' conftest.$ac_ext >&5
23686
Martin v. Löwiseba40652007-08-30 20:10:57 +000023687 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023689
23690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023692LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023693fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023694{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23695echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23696if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023697 cat >>confdefs.h <<_ACEOF
23698#define HAVE_LIBIEEE 1
23699_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023700
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023701 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023702
Guido van Rossum627b2d71993-12-24 10:39:16 +000023703fi
23704
Michael W. Hudson54241132001-12-07 15:38:26 +000023705
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023706fi
23707
Michael W. Hudson54241132001-12-07 15:38:26 +000023708
Guido van Rossum7f253911997-05-09 02:42:48 +000023709# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023710{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23711echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023712
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023714if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023715 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023716if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023717then
23718
23719cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023720#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023721_ACEOF
23722
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023723 { echo "$as_me:$LINENO: result: yes" >&5
23724echo "${ECHO_T}yes" >&6; }
23725else { echo "$as_me:$LINENO: result: no" >&5
23726echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023727fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023728else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023729 { echo "$as_me:$LINENO: result: no" >&5
23730echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731fi
23732
Guido van Rossum7f253911997-05-09 02:42:48 +000023733
Guido van Rossum7f43da71994-08-01 12:15:30 +000023734# check for --with-libm=...
23735
Guido van Rossum563e7081996-09-10 18:20:48 +000023736case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023737Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023738BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023739*) LIBM=-lm
23740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023741{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23742echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023743
Martin v. Löwiseba40652007-08-30 20:10:57 +000023744# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023745if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023747if test "$withval" = no
23748then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023749 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23750echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023751elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023752then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023753 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23754echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23755else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23756echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023757 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023758fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023759else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023760 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23761echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023762fi
23763
Guido van Rossum7f43da71994-08-01 12:15:30 +000023764
23765# check for --with-libc=...
23766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023767{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23768echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023769
Martin v. Löwiseba40652007-08-30 20:10:57 +000023770# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023771if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023772 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023773if test "$withval" = no
23774then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023775 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23776echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023777elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023778then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023779 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23780echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23781else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23782echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023783 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023784fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023786 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23787echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023788fi
23789
Guido van Rossum7f43da71994-08-01 12:15:30 +000023790
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023791# **************************************************
23792# * Check for various properties of floating point *
23793# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023794
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023795{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23796echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23797if test "${ac_cv_little_endian_double+set}" = set; then
23798 echo $ECHO_N "(cached) $ECHO_C" >&6
23799else
23800
23801if test "$cross_compiling" = yes; then
23802 ac_cv_little_endian_double=no
23803else
23804 cat >conftest.$ac_ext <<_ACEOF
23805/* confdefs.h. */
23806_ACEOF
23807cat confdefs.h >>conftest.$ac_ext
23808cat >>conftest.$ac_ext <<_ACEOF
23809/* end confdefs.h. */
23810
23811#include <string.h>
23812int main() {
23813 double x = 9006104071832581.0;
23814 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23815 return 0;
23816 else
23817 return 1;
23818}
23819
23820_ACEOF
23821rm -f conftest$ac_exeext
23822if { (ac_try="$ac_link"
23823case "(($ac_try" in
23824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23825 *) ac_try_echo=$ac_try;;
23826esac
23827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23828 (eval "$ac_link") 2>&5
23829 ac_status=$?
23830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23832 { (case "(($ac_try" in
23833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23834 *) ac_try_echo=$ac_try;;
23835esac
23836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23837 (eval "$ac_try") 2>&5
23838 ac_status=$?
23839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23840 (exit $ac_status); }; }; then
23841 ac_cv_little_endian_double=yes
23842else
23843 echo "$as_me: program exited with status $ac_status" >&5
23844echo "$as_me: failed program was:" >&5
23845sed 's/^/| /' conftest.$ac_ext >&5
23846
23847( exit $ac_status )
23848ac_cv_little_endian_double=no
23849fi
23850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23851fi
23852
23853
23854fi
23855
23856{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23857echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23858if test "$ac_cv_little_endian_double" = yes
23859then
23860
23861cat >>confdefs.h <<\_ACEOF
23862#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23863_ACEOF
23864
23865fi
23866
23867{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23868echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23869if test "${ac_cv_big_endian_double+set}" = set; then
23870 echo $ECHO_N "(cached) $ECHO_C" >&6
23871else
23872
23873if test "$cross_compiling" = yes; then
23874 ac_cv_big_endian_double=no
23875else
23876 cat >conftest.$ac_ext <<_ACEOF
23877/* confdefs.h. */
23878_ACEOF
23879cat confdefs.h >>conftest.$ac_ext
23880cat >>conftest.$ac_ext <<_ACEOF
23881/* end confdefs.h. */
23882
23883#include <string.h>
23884int main() {
23885 double x = 9006104071832581.0;
23886 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23887 return 0;
23888 else
23889 return 1;
23890}
23891
23892_ACEOF
23893rm -f conftest$ac_exeext
23894if { (ac_try="$ac_link"
23895case "(($ac_try" in
23896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23897 *) ac_try_echo=$ac_try;;
23898esac
23899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23900 (eval "$ac_link") 2>&5
23901 ac_status=$?
23902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23904 { (case "(($ac_try" in
23905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23906 *) ac_try_echo=$ac_try;;
23907esac
23908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23909 (eval "$ac_try") 2>&5
23910 ac_status=$?
23911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23912 (exit $ac_status); }; }; then
23913 ac_cv_big_endian_double=yes
23914else
23915 echo "$as_me: program exited with status $ac_status" >&5
23916echo "$as_me: failed program was:" >&5
23917sed 's/^/| /' conftest.$ac_ext >&5
23918
23919( exit $ac_status )
23920ac_cv_big_endian_double=no
23921fi
23922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23923fi
23924
23925
23926fi
23927
23928{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23929echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23930if test "$ac_cv_big_endian_double" = yes
23931then
23932
23933cat >>confdefs.h <<\_ACEOF
23934#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23935_ACEOF
23936
23937fi
23938
23939# Some ARM platforms use a mixed-endian representation for doubles.
23940# While Python doesn't currently have full support for these platforms
23941# (see e.g., issue 1762561), we can at least make sure that float <-> string
23942# conversions work.
23943{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23944echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23945if test "${ac_cv_mixed_endian_double+set}" = set; then
23946 echo $ECHO_N "(cached) $ECHO_C" >&6
23947else
23948
23949if test "$cross_compiling" = yes; then
23950 ac_cv_mixed_endian_double=no
23951else
23952 cat >conftest.$ac_ext <<_ACEOF
23953/* confdefs.h. */
23954_ACEOF
23955cat confdefs.h >>conftest.$ac_ext
23956cat >>conftest.$ac_ext <<_ACEOF
23957/* end confdefs.h. */
23958
23959#include <string.h>
23960int main() {
23961 double x = 9006104071832581.0;
23962 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23963 return 0;
23964 else
23965 return 1;
23966}
23967
23968_ACEOF
23969rm -f conftest$ac_exeext
23970if { (ac_try="$ac_link"
23971case "(($ac_try" in
23972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23973 *) ac_try_echo=$ac_try;;
23974esac
23975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23976 (eval "$ac_link") 2>&5
23977 ac_status=$?
23978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23980 { (case "(($ac_try" in
23981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23982 *) ac_try_echo=$ac_try;;
23983esac
23984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23985 (eval "$ac_try") 2>&5
23986 ac_status=$?
23987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23988 (exit $ac_status); }; }; then
23989 ac_cv_mixed_endian_double=yes
23990else
23991 echo "$as_me: program exited with status $ac_status" >&5
23992echo "$as_me: failed program was:" >&5
23993sed 's/^/| /' conftest.$ac_ext >&5
23994
23995( exit $ac_status )
23996ac_cv_mixed_endian_double=no
23997fi
23998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23999fi
24000
24001
24002fi
24003
24004{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24005echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24006if test "$ac_cv_mixed_endian_double" = yes
24007then
24008
24009cat >>confdefs.h <<\_ACEOF
24010#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24011_ACEOF
24012
24013fi
24014
24015# The short float repr introduced in Python 3.1 requires the
24016# correctly-rounded string <-> double conversion functions from
24017# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24018# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024019# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024020# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024021
24022# This inline assembler syntax may also work for suncc and icc,
24023# so we try it on all platforms.
24024
24025{ 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 +000024026echo $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 +000024027cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024028/* confdefs.h. */
24029_ACEOF
24030cat confdefs.h >>conftest.$ac_ext
24031cat >>conftest.$ac_ext <<_ACEOF
24032/* end confdefs.h. */
24033
24034int
24035main ()
24036{
24037
Mark Dickinsona548dee2009-11-15 13:12:43 +000024038 unsigned short cw;
24039 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24040 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024041
24042 ;
24043 return 0;
24044}
24045_ACEOF
24046rm -f conftest.$ac_objext
24047if { (ac_try="$ac_compile"
24048case "(($ac_try" in
24049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24050 *) ac_try_echo=$ac_try;;
24051esac
24052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24053 (eval "$ac_compile") 2>conftest.er1
24054 ac_status=$?
24055 grep -v '^ *+' conftest.er1 >conftest.err
24056 rm -f conftest.er1
24057 cat conftest.err >&5
24058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24059 (exit $ac_status); } && {
24060 test -z "$ac_c_werror_flag" ||
24061 test ! -s conftest.err
24062 } && test -s conftest.$ac_objext; then
24063 have_gcc_asm_for_x87=yes
24064else
24065 echo "$as_me: failed program was:" >&5
24066sed 's/^/| /' conftest.$ac_ext >&5
24067
24068 have_gcc_asm_for_x87=no
24069fi
24070
24071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024072{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024073echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024074if test "$have_gcc_asm_for_x87" = yes
24075then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024076
24077cat >>confdefs.h <<\_ACEOF
24078#define HAVE_GCC_ASM_FOR_X87 1
24079_ACEOF
24080
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024081fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024082
Mark Dickinson04b27232009-01-04 12:29:36 +000024083# Detect whether system arithmetic is subject to x87-style double
24084# rounding issues. The result of this test has little meaning on non
24085# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24086# mode is round-to-nearest and double rounding issues are present, and
24087# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024088{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24089echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024090# $BASECFLAGS may affect the result
24091ac_save_cc="$CC"
24092CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024093if test "$cross_compiling" = yes; then
24094 ac_cv_x87_double_rounding=no
24095else
24096 cat >conftest.$ac_ext <<_ACEOF
24097/* confdefs.h. */
24098_ACEOF
24099cat confdefs.h >>conftest.$ac_ext
24100cat >>conftest.$ac_ext <<_ACEOF
24101/* end confdefs.h. */
24102
24103#include <stdlib.h>
24104#include <math.h>
24105int main() {
24106 volatile double x, y, z;
24107 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24108 x = 0.99999999999999989; /* 1-2**-53 */
24109 y = 1./x;
24110 if (y != 1.)
24111 exit(0);
24112 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24113 x = 1e16;
24114 y = 2.99999;
24115 z = x + y;
24116 if (z != 1e16+4.)
24117 exit(0);
24118 /* both tests show evidence of double rounding */
24119 exit(1);
24120}
24121
24122_ACEOF
24123rm -f conftest$ac_exeext
24124if { (ac_try="$ac_link"
24125case "(($ac_try" in
24126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24127 *) ac_try_echo=$ac_try;;
24128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024130 (eval "$ac_link") 2>&5
24131 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24134 { (case "(($ac_try" in
24135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24136 *) ac_try_echo=$ac_try;;
24137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024139 (eval "$ac_try") 2>&5
24140 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024142 (exit $ac_status); }; }; then
24143 ac_cv_x87_double_rounding=no
24144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024145 echo "$as_me: program exited with status $ac_status" >&5
24146echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024147sed 's/^/| /' conftest.$ac_ext >&5
24148
24149( exit $ac_status )
24150ac_cv_x87_double_rounding=yes
24151fi
24152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24153fi
24154
24155
Mark Dickinson99abd142009-10-24 13:44:16 +000024156CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024157{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24158echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024159if test "$ac_cv_x87_double_rounding" = yes
24160then
24161
24162cat >>confdefs.h <<\_ACEOF
24163#define X87_DOUBLE_ROUNDING 1
24164_ACEOF
24165
24166fi
24167
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024168# ************************************
24169# * Check for mathematical functions *
24170# ************************************
24171
24172LIBS_SAVE=$LIBS
24173LIBS="$LIBS $LIBM"
24174
Mark Dickinson265d7382008-04-21 22:32:24 +000024175# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24176# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024177{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24178echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024179if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024180 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024181else
24182
24183if test "$cross_compiling" = yes; then
24184 ac_cv_tanh_preserves_zero_sign=no
24185else
24186 cat >conftest.$ac_ext <<_ACEOF
24187/* confdefs.h. */
24188_ACEOF
24189cat confdefs.h >>conftest.$ac_ext
24190cat >>conftest.$ac_ext <<_ACEOF
24191/* end confdefs.h. */
24192
24193#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024194#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024195int main() {
24196 /* return 0 if either negative zeros don't exist
24197 on this platform or if negative zeros exist
24198 and tanh(-0.) == -0. */
24199 if (atan2(0., -1.) == atan2(-0., -1.) ||
24200 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24201 else exit(1);
24202}
24203
24204_ACEOF
24205rm -f conftest$ac_exeext
24206if { (ac_try="$ac_link"
24207case "(($ac_try" in
24208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24209 *) ac_try_echo=$ac_try;;
24210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024212 (eval "$ac_link") 2>&5
24213 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24216 { (case "(($ac_try" in
24217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24218 *) ac_try_echo=$ac_try;;
24219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024221 (eval "$ac_try") 2>&5
24222 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024224 (exit $ac_status); }; }; then
24225 ac_cv_tanh_preserves_zero_sign=yes
24226else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024227 echo "$as_me: program exited with status $ac_status" >&5
24228echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024229sed 's/^/| /' conftest.$ac_ext >&5
24230
24231( exit $ac_status )
24232ac_cv_tanh_preserves_zero_sign=no
24233fi
24234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24235fi
24236
24237
24238fi
24239
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024240{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24241echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024242if test "$ac_cv_tanh_preserves_zero_sign" = yes
24243then
24244
24245cat >>confdefs.h <<\_ACEOF
24246#define TANH_PRESERVES_ZERO_SIGN 1
24247_ACEOF
24248
24249fi
24250
Martin v. Löwis11437992002-04-12 09:54:03 +000024251
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024252
Michael W. Hudson54241132001-12-07 15:38:26 +000024253
Christian Heimes0a8143f2007-12-18 23:22:54 +000024254
24255
24256
24257
24258
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024259
Mark Dickinson65898e02009-09-05 10:27:00 +000024260for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24261do
24262as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24263{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24264echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24265if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24266 echo $ECHO_N "(cached) $ECHO_C" >&6
24267else
24268 cat >conftest.$ac_ext <<_ACEOF
24269/* confdefs.h. */
24270_ACEOF
24271cat confdefs.h >>conftest.$ac_ext
24272cat >>conftest.$ac_ext <<_ACEOF
24273/* end confdefs.h. */
24274/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24275 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24276#define $ac_func innocuous_$ac_func
24277
24278/* System header to define __stub macros and hopefully few prototypes,
24279 which can conflict with char $ac_func (); below.
24280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24281 <limits.h> exists even on freestanding compilers. */
24282
24283#ifdef __STDC__
24284# include <limits.h>
24285#else
24286# include <assert.h>
24287#endif
24288
24289#undef $ac_func
24290
24291/* Override any GCC internal prototype to avoid an error.
24292 Use char because int might match the return type of a GCC
24293 builtin and then its argument prototype would still apply. */
24294#ifdef __cplusplus
24295extern "C"
24296#endif
24297char $ac_func ();
24298/* The GNU C library defines this for functions which it implements
24299 to always fail with ENOSYS. Some functions are actually named
24300 something starting with __ and the normal name is an alias. */
24301#if defined __stub_$ac_func || defined __stub___$ac_func
24302choke me
24303#endif
24304
24305int
24306main ()
24307{
24308return $ac_func ();
24309 ;
24310 return 0;
24311}
24312_ACEOF
24313rm -f conftest.$ac_objext conftest$ac_exeext
24314if { (ac_try="$ac_link"
24315case "(($ac_try" in
24316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24317 *) ac_try_echo=$ac_try;;
24318esac
24319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24320 (eval "$ac_link") 2>conftest.er1
24321 ac_status=$?
24322 grep -v '^ *+' conftest.er1 >conftest.err
24323 rm -f conftest.er1
24324 cat conftest.err >&5
24325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24326 (exit $ac_status); } && {
24327 test -z "$ac_c_werror_flag" ||
24328 test ! -s conftest.err
24329 } && test -s conftest$ac_exeext &&
24330 $as_test_x conftest$ac_exeext; then
24331 eval "$as_ac_var=yes"
24332else
24333 echo "$as_me: failed program was:" >&5
24334sed 's/^/| /' conftest.$ac_ext >&5
24335
24336 eval "$as_ac_var=no"
24337fi
24338
24339rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24340 conftest$ac_exeext conftest.$ac_ext
24341fi
24342ac_res=`eval echo '${'$as_ac_var'}'`
24343 { echo "$as_me:$LINENO: result: $ac_res" >&5
24344echo "${ECHO_T}$ac_res" >&6; }
24345if test `eval echo '${'$as_ac_var'}'` = yes; then
24346 cat >>confdefs.h <<_ACEOF
24347#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24348_ACEOF
24349
24350fi
24351done
24352
24353
24354
24355
24356
24357
24358for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024359do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024360as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24361{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24362echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024363if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024364 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024365else
24366 cat >conftest.$ac_ext <<_ACEOF
24367/* confdefs.h. */
24368_ACEOF
24369cat confdefs.h >>conftest.$ac_ext
24370cat >>conftest.$ac_ext <<_ACEOF
24371/* end confdefs.h. */
24372/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24373 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24374#define $ac_func innocuous_$ac_func
24375
24376/* System header to define __stub macros and hopefully few prototypes,
24377 which can conflict with char $ac_func (); below.
24378 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24379 <limits.h> exists even on freestanding compilers. */
24380
24381#ifdef __STDC__
24382# include <limits.h>
24383#else
24384# include <assert.h>
24385#endif
24386
24387#undef $ac_func
24388
24389/* Override any GCC internal prototype to avoid an error.
24390 Use char because int might match the return type of a GCC
24391 builtin and then its argument prototype would still apply. */
24392#ifdef __cplusplus
24393extern "C"
24394#endif
24395char $ac_func ();
24396/* The GNU C library defines this for functions which it implements
24397 to always fail with ENOSYS. Some functions are actually named
24398 something starting with __ and the normal name is an alias. */
24399#if defined __stub_$ac_func || defined __stub___$ac_func
24400choke me
24401#endif
24402
24403int
24404main ()
24405{
24406return $ac_func ();
24407 ;
24408 return 0;
24409}
24410_ACEOF
24411rm -f conftest.$ac_objext conftest$ac_exeext
24412if { (ac_try="$ac_link"
24413case "(($ac_try" in
24414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24415 *) ac_try_echo=$ac_try;;
24416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024418 (eval "$ac_link") 2>conftest.er1
24419 ac_status=$?
24420 grep -v '^ *+' conftest.er1 >conftest.err
24421 rm -f conftest.er1
24422 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024424 (exit $ac_status); } && {
24425 test -z "$ac_c_werror_flag" ||
24426 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024427 } && test -s conftest$ac_exeext &&
24428 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024429 eval "$as_ac_var=yes"
24430else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024431 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024432sed 's/^/| /' conftest.$ac_ext >&5
24433
24434 eval "$as_ac_var=no"
24435fi
24436
24437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24438 conftest$ac_exeext conftest.$ac_ext
24439fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024440ac_res=`eval echo '${'$as_ac_var'}'`
24441 { echo "$as_me:$LINENO: result: $ac_res" >&5
24442echo "${ECHO_T}$ac_res" >&6; }
24443if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024444 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024446_ACEOF
24447
24448fi
24449done
24450
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024451{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24452echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024453if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024454 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024455else
24456 cat >conftest.$ac_ext <<_ACEOF
24457/* confdefs.h. */
24458_ACEOF
24459cat confdefs.h >>conftest.$ac_ext
24460cat >>conftest.$ac_ext <<_ACEOF
24461/* end confdefs.h. */
24462#include <math.h>
24463
24464int
24465main ()
24466{
24467#ifndef isinf
24468 (void) isinf;
24469#endif
24470
24471 ;
24472 return 0;
24473}
24474_ACEOF
24475rm -f conftest.$ac_objext
24476if { (ac_try="$ac_compile"
24477case "(($ac_try" in
24478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24479 *) ac_try_echo=$ac_try;;
24480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024482 (eval "$ac_compile") 2>conftest.er1
24483 ac_status=$?
24484 grep -v '^ *+' conftest.er1 >conftest.err
24485 rm -f conftest.er1
24486 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024488 (exit $ac_status); } && {
24489 test -z "$ac_c_werror_flag" ||
24490 test ! -s conftest.err
24491 } && test -s conftest.$ac_objext; then
24492 ac_cv_have_decl_isinf=yes
24493else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024494 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024495sed 's/^/| /' conftest.$ac_ext >&5
24496
24497 ac_cv_have_decl_isinf=no
24498fi
24499
24500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24501fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024502{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24503echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24504if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024505
24506cat >>confdefs.h <<_ACEOF
24507#define HAVE_DECL_ISINF 1
24508_ACEOF
24509
24510
24511else
24512 cat >>confdefs.h <<_ACEOF
24513#define HAVE_DECL_ISINF 0
24514_ACEOF
24515
24516
24517fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024518{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24519echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024520if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024521 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024522else
24523 cat >conftest.$ac_ext <<_ACEOF
24524/* confdefs.h. */
24525_ACEOF
24526cat confdefs.h >>conftest.$ac_ext
24527cat >>conftest.$ac_ext <<_ACEOF
24528/* end confdefs.h. */
24529#include <math.h>
24530
24531int
24532main ()
24533{
24534#ifndef isnan
24535 (void) isnan;
24536#endif
24537
24538 ;
24539 return 0;
24540}
24541_ACEOF
24542rm -f conftest.$ac_objext
24543if { (ac_try="$ac_compile"
24544case "(($ac_try" in
24545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24546 *) ac_try_echo=$ac_try;;
24547esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024549 (eval "$ac_compile") 2>conftest.er1
24550 ac_status=$?
24551 grep -v '^ *+' conftest.er1 >conftest.err
24552 rm -f conftest.er1
24553 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024555 (exit $ac_status); } && {
24556 test -z "$ac_c_werror_flag" ||
24557 test ! -s conftest.err
24558 } && test -s conftest.$ac_objext; then
24559 ac_cv_have_decl_isnan=yes
24560else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024561 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024562sed 's/^/| /' conftest.$ac_ext >&5
24563
24564 ac_cv_have_decl_isnan=no
24565fi
24566
24567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24568fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024569{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24570echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24571if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024572
24573cat >>confdefs.h <<_ACEOF
24574#define HAVE_DECL_ISNAN 1
24575_ACEOF
24576
24577
24578else
24579 cat >>confdefs.h <<_ACEOF
24580#define HAVE_DECL_ISNAN 0
24581_ACEOF
24582
24583
24584fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024585{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24586echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024587if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024588 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024589else
24590 cat >conftest.$ac_ext <<_ACEOF
24591/* confdefs.h. */
24592_ACEOF
24593cat confdefs.h >>conftest.$ac_ext
24594cat >>conftest.$ac_ext <<_ACEOF
24595/* end confdefs.h. */
24596#include <math.h>
24597
24598int
24599main ()
24600{
24601#ifndef isfinite
24602 (void) isfinite;
24603#endif
24604
24605 ;
24606 return 0;
24607}
24608_ACEOF
24609rm -f conftest.$ac_objext
24610if { (ac_try="$ac_compile"
24611case "(($ac_try" in
24612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24613 *) ac_try_echo=$ac_try;;
24614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024616 (eval "$ac_compile") 2>conftest.er1
24617 ac_status=$?
24618 grep -v '^ *+' conftest.er1 >conftest.err
24619 rm -f conftest.er1
24620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024622 (exit $ac_status); } && {
24623 test -z "$ac_c_werror_flag" ||
24624 test ! -s conftest.err
24625 } && test -s conftest.$ac_objext; then
24626 ac_cv_have_decl_isfinite=yes
24627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024628 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024629sed 's/^/| /' conftest.$ac_ext >&5
24630
24631 ac_cv_have_decl_isfinite=no
24632fi
24633
24634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24635fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024636{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24637echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24638if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024639
24640cat >>confdefs.h <<_ACEOF
24641#define HAVE_DECL_ISFINITE 1
24642_ACEOF
24643
24644
24645else
24646 cat >>confdefs.h <<_ACEOF
24647#define HAVE_DECL_ISFINITE 0
24648_ACEOF
24649
24650
24651fi
24652
24653
Christian Heimes0a8143f2007-12-18 23:22:54 +000024654
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024655LIBS=$LIBS_SAVE
24656
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024657# For multiprocessing module, check that sem_open
24658# actually works. For FreeBSD versions <= 7.2,
24659# the kernel module that provides POSIX semaphores
24660# isn't loaded by default, so an attempt to call
24661# sem_open results in a 'Signal 12' error.
24662{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24663echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24664if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24665 echo $ECHO_N "(cached) $ECHO_C" >&6
24666else
24667 if test "$cross_compiling" = yes; then
24668 ac_cv_posix_semaphores_enabled=yes
24669else
24670 cat >conftest.$ac_ext <<_ACEOF
24671/* confdefs.h. */
24672_ACEOF
24673cat confdefs.h >>conftest.$ac_ext
24674cat >>conftest.$ac_ext <<_ACEOF
24675/* end confdefs.h. */
24676
24677#include <unistd.h>
24678#include <fcntl.h>
24679#include <stdio.h>
24680#include <semaphore.h>
24681#include <sys/stat.h>
24682
24683int main(void) {
24684 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24685 if (a == SEM_FAILED) {
24686 perror("sem_open");
24687 return 1;
24688 }
24689 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024690 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024691 return 0;
24692}
24693
24694_ACEOF
24695rm -f conftest$ac_exeext
24696if { (ac_try="$ac_link"
24697case "(($ac_try" in
24698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24699 *) ac_try_echo=$ac_try;;
24700esac
24701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24702 (eval "$ac_link") 2>&5
24703 ac_status=$?
24704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24705 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24706 { (case "(($ac_try" in
24707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24708 *) ac_try_echo=$ac_try;;
24709esac
24710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24711 (eval "$ac_try") 2>&5
24712 ac_status=$?
24713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24714 (exit $ac_status); }; }; then
24715 ac_cv_posix_semaphores_enabled=yes
24716else
24717 echo "$as_me: program exited with status $ac_status" >&5
24718echo "$as_me: failed program was:" >&5
24719sed 's/^/| /' conftest.$ac_ext >&5
24720
24721( exit $ac_status )
24722ac_cv_posix_semaphores_enabled=no
24723fi
24724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24725fi
24726
24727
24728
24729fi
24730
24731{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24732echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24733if test $ac_cv_posix_semaphores_enabled = no
24734then
24735
24736cat >>confdefs.h <<\_ACEOF
24737#define POSIX_SEMAPHORES_NOT_ENABLED 1
24738_ACEOF
24739
24740fi
24741
24742# Multiprocessing check for broken sem_getvalue
24743{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24744echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24745if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24746 echo $ECHO_N "(cached) $ECHO_C" >&6
24747else
24748 if test "$cross_compiling" = yes; then
24749 ac_cv_broken_sem_getvalue=yes
24750else
24751 cat >conftest.$ac_ext <<_ACEOF
24752/* confdefs.h. */
24753_ACEOF
24754cat confdefs.h >>conftest.$ac_ext
24755cat >>conftest.$ac_ext <<_ACEOF
24756/* end confdefs.h. */
24757
24758#include <unistd.h>
24759#include <fcntl.h>
24760#include <stdio.h>
24761#include <semaphore.h>
24762#include <sys/stat.h>
24763
24764int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024765 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024766 int count;
24767 int res;
24768 if(a==SEM_FAILED){
24769 perror("sem_open");
24770 return 1;
24771
24772 }
24773 res = sem_getvalue(a, &count);
24774 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024775 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024776 return res==-1 ? 1 : 0;
24777}
24778
24779_ACEOF
24780rm -f conftest$ac_exeext
24781if { (ac_try="$ac_link"
24782case "(($ac_try" in
24783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24784 *) ac_try_echo=$ac_try;;
24785esac
24786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24787 (eval "$ac_link") 2>&5
24788 ac_status=$?
24789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24791 { (case "(($ac_try" in
24792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24793 *) ac_try_echo=$ac_try;;
24794esac
24795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24796 (eval "$ac_try") 2>&5
24797 ac_status=$?
24798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24799 (exit $ac_status); }; }; then
24800 ac_cv_broken_sem_getvalue=no
24801else
24802 echo "$as_me: program exited with status $ac_status" >&5
24803echo "$as_me: failed program was:" >&5
24804sed 's/^/| /' conftest.$ac_ext >&5
24805
24806( exit $ac_status )
24807ac_cv_broken_sem_getvalue=yes
24808fi
24809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24810fi
24811
24812
24813
24814fi
24815
24816{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24817echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24818if test $ac_cv_broken_sem_getvalue = yes
24819then
24820
24821cat >>confdefs.h <<\_ACEOF
24822#define HAVE_BROKEN_SEM_GETVALUE 1
24823_ACEOF
24824
24825fi
24826
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024827# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024828{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24829echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024830# Check whether --enable-big-digits was given.
24831if test "${enable_big_digits+set}" = set; then
24832 enableval=$enable_big_digits; case $enable_big_digits in
24833yes)
24834 enable_big_digits=30 ;;
24835no)
24836 enable_big_digits=15 ;;
2483715|30)
24838 ;;
24839*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024840 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24841echo "$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 +000024842 { (exit 1); exit 1; }; } ;;
24843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024844{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24845echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024846
24847cat >>confdefs.h <<_ACEOF
24848#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24849_ACEOF
24850
24851
24852else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024853 { echo "$as_me:$LINENO: result: no value specified" >&5
24854echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024855fi
24856
24857
Guido van Rossumef2255b2000-03-10 22:30:29 +000024858# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024859if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024860 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24861echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024862if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024863 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024864fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24866echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024867else
Martin v. Löwis11437992002-04-12 09:54:03 +000024868 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024869{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24870echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024872/* confdefs.h. */
24873_ACEOF
24874cat confdefs.h >>conftest.$ac_ext
24875cat >>conftest.$ac_ext <<_ACEOF
24876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024877$ac_includes_default
24878#include <wchar.h>
24879_ACEOF
24880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024881if { (ac_try="$ac_compile"
24882case "(($ac_try" in
24883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24884 *) ac_try_echo=$ac_try;;
24885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024889 grep -v '^ *+' conftest.er1 >conftest.err
24890 rm -f conftest.er1
24891 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024893 (exit $ac_status); } && {
24894 test -z "$ac_c_werror_flag" ||
24895 test ! -s conftest.err
24896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024897 ac_header_compiler=yes
24898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024900sed 's/^/| /' conftest.$ac_ext >&5
24901
Martin v. Löwiseba40652007-08-30 20:10:57 +000024902 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024904
24905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024906{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24907echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024908
24909# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024910{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24911echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024913/* confdefs.h. */
24914_ACEOF
24915cat confdefs.h >>conftest.$ac_ext
24916cat >>conftest.$ac_ext <<_ACEOF
24917/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024918#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024919_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920if { (ac_try="$ac_cpp conftest.$ac_ext"
24921case "(($ac_try" in
24922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24923 *) ac_try_echo=$ac_try;;
24924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024927 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024928 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 rm -f conftest.er1
24930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024932 (exit $ac_status); } >/dev/null && {
24933 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24934 test ! -s conftest.err
24935 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024936 ac_header_preproc=yes
24937else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024939sed 's/^/| /' conftest.$ac_ext >&5
24940
Martin v. Löwis11437992002-04-12 09:54:03 +000024941 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024943
Martin v. Löwis11437992002-04-12 09:54:03 +000024944rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024945{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24946echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024947
24948# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024949case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24950 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024951 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24952echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24953 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24954echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024955 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024956 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024957 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024958 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24959echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24960 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24961echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24962 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24963echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24964 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24965echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24966 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24967echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24968 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24969echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024970 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024971## -------------------------------------- ##
24972## Report this to http://bugs.python.org/ ##
24973## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024974_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024976 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024978{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24979echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024980if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024982else
24983 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024984fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024985{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24986echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024987
24988fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024989if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024990
24991
24992cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024993#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024994_ACEOF
24995
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024996 wchar_h="yes"
24997
Guido van Rossumef2255b2000-03-10 22:30:29 +000024998else
Martin v. Löwis11437992002-04-12 09:54:03 +000024999 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025000
25001fi
25002
Michael W. Hudson54241132001-12-07 15:38:26 +000025003
Martin v. Löwis11437992002-04-12 09:54:03 +000025004
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025005# determine wchar_t size
25006if test "$wchar_h" = yes
25007then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025008 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25009echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25010if test "${ac_cv_type_wchar_t+set}" = set; then
25011 echo $ECHO_N "(cached) $ECHO_C" >&6
25012else
25013 cat >conftest.$ac_ext <<_ACEOF
25014/* confdefs.h. */
25015_ACEOF
25016cat confdefs.h >>conftest.$ac_ext
25017cat >>conftest.$ac_ext <<_ACEOF
25018/* end confdefs.h. */
25019#include <wchar.h>
25020
25021typedef wchar_t ac__type_new_;
25022int
25023main ()
25024{
25025if ((ac__type_new_ *) 0)
25026 return 0;
25027if (sizeof (ac__type_new_))
25028 return 0;
25029 ;
25030 return 0;
25031}
25032_ACEOF
25033rm -f conftest.$ac_objext
25034if { (ac_try="$ac_compile"
25035case "(($ac_try" in
25036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25037 *) ac_try_echo=$ac_try;;
25038esac
25039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25040 (eval "$ac_compile") 2>conftest.er1
25041 ac_status=$?
25042 grep -v '^ *+' conftest.er1 >conftest.err
25043 rm -f conftest.er1
25044 cat conftest.err >&5
25045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25046 (exit $ac_status); } && {
25047 test -z "$ac_c_werror_flag" ||
25048 test ! -s conftest.err
25049 } && test -s conftest.$ac_objext; then
25050 ac_cv_type_wchar_t=yes
25051else
25052 echo "$as_me: failed program was:" >&5
25053sed 's/^/| /' conftest.$ac_ext >&5
25054
25055 ac_cv_type_wchar_t=no
25056fi
25057
25058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25059fi
25060{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25061echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25062
25063# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25066# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025067{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25068echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025069if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025070 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025071else
Martin v. Löwis11437992002-04-12 09:54:03 +000025072 if test "$cross_compiling" = yes; then
25073 # Depending upon the size, compute the lo and hi bounds.
25074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025075/* confdefs.h. */
25076_ACEOF
25077cat confdefs.h >>conftest.$ac_ext
25078cat >>conftest.$ac_ext <<_ACEOF
25079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025080#include <wchar.h>
25081
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025082 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025083int
25084main ()
25085{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025086static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025087test_array [0] = 0
25088
25089 ;
25090 return 0;
25091}
25092_ACEOF
25093rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025094if { (ac_try="$ac_compile"
25095case "(($ac_try" in
25096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25097 *) ac_try_echo=$ac_try;;
25098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025102 grep -v '^ *+' conftest.er1 >conftest.err
25103 rm -f conftest.er1
25104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025106 (exit $ac_status); } && {
25107 test -z "$ac_c_werror_flag" ||
25108 test ! -s conftest.err
25109 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025110 ac_lo=0 ac_mid=0
25111 while :; do
25112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025113/* confdefs.h. */
25114_ACEOF
25115cat confdefs.h >>conftest.$ac_ext
25116cat >>conftest.$ac_ext <<_ACEOF
25117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025118#include <wchar.h>
25119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025120 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025121int
25122main ()
25123{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025125test_array [0] = 0
25126
25127 ;
25128 return 0;
25129}
25130_ACEOF
25131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025132if { (ac_try="$ac_compile"
25133case "(($ac_try" in
25134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25135 *) ac_try_echo=$ac_try;;
25136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025140 grep -v '^ *+' conftest.er1 >conftest.err
25141 rm -f conftest.er1
25142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025144 (exit $ac_status); } && {
25145 test -z "$ac_c_werror_flag" ||
25146 test ! -s conftest.err
25147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025148 ac_hi=$ac_mid; break
25149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025151sed 's/^/| /' conftest.$ac_ext >&5
25152
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153 ac_lo=`expr $ac_mid + 1`
25154 if test $ac_lo -le $ac_mid; then
25155 ac_lo= ac_hi=
25156 break
25157 fi
25158 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025160
25161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025162 done
25163else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025165sed 's/^/| /' conftest.$ac_ext >&5
25166
Martin v. Löwiseba40652007-08-30 20:10:57 +000025167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025168/* confdefs.h. */
25169_ACEOF
25170cat confdefs.h >>conftest.$ac_ext
25171cat >>conftest.$ac_ext <<_ACEOF
25172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025173#include <wchar.h>
25174
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025175 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025176int
25177main ()
25178{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025180test_array [0] = 0
25181
25182 ;
25183 return 0;
25184}
25185_ACEOF
25186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025187if { (ac_try="$ac_compile"
25188case "(($ac_try" in
25189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25190 *) ac_try_echo=$ac_try;;
25191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025195 grep -v '^ *+' conftest.er1 >conftest.err
25196 rm -f conftest.er1
25197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199 (exit $ac_status); } && {
25200 test -z "$ac_c_werror_flag" ||
25201 test ! -s conftest.err
25202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025203 ac_hi=-1 ac_mid=-1
25204 while :; do
25205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025206/* confdefs.h. */
25207_ACEOF
25208cat confdefs.h >>conftest.$ac_ext
25209cat >>conftest.$ac_ext <<_ACEOF
25210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025211#include <wchar.h>
25212
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025213 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025214int
25215main ()
25216{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025218test_array [0] = 0
25219
25220 ;
25221 return 0;
25222}
25223_ACEOF
25224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025225if { (ac_try="$ac_compile"
25226case "(($ac_try" in
25227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25228 *) ac_try_echo=$ac_try;;
25229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025233 grep -v '^ *+' conftest.er1 >conftest.err
25234 rm -f conftest.er1
25235 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025237 (exit $ac_status); } && {
25238 test -z "$ac_c_werror_flag" ||
25239 test ! -s conftest.err
25240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025241 ac_lo=$ac_mid; break
25242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025244sed 's/^/| /' conftest.$ac_ext >&5
25245
Martin v. Löwiseba40652007-08-30 20:10:57 +000025246 ac_hi=`expr '(' $ac_mid ')' - 1`
25247 if test $ac_mid -le $ac_hi; then
25248 ac_lo= ac_hi=
25249 break
25250 fi
25251 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253
25254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025255 done
25256else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025258sed 's/^/| /' conftest.$ac_ext >&5
25259
Martin v. Löwiseba40652007-08-30 20:10:57 +000025260 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262
25263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265
25266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025267# Binary search between lo and hi bounds.
25268while test "x$ac_lo" != "x$ac_hi"; do
25269 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025271/* confdefs.h. */
25272_ACEOF
25273cat confdefs.h >>conftest.$ac_ext
25274cat >>conftest.$ac_ext <<_ACEOF
25275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025276#include <wchar.h>
25277
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025278 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025279int
25280main ()
25281{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025283test_array [0] = 0
25284
25285 ;
25286 return 0;
25287}
25288_ACEOF
25289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025290if { (ac_try="$ac_compile"
25291case "(($ac_try" in
25292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25293 *) ac_try_echo=$ac_try;;
25294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025298 grep -v '^ *+' conftest.er1 >conftest.err
25299 rm -f conftest.er1
25300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025302 (exit $ac_status); } && {
25303 test -z "$ac_c_werror_flag" ||
25304 test ! -s conftest.err
25305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025306 ac_hi=$ac_mid
25307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025309sed 's/^/| /' conftest.$ac_ext >&5
25310
Martin v. Löwiseba40652007-08-30 20:10:57 +000025311 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313
25314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025315done
25316case $ac_lo in
25317?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025318'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025319 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025320See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025321echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025322See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025323 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025324 else
25325 ac_cv_sizeof_wchar_t=0
25326 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025327esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025328else
Martin v. Löwis11437992002-04-12 09:54:03 +000025329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025330/* confdefs.h. */
25331_ACEOF
25332cat confdefs.h >>conftest.$ac_ext
25333cat >>conftest.$ac_ext <<_ACEOF
25334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025335#include <wchar.h>
25336
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025337 typedef wchar_t ac__type_sizeof_;
25338static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25339static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025340#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025341#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025342int
25343main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025344{
Martin v. Löwis11437992002-04-12 09:54:03 +000025345
25346 FILE *f = fopen ("conftest.val", "w");
25347 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025348 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025349 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025352 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025354 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025355 }
25356 else
25357 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025358 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025359 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025361 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025363 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025364
25365 ;
25366 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025367}
Martin v. Löwis11437992002-04-12 09:54:03 +000025368_ACEOF
25369rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025370if { (ac_try="$ac_link"
25371case "(($ac_try" in
25372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25373 *) ac_try_echo=$ac_try;;
25374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025376 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025377 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025379 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025380 { (case "(($ac_try" in
25381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25382 *) ac_try_echo=$ac_try;;
25383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025385 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025386 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025388 (exit $ac_status); }; }; then
25389 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025391 echo "$as_me: program exited with status $ac_status" >&5
25392echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025393sed 's/^/| /' conftest.$ac_ext >&5
25394
Martin v. Löwis11437992002-04-12 09:54:03 +000025395( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025396if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025397 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025398See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025399echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025400See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025401 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025402 else
25403 ac_cv_sizeof_wchar_t=0
25404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025406rm -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 +000025407fi
25408rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025409fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025410{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25411echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025412
25413
25414
Martin v. Löwis11437992002-04-12 09:54:03 +000025415cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025416#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025417_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025418
Michael W. Hudson54241132001-12-07 15:38:26 +000025419
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025420fi
25421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025422{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25423echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025424have_ucs4_tcl=no
25425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025426/* confdefs.h. */
25427_ACEOF
25428cat confdefs.h >>conftest.$ac_ext
25429cat >>conftest.$ac_ext <<_ACEOF
25430/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025431
25432#include <tcl.h>
25433#if TCL_UTF_MAX != 6
25434# error "NOT UCS4_TCL"
25435#endif
25436int
25437main ()
25438{
25439
25440 ;
25441 return 0;
25442}
25443_ACEOF
25444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025445if { (ac_try="$ac_compile"
25446case "(($ac_try" in
25447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25448 *) ac_try_echo=$ac_try;;
25449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025453 grep -v '^ *+' conftest.er1 >conftest.err
25454 rm -f conftest.er1
25455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025457 (exit $ac_status); } && {
25458 test -z "$ac_c_werror_flag" ||
25459 test ! -s conftest.err
25460 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025461
25462
25463cat >>confdefs.h <<\_ACEOF
25464#define HAVE_UCS4_TCL 1
25465_ACEOF
25466
25467 have_ucs4_tcl=yes
25468
25469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025471sed 's/^/| /' conftest.$ac_ext >&5
25472
Martin v. Löwiseba40652007-08-30 20:10:57 +000025473
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475
25476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025477{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25478echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025479
Skip Montanaro6dead952003-09-25 14:50:04 +000025480# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025481if test "$wchar_h" = yes
25482then
25483 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025484 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25485echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025486 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025487 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025488else
25489
25490 if test "$cross_compiling" = yes; then
25491 ac_cv_wchar_t_signed=yes
25492else
25493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025494/* confdefs.h. */
25495_ACEOF
25496cat confdefs.h >>conftest.$ac_ext
25497cat >>conftest.$ac_ext <<_ACEOF
25498/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025499
25500 #include <wchar.h>
25501 int main()
25502 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025503 /* Success: exit code 0 */
25504 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025505 }
25506
25507_ACEOF
25508rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509if { (ac_try="$ac_link"
25510case "(($ac_try" in
25511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25512 *) ac_try_echo=$ac_try;;
25513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025515 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025516 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025518 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025519 { (case "(($ac_try" in
25520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25521 *) ac_try_echo=$ac_try;;
25522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025524 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025525 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025527 (exit $ac_status); }; }; then
25528 ac_cv_wchar_t_signed=yes
25529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025530 echo "$as_me: program exited with status $ac_status" >&5
25531echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025532sed 's/^/| /' conftest.$ac_ext >&5
25533
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025534( exit $ac_status )
25535ac_cv_wchar_t_signed=no
25536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025537rm -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 +000025538fi
25539
Martin v. Löwiseba40652007-08-30 20:10:57 +000025540
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025541fi
25542
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025543 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25544echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025545fi
25546
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025547{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25548echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025549# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025550if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025551 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025552else
25553 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025554fi
25555
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025556
25557if test $enable_unicode = yes
25558then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025559 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025560 case "$have_ucs4_tcl" in
25561 yes) enable_unicode="ucs4"
25562 ;;
25563 *) enable_unicode="ucs2"
25564 ;;
25565 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025566fi
25567
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025568
25569
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025570case "$enable_unicode" in
25571ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025572 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025573#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025574_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025575
25576 ;;
25577ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025578 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025579#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025580_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025581
25582 ;;
25583esac
25584
Michael W. Hudson54241132001-12-07 15:38:26 +000025585
Martin v. Löwis11437992002-04-12 09:54:03 +000025586
25587
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025588
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025589if test "$enable_unicode" = "no"
25590then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025591 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025592 { echo "$as_me:$LINENO: result: not used" >&5
25593echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025594else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025595 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025596
25597cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025598#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025599_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025600
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025601
25602 # wchar_t is only usable if it maps to an unsigned type
25603 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025604 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025605 then
25606 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025607
Martin v. Löwis11437992002-04-12 09:54:03 +000025608cat >>confdefs.h <<\_ACEOF
25609#define HAVE_USABLE_WCHAR_T 1
25610_ACEOF
25611
25612 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025613#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025614_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025615
25616 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25617 then
25618 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025619 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025620#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025621_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025622
25623 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25624 then
25625 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025626 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025627#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025628_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025629
25630 else
25631 PY_UNICODE_TYPE="no type found"
25632 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025633 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25634echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025635fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025636
25637# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025638{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25639echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025640if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025643 # See if sys/param.h defines the BYTE_ORDER macro.
25644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025645/* confdefs.h. */
25646_ACEOF
25647cat confdefs.h >>conftest.$ac_ext
25648cat >>conftest.$ac_ext <<_ACEOF
25649/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025650#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025651#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025652
Martin v. Löwis11437992002-04-12 09:54:03 +000025653int
25654main ()
25655{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025656#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25657 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25658 bogus endian macros
25659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025660
25661 ;
25662 return 0;
25663}
25664_ACEOF
25665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025666if { (ac_try="$ac_compile"
25667case "(($ac_try" in
25668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25669 *) ac_try_echo=$ac_try;;
25670esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025674 grep -v '^ *+' conftest.er1 >conftest.err
25675 rm -f conftest.er1
25676 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025678 (exit $ac_status); } && {
25679 test -z "$ac_c_werror_flag" ||
25680 test ! -s conftest.err
25681 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025682 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025684/* confdefs.h. */
25685_ACEOF
25686cat confdefs.h >>conftest.$ac_ext
25687cat >>conftest.$ac_ext <<_ACEOF
25688/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025689#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025690#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025691
Martin v. Löwis11437992002-04-12 09:54:03 +000025692int
25693main ()
25694{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025695#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696 not big endian
25697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025698
25699 ;
25700 return 0;
25701}
25702_ACEOF
25703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025704if { (ac_try="$ac_compile"
25705case "(($ac_try" in
25706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25707 *) ac_try_echo=$ac_try;;
25708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025712 grep -v '^ *+' conftest.er1 >conftest.err
25713 rm -f conftest.er1
25714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025716 (exit $ac_status); } && {
25717 test -z "$ac_c_werror_flag" ||
25718 test ! -s conftest.err
25719 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025720 ac_cv_c_bigendian=yes
25721else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025723sed 's/^/| /' conftest.$ac_ext >&5
25724
Martin v. Löwiseba40652007-08-30 20:10:57 +000025725 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727
25728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025729else
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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025733 # It does not; compile a test program.
25734if test "$cross_compiling" = yes; then
25735 # try to guess the endianness by grepping values into an object file
25736 ac_cv_c_bigendian=unknown
25737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025738/* confdefs.h. */
25739_ACEOF
25740cat confdefs.h >>conftest.$ac_ext
25741cat >>conftest.$ac_ext <<_ACEOF
25742/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025743short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25744short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25745void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25746short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25747short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25748void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025749int
25750main ()
25751{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025752 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025753 ;
25754 return 0;
25755}
25756_ACEOF
25757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025758if { (ac_try="$ac_compile"
25759case "(($ac_try" in
25760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25761 *) ac_try_echo=$ac_try;;
25762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025766 grep -v '^ *+' conftest.er1 >conftest.err
25767 rm -f conftest.er1
25768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025770 (exit $ac_status); } && {
25771 test -z "$ac_c_werror_flag" ||
25772 test ! -s conftest.err
25773 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025774 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025775 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025776fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025777if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25778 if test "$ac_cv_c_bigendian" = unknown; then
25779 ac_cv_c_bigendian=no
25780 else
25781 # finding both strings is unlikely to happen, but who knows?
25782 ac_cv_c_bigendian=unknown
25783 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025784fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025787sed 's/^/| /' conftest.$ac_ext >&5
25788
Martin v. Löwiseba40652007-08-30 20:10:57 +000025789
Martin v. Löwis11437992002-04-12 09:54:03 +000025790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025791
25792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025793else
25794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025795/* confdefs.h. */
25796_ACEOF
25797cat confdefs.h >>conftest.$ac_ext
25798cat >>conftest.$ac_ext <<_ACEOF
25799/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025800$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025801int
25802main ()
25803{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025805 /* Are we little or big endian? From Harbison&Steele. */
25806 union
25807 {
25808 long int l;
25809 char c[sizeof (long int)];
25810 } u;
25811 u.l = 1;
25812 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025813
25814 ;
25815 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025816}
Martin v. Löwis11437992002-04-12 09:54:03 +000025817_ACEOF
25818rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819if { (ac_try="$ac_link"
25820case "(($ac_try" in
25821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25822 *) ac_try_echo=$ac_try;;
25823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025826 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025829 { (case "(($ac_try" in
25830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25831 *) ac_try_echo=$ac_try;;
25832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025837 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025838 ac_cv_c_bigendian=no
25839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025840 echo "$as_me: program exited with status $ac_status" >&5
25841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025842sed 's/^/| /' conftest.$ac_ext >&5
25843
Martin v. Löwis11437992002-04-12 09:54:03 +000025844( exit $ac_status )
25845ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025847rm -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 +000025848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025849
25850
Martin v. Löwis11437992002-04-12 09:54:03 +000025851fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025852
25853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25854fi
25855{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25856echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25857case $ac_cv_c_bigendian in
25858 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025859
25860cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025861#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025862_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025863 ;;
25864 no)
25865 ;;
25866 *)
25867 { { echo "$as_me:$LINENO: error: unknown endianness
25868presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25869echo "$as_me: error: unknown endianness
25870presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025871 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025872esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025873
Michael W. Hudson54241132001-12-07 15:38:26 +000025874
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025875# Check whether right shifting a negative integer extends the sign bit
25876# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025877{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25878echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025879if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025880 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025881else
Martin v. Löwis11437992002-04-12 09:54:03 +000025882
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025883if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025884 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025885else
Martin v. Löwis11437992002-04-12 09:54:03 +000025886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025887/* confdefs.h. */
25888_ACEOF
25889cat confdefs.h >>conftest.$ac_ext
25890cat >>conftest.$ac_ext <<_ACEOF
25891/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025892
25893int main()
25894{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025895 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025896}
25897
Martin v. Löwis11437992002-04-12 09:54:03 +000025898_ACEOF
25899rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025900if { (ac_try="$ac_link"
25901case "(($ac_try" in
25902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25903 *) ac_try_echo=$ac_try;;
25904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025907 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025910 { (case "(($ac_try" in
25911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25912 *) ac_try_echo=$ac_try;;
25913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025916 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025918 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025919 ac_cv_rshift_extends_sign=yes
25920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025921 echo "$as_me: program exited with status $ac_status" >&5
25922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025923sed 's/^/| /' conftest.$ac_ext >&5
25924
Martin v. Löwis11437992002-04-12 09:54:03 +000025925( exit $ac_status )
25926ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025928rm -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 +000025929fi
25930
Martin v. Löwiseba40652007-08-30 20:10:57 +000025931
25932fi
25933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025934{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25935echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025936if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025937then
Martin v. Löwis11437992002-04-12 09:54:03 +000025938
25939cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025940#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025941_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025942
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025943fi
25944
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025945# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025946{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25947echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025948if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025950else
Martin v. Löwis11437992002-04-12 09:54:03 +000025951
25952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025953/* confdefs.h. */
25954_ACEOF
25955cat confdefs.h >>conftest.$ac_ext
25956cat >>conftest.$ac_ext <<_ACEOF
25957/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025958#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025959int
25960main ()
25961{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025962
25963 FILE *f = fopen("/dev/null", "r");
25964 flockfile(f);
25965 getc_unlocked(f);
25966 funlockfile(f);
25967
Martin v. Löwis11437992002-04-12 09:54:03 +000025968 ;
25969 return 0;
25970}
25971_ACEOF
25972rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025973if { (ac_try="$ac_link"
25974case "(($ac_try" in
25975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25976 *) ac_try_echo=$ac_try;;
25977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025979 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025981 grep -v '^ *+' conftest.er1 >conftest.err
25982 rm -f conftest.er1
25983 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025985 (exit $ac_status); } && {
25986 test -z "$ac_c_werror_flag" ||
25987 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025988 } && test -s conftest$ac_exeext &&
25989 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025990 ac_cv_have_getc_unlocked=yes
25991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025993sed 's/^/| /' conftest.$ac_ext >&5
25994
Martin v. Löwiseba40652007-08-30 20:10:57 +000025995 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025997
25998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025999 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026000fi
26001
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026002{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26003echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026004if test "$ac_cv_have_getc_unlocked" = yes
26005then
Martin v. Löwis11437992002-04-12 09:54:03 +000026006
26007cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026008#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026009_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026010
26011fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026012
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026013# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026014# save the value of LIBS so we don't actually link Python with readline
26015LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026016
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026017# On some systems we need to link readline to a termcap compatible
26018# library. NOTE: Keep the precedence of listed libraries synchronised
26019# with setup.py.
26020py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026021{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26022echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026023for py_libtermcap in "" ncursesw ncurses curses termcap; do
26024 if test -z "$py_libtermcap"; then
26025 READLINE_LIBS="-lreadline"
26026 else
26027 READLINE_LIBS="-lreadline -l$py_libtermcap"
26028 fi
26029 LIBS="$READLINE_LIBS $LIBS_no_readline"
26030 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026031/* confdefs.h. */
26032_ACEOF
26033cat confdefs.h >>conftest.$ac_ext
26034cat >>conftest.$ac_ext <<_ACEOF
26035/* end confdefs.h. */
26036
Martin v. Löwiseba40652007-08-30 20:10:57 +000026037/* Override any GCC internal prototype to avoid an error.
26038 Use char because int might match the return type of a GCC
26039 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026040#ifdef __cplusplus
26041extern "C"
26042#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026043char readline ();
26044int
26045main ()
26046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026047return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026048 ;
26049 return 0;
26050}
26051_ACEOF
26052rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026053if { (ac_try="$ac_link"
26054case "(($ac_try" in
26055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26056 *) ac_try_echo=$ac_try;;
26057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026059 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026060 ac_status=$?
26061 grep -v '^ *+' conftest.er1 >conftest.err
26062 rm -f conftest.er1
26063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026065 (exit $ac_status); } && {
26066 test -z "$ac_c_werror_flag" ||
26067 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026068 } && test -s conftest$ac_exeext &&
26069 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026070 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026072 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026073sed 's/^/| /' conftest.$ac_ext >&5
26074
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026075
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026077
26078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026079 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026080 if test $py_cv_lib_readline = yes; then
26081 break
26082 fi
26083done
26084# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26085#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026086if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026087 { echo "$as_me:$LINENO: result: none" >&5
26088echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026089else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026090 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26091echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026092
26093cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026094#define HAVE_LIBREADLINE 1
26095_ACEOF
26096
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026097fi
26098
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026099# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026100{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26101echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026102if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026103 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026104else
26105 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026106LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026107cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026108/* confdefs.h. */
26109_ACEOF
26110cat confdefs.h >>conftest.$ac_ext
26111cat >>conftest.$ac_ext <<_ACEOF
26112/* end confdefs.h. */
26113
Martin v. Löwiseba40652007-08-30 20:10:57 +000026114/* Override any GCC internal prototype to avoid an error.
26115 Use char because int might match the return type of a GCC
26116 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026117#ifdef __cplusplus
26118extern "C"
26119#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026120char rl_callback_handler_install ();
26121int
26122main ()
26123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026124return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026125 ;
26126 return 0;
26127}
26128_ACEOF
26129rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026130if { (ac_try="$ac_link"
26131case "(($ac_try" in
26132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26133 *) ac_try_echo=$ac_try;;
26134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026136 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026138 grep -v '^ *+' conftest.er1 >conftest.err
26139 rm -f conftest.er1
26140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026142 (exit $ac_status); } && {
26143 test -z "$ac_c_werror_flag" ||
26144 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026145 } && test -s conftest$ac_exeext &&
26146 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026147 ac_cv_lib_readline_rl_callback_handler_install=yes
26148else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026149 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026150sed 's/^/| /' conftest.$ac_ext >&5
26151
Martin v. Löwiseba40652007-08-30 20:10:57 +000026152 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026154
26155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026157LIBS=$ac_check_lib_save_LIBS
26158fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026159{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26160echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26161if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026162
26163cat >>confdefs.h <<\_ACEOF
26164#define HAVE_RL_CALLBACK 1
26165_ACEOF
26166
26167fi
26168
26169
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026170# check for readline 2.2
26171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026172/* confdefs.h. */
26173_ACEOF
26174cat confdefs.h >>conftest.$ac_ext
26175cat >>conftest.$ac_ext <<_ACEOF
26176/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026177#include <readline/readline.h>
26178_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026179if { (ac_try="$ac_cpp conftest.$ac_ext"
26180case "(($ac_try" in
26181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26182 *) ac_try_echo=$ac_try;;
26183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026185 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026186 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026187 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026188 rm -f conftest.er1
26189 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026191 (exit $ac_status); } >/dev/null && {
26192 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26193 test ! -s conftest.err
26194 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026195 have_readline=yes
26196else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026198sed 's/^/| /' conftest.$ac_ext >&5
26199
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026200 have_readline=no
26201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026202
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026203rm -f conftest.err conftest.$ac_ext
26204if test $have_readline = yes
26205then
26206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026207/* confdefs.h. */
26208_ACEOF
26209cat confdefs.h >>conftest.$ac_ext
26210cat >>conftest.$ac_ext <<_ACEOF
26211/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026212#include <readline/readline.h>
26213
26214_ACEOF
26215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026216 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026217
26218cat >>confdefs.h <<\_ACEOF
26219#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26220_ACEOF
26221
26222fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026223rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026224
26225 cat >conftest.$ac_ext <<_ACEOF
26226/* confdefs.h. */
26227_ACEOF
26228cat confdefs.h >>conftest.$ac_ext
26229cat >>conftest.$ac_ext <<_ACEOF
26230/* end confdefs.h. */
26231#include <readline/readline.h>
26232
26233_ACEOF
26234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26235 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26236
26237cat >>confdefs.h <<\_ACEOF
26238#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26239_ACEOF
26240
26241fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026242rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026243
26244fi
26245
Martin v. Löwis0daad592001-09-30 21:09:59 +000026246# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026247{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26248echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026249if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026251else
Martin v. Löwis11437992002-04-12 09:54:03 +000026252 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026253LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026255/* confdefs.h. */
26256_ACEOF
26257cat confdefs.h >>conftest.$ac_ext
26258cat >>conftest.$ac_ext <<_ACEOF
26259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026260
Martin v. Löwiseba40652007-08-30 20:10:57 +000026261/* Override any GCC internal prototype to avoid an error.
26262 Use char because int might match the return type of a GCC
26263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026264#ifdef __cplusplus
26265extern "C"
26266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026267char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026268int
26269main ()
26270{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026271return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026272 ;
26273 return 0;
26274}
26275_ACEOF
26276rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026277if { (ac_try="$ac_link"
26278case "(($ac_try" in
26279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26280 *) ac_try_echo=$ac_try;;
26281esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026283 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026285 grep -v '^ *+' conftest.er1 >conftest.err
26286 rm -f conftest.er1
26287 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289 (exit $ac_status); } && {
26290 test -z "$ac_c_werror_flag" ||
26291 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026292 } && test -s conftest$ac_exeext &&
26293 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026294 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026295else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026297sed 's/^/| /' conftest.$ac_ext >&5
26298
Martin v. Löwiseba40652007-08-30 20:10:57 +000026299 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026301
26302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026304LIBS=$ac_check_lib_save_LIBS
26305fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026306{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26307echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26308if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026309
Martin v. Löwis11437992002-04-12 09:54:03 +000026310cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026311#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026312_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026313
Martin v. Löwis0daad592001-09-30 21:09:59 +000026314fi
26315
Michael W. Hudson54241132001-12-07 15:38:26 +000026316
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026317# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026318{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26319echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026320if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026322else
26323 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026324LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026325cat >conftest.$ac_ext <<_ACEOF
26326/* confdefs.h. */
26327_ACEOF
26328cat confdefs.h >>conftest.$ac_ext
26329cat >>conftest.$ac_ext <<_ACEOF
26330/* end confdefs.h. */
26331
26332/* Override any GCC internal prototype to avoid an error.
26333 Use char because int might match the return type of a GCC
26334 builtin and then its argument prototype would still apply. */
26335#ifdef __cplusplus
26336extern "C"
26337#endif
26338char rl_completion_display_matches_hook ();
26339int
26340main ()
26341{
26342return rl_completion_display_matches_hook ();
26343 ;
26344 return 0;
26345}
26346_ACEOF
26347rm -f conftest.$ac_objext conftest$ac_exeext
26348if { (ac_try="$ac_link"
26349case "(($ac_try" in
26350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26351 *) ac_try_echo=$ac_try;;
26352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026354 (eval "$ac_link") 2>conftest.er1
26355 ac_status=$?
26356 grep -v '^ *+' conftest.er1 >conftest.err
26357 rm -f conftest.er1
26358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026360 (exit $ac_status); } && {
26361 test -z "$ac_c_werror_flag" ||
26362 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026363 } && test -s conftest$ac_exeext &&
26364 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026365 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026367 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026368sed 's/^/| /' conftest.$ac_ext >&5
26369
26370 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26371fi
26372
26373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26374 conftest$ac_exeext conftest.$ac_ext
26375LIBS=$ac_check_lib_save_LIBS
26376fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026377{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26378echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26379if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026380
26381cat >>confdefs.h <<\_ACEOF
26382#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26383_ACEOF
26384
26385fi
26386
26387
Martin v. Löwis0daad592001-09-30 21:09:59 +000026388# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026389{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26390echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026391if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026393else
Martin v. Löwis11437992002-04-12 09:54:03 +000026394 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026395LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026397/* confdefs.h. */
26398_ACEOF
26399cat confdefs.h >>conftest.$ac_ext
26400cat >>conftest.$ac_ext <<_ACEOF
26401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026402
Martin v. Löwiseba40652007-08-30 20:10:57 +000026403/* Override any GCC internal prototype to avoid an error.
26404 Use char because int might match the return type of a GCC
26405 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026406#ifdef __cplusplus
26407extern "C"
26408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026409char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026410int
26411main ()
26412{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026413return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026414 ;
26415 return 0;
26416}
26417_ACEOF
26418rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026419if { (ac_try="$ac_link"
26420case "(($ac_try" in
26421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26422 *) ac_try_echo=$ac_try;;
26423esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026425 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026427 grep -v '^ *+' conftest.er1 >conftest.err
26428 rm -f conftest.er1
26429 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026431 (exit $ac_status); } && {
26432 test -z "$ac_c_werror_flag" ||
26433 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026434 } && test -s conftest$ac_exeext &&
26435 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026436 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026439sed 's/^/| /' conftest.$ac_ext >&5
26440
Martin v. Löwiseba40652007-08-30 20:10:57 +000026441 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443
26444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026446LIBS=$ac_check_lib_save_LIBS
26447fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026448{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26449echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26450if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026451
Martin v. Löwis11437992002-04-12 09:54:03 +000026452cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026453#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026454_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026455
Guido van Rossum353ae582001-07-10 16:45:32 +000026456fi
26457
Jack Jansendd19cf82001-12-06 22:36:17 +000026458
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026459# also in readline 4.2
26460cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026461/* confdefs.h. */
26462_ACEOF
26463cat confdefs.h >>conftest.$ac_ext
26464cat >>conftest.$ac_ext <<_ACEOF
26465/* end confdefs.h. */
26466#include <readline/readline.h>
26467_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026468if { (ac_try="$ac_cpp conftest.$ac_ext"
26469case "(($ac_try" in
26470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26471 *) ac_try_echo=$ac_try;;
26472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026475 ac_status=$?
26476 grep -v '^ *+' conftest.er1 >conftest.err
26477 rm -f conftest.er1
26478 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026480 (exit $ac_status); } >/dev/null && {
26481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26482 test ! -s conftest.err
26483 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026484 have_readline=yes
26485else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026486 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026487sed 's/^/| /' conftest.$ac_ext >&5
26488
26489 have_readline=no
26490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026491
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026492rm -f conftest.err conftest.$ac_ext
26493if test $have_readline = yes
26494then
26495 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026496/* confdefs.h. */
26497_ACEOF
26498cat confdefs.h >>conftest.$ac_ext
26499cat >>conftest.$ac_ext <<_ACEOF
26500/* end confdefs.h. */
26501#include <readline/readline.h>
26502
26503_ACEOF
26504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26505 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26506
26507cat >>confdefs.h <<\_ACEOF
26508#define HAVE_RL_CATCH_SIGNAL 1
26509_ACEOF
26510
26511fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026512rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026513
26514fi
26515
Martin v. Löwis82bca632006-02-10 20:49:30 +000026516# End of readline checks: restore LIBS
26517LIBS=$LIBS_no_readline
26518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026519{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26520echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026521if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026522 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026523else
Martin v. Löwis11437992002-04-12 09:54:03 +000026524
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026525if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026526 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026527else
Martin v. Löwis11437992002-04-12 09:54:03 +000026528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026529/* confdefs.h. */
26530_ACEOF
26531cat confdefs.h >>conftest.$ac_ext
26532cat >>conftest.$ac_ext <<_ACEOF
26533/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026534
26535int main()
26536{
26537 int val1 = nice(1);
26538 if (val1 != -1 && val1 == nice(2))
26539 exit(0);
26540 exit(1);
26541}
26542
Martin v. Löwis11437992002-04-12 09:54:03 +000026543_ACEOF
26544rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545if { (ac_try="$ac_link"
26546case "(($ac_try" in
26547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26548 *) ac_try_echo=$ac_try;;
26549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026551 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026552 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026555 { (case "(($ac_try" in
26556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26557 *) ac_try_echo=$ac_try;;
26558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026560 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026561 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026563 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026564 ac_cv_broken_nice=yes
26565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026566 echo "$as_me: program exited with status $ac_status" >&5
26567echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026568sed 's/^/| /' conftest.$ac_ext >&5
26569
Martin v. Löwis11437992002-04-12 09:54:03 +000026570( exit $ac_status )
26571ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026573rm -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 +000026574fi
26575
Martin v. Löwiseba40652007-08-30 20:10:57 +000026576
26577fi
26578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026579{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26580echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026581if test "$ac_cv_broken_nice" = yes
26582then
Martin v. Löwis11437992002-04-12 09:54:03 +000026583
26584cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026585#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026586_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026587
26588fi
26589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026590{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26591echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026592if test "${ac_cv_broken_poll+set}" = set; then
26593 echo $ECHO_N "(cached) $ECHO_C" >&6
26594else
26595 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026596 ac_cv_broken_poll=no
26597else
26598 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026599/* confdefs.h. */
26600_ACEOF
26601cat confdefs.h >>conftest.$ac_ext
26602cat >>conftest.$ac_ext <<_ACEOF
26603/* end confdefs.h. */
26604
26605#include <poll.h>
26606
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026607int main()
26608{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026609 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026610 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026611
26612 close (42);
26613
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026614 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026615 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026616 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026617 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026618 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026619 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026620 return 1;
26621}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026622
26623_ACEOF
26624rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026625if { (ac_try="$ac_link"
26626case "(($ac_try" in
26627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26628 *) ac_try_echo=$ac_try;;
26629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026631 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026632 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026635 { (case "(($ac_try" in
26636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26637 *) ac_try_echo=$ac_try;;
26638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026640 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026641 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026643 (exit $ac_status); }; }; then
26644 ac_cv_broken_poll=yes
26645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026646 echo "$as_me: program exited with status $ac_status" >&5
26647echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026648sed 's/^/| /' conftest.$ac_ext >&5
26649
26650( exit $ac_status )
26651ac_cv_broken_poll=no
26652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026653rm -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 +000026654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026655
26656
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026657fi
26658
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026659{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26660echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026661if test "$ac_cv_broken_poll" = yes
26662then
26663
26664cat >>confdefs.h <<\_ACEOF
26665#define HAVE_BROKEN_POLL 1
26666_ACEOF
26667
26668fi
26669
Brett Cannon43802422005-02-10 20:48:03 +000026670# 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 +000026671# (which is not required by ISO C or UNIX spec) and/or if we support
26672# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026673{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26674echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026675if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026676 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026677else
26678 cat >conftest.$ac_ext <<_ACEOF
26679/* confdefs.h. */
26680_ACEOF
26681cat confdefs.h >>conftest.$ac_ext
26682cat >>conftest.$ac_ext <<_ACEOF
26683/* end confdefs.h. */
26684#include <sys/types.h>
26685#include <$ac_cv_struct_tm>
26686
26687
26688int
26689main ()
26690{
26691static struct tm ac_aggr;
26692if (ac_aggr.tm_zone)
26693return 0;
26694 ;
26695 return 0;
26696}
26697_ACEOF
26698rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026699if { (ac_try="$ac_compile"
26700case "(($ac_try" in
26701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26702 *) ac_try_echo=$ac_try;;
26703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026705 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026706 ac_status=$?
26707 grep -v '^ *+' conftest.er1 >conftest.err
26708 rm -f conftest.er1
26709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026711 (exit $ac_status); } && {
26712 test -z "$ac_c_werror_flag" ||
26713 test ! -s conftest.err
26714 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026715 ac_cv_member_struct_tm_tm_zone=yes
26716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026717 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026718sed 's/^/| /' conftest.$ac_ext >&5
26719
Martin v. Löwiseba40652007-08-30 20:10:57 +000026720 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026721/* confdefs.h. */
26722_ACEOF
26723cat confdefs.h >>conftest.$ac_ext
26724cat >>conftest.$ac_ext <<_ACEOF
26725/* end confdefs.h. */
26726#include <sys/types.h>
26727#include <$ac_cv_struct_tm>
26728
26729
26730int
26731main ()
26732{
26733static struct tm ac_aggr;
26734if (sizeof ac_aggr.tm_zone)
26735return 0;
26736 ;
26737 return 0;
26738}
26739_ACEOF
26740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026741if { (ac_try="$ac_compile"
26742case "(($ac_try" in
26743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26744 *) ac_try_echo=$ac_try;;
26745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026747 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026748 ac_status=$?
26749 grep -v '^ *+' conftest.er1 >conftest.err
26750 rm -f conftest.er1
26751 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026753 (exit $ac_status); } && {
26754 test -z "$ac_c_werror_flag" ||
26755 test ! -s conftest.err
26756 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026757 ac_cv_member_struct_tm_tm_zone=yes
26758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026759 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026760sed 's/^/| /' conftest.$ac_ext >&5
26761
Martin v. Löwiseba40652007-08-30 20:10:57 +000026762 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026764
26765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026767
26768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026769fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026770{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26771echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26772if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026773
26774cat >>confdefs.h <<_ACEOF
26775#define HAVE_STRUCT_TM_TM_ZONE 1
26776_ACEOF
26777
26778
26779fi
26780
26781if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26782
26783cat >>confdefs.h <<\_ACEOF
26784#define HAVE_TM_ZONE 1
26785_ACEOF
26786
26787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026788 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26789echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026790if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026792else
26793 cat >conftest.$ac_ext <<_ACEOF
26794/* confdefs.h. */
26795_ACEOF
26796cat confdefs.h >>conftest.$ac_ext
26797cat >>conftest.$ac_ext <<_ACEOF
26798/* end confdefs.h. */
26799#include <time.h>
26800
26801int
26802main ()
26803{
26804#ifndef tzname
26805 (void) tzname;
26806#endif
26807
26808 ;
26809 return 0;
26810}
26811_ACEOF
26812rm -f conftest.$ac_objext
26813if { (ac_try="$ac_compile"
26814case "(($ac_try" in
26815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26816 *) ac_try_echo=$ac_try;;
26817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026819 (eval "$ac_compile") 2>conftest.er1
26820 ac_status=$?
26821 grep -v '^ *+' conftest.er1 >conftest.err
26822 rm -f conftest.er1
26823 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026825 (exit $ac_status); } && {
26826 test -z "$ac_c_werror_flag" ||
26827 test ! -s conftest.err
26828 } && test -s conftest.$ac_objext; then
26829 ac_cv_have_decl_tzname=yes
26830else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026831 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026832sed 's/^/| /' conftest.$ac_ext >&5
26833
26834 ac_cv_have_decl_tzname=no
26835fi
26836
26837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26838fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026839{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26840echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26841if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026842
26843cat >>confdefs.h <<_ACEOF
26844#define HAVE_DECL_TZNAME 1
26845_ACEOF
26846
26847
26848else
26849 cat >>confdefs.h <<_ACEOF
26850#define HAVE_DECL_TZNAME 0
26851_ACEOF
26852
26853
26854fi
26855
26856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026857 { echo "$as_me:$LINENO: checking for tzname" >&5
26858echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026859if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026860 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026861else
26862 cat >conftest.$ac_ext <<_ACEOF
26863/* confdefs.h. */
26864_ACEOF
26865cat confdefs.h >>conftest.$ac_ext
26866cat >>conftest.$ac_ext <<_ACEOF
26867/* end confdefs.h. */
26868#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026869#if !HAVE_DECL_TZNAME
26870extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026871#endif
26872
26873int
26874main ()
26875{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026876return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026877 ;
26878 return 0;
26879}
26880_ACEOF
26881rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026882if { (ac_try="$ac_link"
26883case "(($ac_try" in
26884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26885 *) ac_try_echo=$ac_try;;
26886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026888 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026889 ac_status=$?
26890 grep -v '^ *+' conftest.er1 >conftest.err
26891 rm -f conftest.er1
26892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026894 (exit $ac_status); } && {
26895 test -z "$ac_c_werror_flag" ||
26896 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026897 } && test -s conftest$ac_exeext &&
26898 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026899 ac_cv_var_tzname=yes
26900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026901 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026902sed 's/^/| /' conftest.$ac_ext >&5
26903
Martin v. Löwiseba40652007-08-30 20:10:57 +000026904 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026906
26907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026908 conftest$ac_exeext conftest.$ac_ext
26909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026910{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26911echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026912 if test $ac_cv_var_tzname = yes; then
26913
26914cat >>confdefs.h <<\_ACEOF
26915#define HAVE_TZNAME 1
26916_ACEOF
26917
26918 fi
26919fi
26920
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026921
Martin v. Löwis1d459062005-03-14 21:23:33 +000026922# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026923{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26924echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026925if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026926 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026927else
26928
26929if test "$cross_compiling" = yes; then
26930 ac_cv_working_tzset=no
26931else
26932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026933/* confdefs.h. */
26934_ACEOF
26935cat confdefs.h >>conftest.$ac_ext
26936cat >>conftest.$ac_ext <<_ACEOF
26937/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026938
26939#include <stdlib.h>
26940#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026941#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026942
26943#if HAVE_TZNAME
26944extern char *tzname[];
26945#endif
26946
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026947int main()
26948{
Brett Cannon18367812003-09-19 00:59:16 +000026949 /* Note that we need to ensure that not only does tzset(3)
26950 do 'something' with localtime, but it works as documented
26951 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026952 This includes making sure that tzname is set properly if
26953 tm->tm_zone does not exist since it is the alternative way
26954 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026955
26956 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026957 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026958 */
26959
Martin v. Löwis1d459062005-03-14 21:23:33 +000026960 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026961 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26962
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026963 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026964 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026965 if (localtime(&groundhogday)->tm_hour != 0)
26966 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026967#if HAVE_TZNAME
26968 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26969 if (strcmp(tzname[0], "UTC") ||
26970 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26971 exit(1);
26972#endif
Brett Cannon18367812003-09-19 00:59:16 +000026973
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026974 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026975 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026976 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026977 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026978#if HAVE_TZNAME
26979 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26980 exit(1);
26981#endif
Brett Cannon18367812003-09-19 00:59:16 +000026982
26983 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26984 tzset();
26985 if (localtime(&groundhogday)->tm_hour != 11)
26986 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026987#if HAVE_TZNAME
26988 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26989 exit(1);
26990#endif
26991
26992#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026993 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26994 exit(1);
26995 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26996 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026997#endif
Brett Cannon18367812003-09-19 00:59:16 +000026998
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026999 exit(0);
27000}
27001
27002_ACEOF
27003rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027004if { (ac_try="$ac_link"
27005case "(($ac_try" in
27006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27007 *) ac_try_echo=$ac_try;;
27008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027010 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027011 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027014 { (case "(($ac_try" in
27015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27016 *) ac_try_echo=$ac_try;;
27017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027019 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027020 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027022 (exit $ac_status); }; }; then
27023 ac_cv_working_tzset=yes
27024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027025 echo "$as_me: program exited with status $ac_status" >&5
27026echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027027sed 's/^/| /' conftest.$ac_ext >&5
27028
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027029( exit $ac_status )
27030ac_cv_working_tzset=no
27031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027032rm -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 +000027033fi
27034
Martin v. Löwiseba40652007-08-30 20:10:57 +000027035
27036fi
27037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027038{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27039echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027040if test "$ac_cv_working_tzset" = yes
27041then
27042
27043cat >>confdefs.h <<\_ACEOF
27044#define HAVE_WORKING_TZSET 1
27045_ACEOF
27046
27047fi
27048
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027049# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027050{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27051echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027052if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027054else
27055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027056/* confdefs.h. */
27057_ACEOF
27058cat confdefs.h >>conftest.$ac_ext
27059cat >>conftest.$ac_ext <<_ACEOF
27060/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027061#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027062int
27063main ()
27064{
27065
27066struct stat st;
27067st.st_mtim.tv_nsec = 1;
27068
27069 ;
27070 return 0;
27071}
27072_ACEOF
27073rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027074if { (ac_try="$ac_compile"
27075case "(($ac_try" in
27076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27077 *) ac_try_echo=$ac_try;;
27078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027082 grep -v '^ *+' conftest.er1 >conftest.err
27083 rm -f conftest.er1
27084 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027086 (exit $ac_status); } && {
27087 test -z "$ac_c_werror_flag" ||
27088 test ! -s conftest.err
27089 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027090 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027093sed 's/^/| /' conftest.$ac_ext >&5
27094
Martin v. Löwiseba40652007-08-30 20:10:57 +000027095 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027096fi
27097
Martin v. Löwiseba40652007-08-30 20:10:57 +000027098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27099fi
27100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027101{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27102echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027103if test "$ac_cv_stat_tv_nsec" = yes
27104then
27105
27106cat >>confdefs.h <<\_ACEOF
27107#define HAVE_STAT_TV_NSEC 1
27108_ACEOF
27109
27110fi
27111
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027112# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027113{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27114echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027115if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027117else
27118 cat >conftest.$ac_ext <<_ACEOF
27119/* confdefs.h. */
27120_ACEOF
27121cat confdefs.h >>conftest.$ac_ext
27122cat >>conftest.$ac_ext <<_ACEOF
27123/* end confdefs.h. */
27124#include <sys/stat.h>
27125int
27126main ()
27127{
27128
27129struct stat st;
27130st.st_mtimespec.tv_nsec = 1;
27131
27132 ;
27133 return 0;
27134}
27135_ACEOF
27136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027137if { (ac_try="$ac_compile"
27138case "(($ac_try" in
27139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27140 *) ac_try_echo=$ac_try;;
27141esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027144 ac_status=$?
27145 grep -v '^ *+' conftest.er1 >conftest.err
27146 rm -f conftest.er1
27147 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027149 (exit $ac_status); } && {
27150 test -z "$ac_c_werror_flag" ||
27151 test ! -s conftest.err
27152 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027153 ac_cv_stat_tv_nsec2=yes
27154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027155 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027156sed 's/^/| /' conftest.$ac_ext >&5
27157
Martin v. Löwiseba40652007-08-30 20:10:57 +000027158 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027159fi
27160
Martin v. Löwiseba40652007-08-30 20:10:57 +000027161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27162fi
27163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027164{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27165echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027166if test "$ac_cv_stat_tv_nsec2" = yes
27167then
27168
27169cat >>confdefs.h <<\_ACEOF
27170#define HAVE_STAT_TV_NSEC2 1
27171_ACEOF
27172
27173fi
27174
Jack Jansen666b1e72001-10-31 12:11:48 +000027175# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027176{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27177echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027178if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027179 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027180else
Martin v. Löwis11437992002-04-12 09:54:03 +000027181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027182/* confdefs.h. */
27183_ACEOF
27184cat confdefs.h >>conftest.$ac_ext
27185cat >>conftest.$ac_ext <<_ACEOF
27186/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027187#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027188int
27189main ()
27190{
Jack Jansen666b1e72001-10-31 12:11:48 +000027191
27192 int rtn;
27193 rtn = mvwdelch(0,0,0);
27194
Martin v. Löwis11437992002-04-12 09:54:03 +000027195 ;
27196 return 0;
27197}
27198_ACEOF
27199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027200if { (ac_try="$ac_compile"
27201case "(($ac_try" in
27202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27203 *) ac_try_echo=$ac_try;;
27204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027208 grep -v '^ *+' conftest.er1 >conftest.err
27209 rm -f conftest.er1
27210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027212 (exit $ac_status); } && {
27213 test -z "$ac_c_werror_flag" ||
27214 test ! -s conftest.err
27215 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027216 ac_cv_mvwdelch_is_expression=yes
27217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027219sed 's/^/| /' conftest.$ac_ext >&5
27220
Martin v. Löwiseba40652007-08-30 20:10:57 +000027221 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027222fi
27223
Martin v. Löwiseba40652007-08-30 20:10:57 +000027224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27225fi
27226
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027227{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27228echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027229
27230if test "$ac_cv_mvwdelch_is_expression" = yes
27231then
Martin v. Löwis11437992002-04-12 09:54:03 +000027232
27233cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027234#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027235_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027236
27237fi
27238
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027239{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27240echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027241if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027242 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027243else
Martin v. Löwis11437992002-04-12 09:54:03 +000027244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027245/* confdefs.h. */
27246_ACEOF
27247cat confdefs.h >>conftest.$ac_ext
27248cat >>conftest.$ac_ext <<_ACEOF
27249/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027250#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027251int
27252main ()
27253{
Jack Jansen666b1e72001-10-31 12:11:48 +000027254
27255 WINDOW *w;
27256 w->_flags = 0;
27257
Martin v. Löwis11437992002-04-12 09:54:03 +000027258 ;
27259 return 0;
27260}
27261_ACEOF
27262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027263if { (ac_try="$ac_compile"
27264case "(($ac_try" in
27265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27266 *) ac_try_echo=$ac_try;;
27267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027271 grep -v '^ *+' conftest.er1 >conftest.err
27272 rm -f conftest.er1
27273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027275 (exit $ac_status); } && {
27276 test -z "$ac_c_werror_flag" ||
27277 test ! -s conftest.err
27278 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027279 ac_cv_window_has_flags=yes
27280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027282sed 's/^/| /' conftest.$ac_ext >&5
27283
Martin v. Löwiseba40652007-08-30 20:10:57 +000027284 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027285fi
27286
Martin v. Löwiseba40652007-08-30 20:10:57 +000027287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27288fi
27289
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027290{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27291echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027292
Jack Jansen666b1e72001-10-31 12:11:48 +000027293
27294if test "$ac_cv_window_has_flags" = yes
27295then
Martin v. Löwis11437992002-04-12 09:54:03 +000027296
27297cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027298#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027299_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027300
27301fi
27302
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027303{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27304echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027305cat >conftest.$ac_ext <<_ACEOF
27306/* confdefs.h. */
27307_ACEOF
27308cat confdefs.h >>conftest.$ac_ext
27309cat >>conftest.$ac_ext <<_ACEOF
27310/* end confdefs.h. */
27311#include <curses.h>
27312int
27313main ()
27314{
27315void *x=is_term_resized
27316 ;
27317 return 0;
27318}
27319_ACEOF
27320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027321if { (ac_try="$ac_compile"
27322case "(($ac_try" in
27323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27324 *) ac_try_echo=$ac_try;;
27325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027327 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027328 ac_status=$?
27329 grep -v '^ *+' conftest.er1 >conftest.err
27330 rm -f conftest.er1
27331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027333 (exit $ac_status); } && {
27334 test -z "$ac_c_werror_flag" ||
27335 test ! -s conftest.err
27336 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027337
27338cat >>confdefs.h <<\_ACEOF
27339#define HAVE_CURSES_IS_TERM_RESIZED 1
27340_ACEOF
27341
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027342 { echo "$as_me:$LINENO: result: yes" >&5
27343echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027345 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027346sed 's/^/| /' conftest.$ac_ext >&5
27347
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027348 { echo "$as_me:$LINENO: result: no" >&5
27349echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027350
27351fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027352
Martin v. Löwiseba40652007-08-30 20:10:57 +000027353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27354
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027355{ echo "$as_me:$LINENO: checking for resize_term" >&5
27356echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027357cat >conftest.$ac_ext <<_ACEOF
27358/* confdefs.h. */
27359_ACEOF
27360cat confdefs.h >>conftest.$ac_ext
27361cat >>conftest.$ac_ext <<_ACEOF
27362/* end confdefs.h. */
27363#include <curses.h>
27364int
27365main ()
27366{
27367void *x=resize_term
27368 ;
27369 return 0;
27370}
27371_ACEOF
27372rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027373if { (ac_try="$ac_compile"
27374case "(($ac_try" in
27375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27376 *) ac_try_echo=$ac_try;;
27377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027379 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027380 ac_status=$?
27381 grep -v '^ *+' conftest.er1 >conftest.err
27382 rm -f conftest.er1
27383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027385 (exit $ac_status); } && {
27386 test -z "$ac_c_werror_flag" ||
27387 test ! -s conftest.err
27388 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027389
27390cat >>confdefs.h <<\_ACEOF
27391#define HAVE_CURSES_RESIZE_TERM 1
27392_ACEOF
27393
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027394 { echo "$as_me:$LINENO: result: yes" >&5
27395echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027396else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027397 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027398sed 's/^/| /' conftest.$ac_ext >&5
27399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027400 { echo "$as_me:$LINENO: result: no" >&5
27401echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027402
27403fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027404
Martin v. Löwiseba40652007-08-30 20:10:57 +000027405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27406
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027407{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27408echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027409cat >conftest.$ac_ext <<_ACEOF
27410/* confdefs.h. */
27411_ACEOF
27412cat confdefs.h >>conftest.$ac_ext
27413cat >>conftest.$ac_ext <<_ACEOF
27414/* end confdefs.h. */
27415#include <curses.h>
27416int
27417main ()
27418{
27419void *x=resizeterm
27420 ;
27421 return 0;
27422}
27423_ACEOF
27424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027425if { (ac_try="$ac_compile"
27426case "(($ac_try" in
27427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27428 *) ac_try_echo=$ac_try;;
27429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027431 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027432 ac_status=$?
27433 grep -v '^ *+' conftest.er1 >conftest.err
27434 rm -f conftest.er1
27435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027437 (exit $ac_status); } && {
27438 test -z "$ac_c_werror_flag" ||
27439 test ! -s conftest.err
27440 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027441
27442cat >>confdefs.h <<\_ACEOF
27443#define HAVE_CURSES_RESIZETERM 1
27444_ACEOF
27445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027446 { echo "$as_me:$LINENO: result: yes" >&5
27447echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027449 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027450sed 's/^/| /' conftest.$ac_ext >&5
27451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027452 { echo "$as_me:$LINENO: result: no" >&5
27453echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027454
27455fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027456
Martin v. Löwiseba40652007-08-30 20:10:57 +000027457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27458
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027459{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27460echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027461
27462if test -r /dev/ptmx
27463then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027464 { echo "$as_me:$LINENO: result: yes" >&5
27465echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027466
27467cat >>confdefs.h <<\_ACEOF
27468#define HAVE_DEV_PTMX 1
27469_ACEOF
27470
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027472 { echo "$as_me:$LINENO: result: no" >&5
27473echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027474fi
27475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027476{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27477echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027478
27479if test -r /dev/ptc
27480then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027481 { echo "$as_me:$LINENO: result: yes" >&5
27482echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027483
27484cat >>confdefs.h <<\_ACEOF
27485#define HAVE_DEV_PTC 1
27486_ACEOF
27487
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027489 { echo "$as_me:$LINENO: result: no" >&5
27490echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027491fi
27492
Mark Dickinson82864d12009-11-15 16:18:58 +000027493if test "$have_long_long" = yes
27494then
27495 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27496echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27497 if test "${ac_cv_have_long_long_format+set}" = set; then
27498 echo $ECHO_N "(cached) $ECHO_C" >&6
27499else
27500 if test "$cross_compiling" = yes; then
27501 ac_cv_have_long_long_format=no
27502else
27503 cat >conftest.$ac_ext <<_ACEOF
27504/* confdefs.h. */
27505_ACEOF
27506cat confdefs.h >>conftest.$ac_ext
27507cat >>conftest.$ac_ext <<_ACEOF
27508/* end confdefs.h. */
27509
27510 #include <stdio.h>
27511 #include <stddef.h>
27512 #include <string.h>
27513
27514 #ifdef HAVE_SYS_TYPES_H
27515 #include <sys/types.h>
27516 #endif
27517
27518 int main()
27519 {
27520 char buffer[256];
27521
27522 if (sprintf(buffer, "%lld", (long long)123) < 0)
27523 return 1;
27524 if (strcmp(buffer, "123"))
27525 return 1;
27526
27527 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27528 return 1;
27529 if (strcmp(buffer, "-123"))
27530 return 1;
27531
27532 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27533 return 1;
27534 if (strcmp(buffer, "123"))
27535 return 1;
27536
27537 return 0;
27538 }
27539
27540_ACEOF
27541rm -f conftest$ac_exeext
27542if { (ac_try="$ac_link"
27543case "(($ac_try" in
27544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27545 *) ac_try_echo=$ac_try;;
27546esac
27547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27548 (eval "$ac_link") 2>&5
27549 ac_status=$?
27550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27552 { (case "(($ac_try" in
27553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27554 *) ac_try_echo=$ac_try;;
27555esac
27556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27557 (eval "$ac_try") 2>&5
27558 ac_status=$?
27559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27560 (exit $ac_status); }; }; then
27561 ac_cv_have_long_long_format=yes
27562else
27563 echo "$as_me: program exited with status $ac_status" >&5
27564echo "$as_me: failed program was:" >&5
27565sed 's/^/| /' conftest.$ac_ext >&5
27566
27567( exit $ac_status )
27568ac_cv_have_long_long_format=no
27569fi
27570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27571fi
27572
27573
27574
27575fi
27576
27577 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27578echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27579fi
27580
Mark Dickinson5ce84742009-12-31 20:48:04 +000027581if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027582then
27583
27584cat >>confdefs.h <<\_ACEOF
27585#define PY_FORMAT_LONG_LONG "ll"
27586_ACEOF
27587
27588fi
27589
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027590if test $ac_sys_system = Darwin
27591then
27592 LIBS="$LIBS -framework CoreFoundation"
27593fi
27594
Mark Dickinson82864d12009-11-15 16:18:58 +000027595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027596{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27597echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027598if test "${ac_cv_have_size_t_format+set}" = set; then
27599 echo $ECHO_N "(cached) $ECHO_C" >&6
27600else
27601 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027602 ac_cv_have_size_t_format="cross -- assuming yes"
27603
Brett Cannon09d12362006-05-11 05:11:33 +000027604else
27605 cat >conftest.$ac_ext <<_ACEOF
27606/* confdefs.h. */
27607_ACEOF
27608cat confdefs.h >>conftest.$ac_ext
27609cat >>conftest.$ac_ext <<_ACEOF
27610/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027611
Brett Cannon09d12362006-05-11 05:11:33 +000027612#include <stdio.h>
27613#include <stddef.h>
27614#include <string.h>
27615
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027616#ifdef HAVE_SYS_TYPES_H
27617#include <sys/types.h>
27618#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027619
27620#ifdef HAVE_SSIZE_T
27621typedef ssize_t Py_ssize_t;
27622#elif SIZEOF_VOID_P == SIZEOF_LONG
27623typedef long Py_ssize_t;
27624#else
27625typedef int Py_ssize_t;
27626#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027627
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027628int main()
27629{
27630 char buffer[256];
27631
Brett Cannon09d12362006-05-11 05:11:33 +000027632 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27633 return 1;
27634
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027635 if (strcmp(buffer, "123"))
27636 return 1;
27637
27638 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27639 return 1;
27640
27641 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027642 return 1;
27643
27644 return 0;
27645}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027646
Brett Cannon09d12362006-05-11 05:11:33 +000027647_ACEOF
27648rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027649if { (ac_try="$ac_link"
27650case "(($ac_try" in
27651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27652 *) ac_try_echo=$ac_try;;
27653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027655 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027656 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027658 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027659 { (case "(($ac_try" in
27660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27661 *) ac_try_echo=$ac_try;;
27662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027664 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027665 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027667 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027668 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027669else
27670 echo "$as_me: program exited with status $ac_status" >&5
27671echo "$as_me: failed program was:" >&5
27672sed 's/^/| /' conftest.$ac_ext >&5
27673
27674( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027675ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027676fi
27677rm -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 +000027678fi
27679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027680
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027681fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027682{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27683echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027684if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027685
27686cat >>confdefs.h <<\_ACEOF
27687#define PY_FORMAT_SIZE_T "z"
27688_ACEOF
27689
27690fi
27691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027692{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27693echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027694if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027696else
Martin v. Löwis11437992002-04-12 09:54:03 +000027697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027698/* confdefs.h. */
27699_ACEOF
27700cat confdefs.h >>conftest.$ac_ext
27701cat >>conftest.$ac_ext <<_ACEOF
27702/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027703
27704#ifdef HAVE_SYS_TYPES_H
27705#include <sys/types.h>
27706#endif
27707#ifdef HAVE_SYS_SOCKET_H
27708#include <sys/socket.h>
27709#endif
27710
27711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027712typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027713int
27714main ()
27715{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027716if ((ac__type_new_ *) 0)
27717 return 0;
27718if (sizeof (ac__type_new_))
27719 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027720 ;
27721 return 0;
27722}
27723_ACEOF
27724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027725if { (ac_try="$ac_compile"
27726case "(($ac_try" in
27727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27728 *) ac_try_echo=$ac_try;;
27729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027733 grep -v '^ *+' conftest.er1 >conftest.err
27734 rm -f conftest.er1
27735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027737 (exit $ac_status); } && {
27738 test -z "$ac_c_werror_flag" ||
27739 test ! -s conftest.err
27740 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027741 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027744sed 's/^/| /' conftest.$ac_ext >&5
27745
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027746 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027748
27749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027750fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027751{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27752echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27753if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027754 :
27755else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027756
Martin v. Löwis01c04012002-11-11 14:58:44 +000027757cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027758#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027759_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027760
27761fi
27762
Michael W. Hudson54241132001-12-07 15:38:26 +000027763
Michael W. Hudson54241132001-12-07 15:38:26 +000027764
27765
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027766for h in `(cd $srcdir;echo Python/thread_*.h)`
27767do
27768 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27769done
27770
Michael W. Hudson54241132001-12-07 15:38:26 +000027771
Neal Norwitzd24499d2005-12-18 21:36:39 +000027772SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027773{ echo "$as_me:$LINENO: checking for build directories" >&5
27774echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027775for dir in $SRCDIRS; do
27776 if test ! -d $dir; then
27777 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027778 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027779done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027780{ echo "$as_me:$LINENO: result: done" >&5
27781echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027782
Guido van Rossum627b2d71993-12-24 10:39:16 +000027783# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027784ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027785
Martin v. Löwis11437992002-04-12 09:54:03 +000027786cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027787# This file is a shell script that caches the results of configure
27788# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027789# scripts and configure runs, see configure's option --config-cache.
27790# It is not useful on other systems. If it contains results you don't
27791# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027792#
Martin v. Löwis11437992002-04-12 09:54:03 +000027793# config.status only pays attention to the cache file if you give it
27794# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027795#
Skip Montanaro6dead952003-09-25 14:50:04 +000027796# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027797# loading this file, other *unset* `ac_cv_foo' will be assigned the
27798# following values.
27799
27800_ACEOF
27801
Guido van Rossumf78abae1997-01-21 22:02:36 +000027802# The following way of writing the cache mishandles newlines in values,
27803# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027804# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027805# Ultrix sh set writes to stderr and can't be redirected directly,
27806# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027807(
27808 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27809 eval ac_val=\$$ac_var
27810 case $ac_val in #(
27811 *${as_nl}*)
27812 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027813 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27814echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027815 esac
27816 case $ac_var in #(
27817 _ | IFS | as_nl) ;; #(
27818 *) $as_unset $ac_var ;;
27819 esac ;;
27820 esac
27821 done
27822
Martin v. Löwis11437992002-04-12 09:54:03 +000027823 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027824 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27825 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027826 # `set' does not quote correctly, so add quotes (double-quote
27827 # substitution turns \\\\ into \\, and sed turns \\ into \).
27828 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027829 "s/'/'\\\\''/g;
27830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027831 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027832 *)
27833 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027834 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027835 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027836 esac |
27837 sort
27838) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027839 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027840 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027841 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027842 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27844 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027845 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27846 :end' >>confcache
27847if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27848 if test -w "$cache_file"; then
27849 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027850 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27851echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027852 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027853 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027854 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27855echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027856 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027857fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027858rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027860test "x$prefix" = xNONE && prefix=$ac_default_prefix
27861# Let make expand exec_prefix.
27862test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027863
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027864DEFS=-DHAVE_CONFIG_H
27865
Skip Montanaro6dead952003-09-25 14:50:04 +000027866ac_libobjs=
27867ac_ltlibobjs=
27868for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27869 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027870 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027871 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027872 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27873 # will be set to the directory where LIBOBJS objects are built.
27874 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27875 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027876done
27877LIBOBJS=$ac_libobjs
27878
27879LTLIBOBJS=$ac_ltlibobjs
27880
27881
Martin v. Löwis11437992002-04-12 09:54:03 +000027882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027883: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027884ac_clean_files_save=$ac_clean_files
27885ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027886{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27887echo "$as_me: creating $CONFIG_STATUS" >&6;}
27888cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027889#! $SHELL
27890# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027891# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027892# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027893# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027894
Martin v. Löwis11437992002-04-12 09:54:03 +000027895debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027896ac_cs_recheck=false
27897ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027898SHELL=\${CONFIG_SHELL-$SHELL}
27899_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027901cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027902## --------------------- ##
27903## M4sh Initialization. ##
27904## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027905
Martin v. Löwiseba40652007-08-30 20:10:57 +000027906# Be more Bourne compatible
27907DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027908if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27909 emulate sh
27910 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027911 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027912 # is contrary to our usage. Disable this feature.
27913 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027914 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027915else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027916 case `(set -o) 2>/dev/null` in
27917 *posix*) set -o posix ;;
27918esac
27919
Martin v. Löwis11437992002-04-12 09:54:03 +000027920fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027921
Skip Montanaro6dead952003-09-25 14:50:04 +000027922
Martin v. Löwis11437992002-04-12 09:54:03 +000027923
27924
Martin v. Löwiseba40652007-08-30 20:10:57 +000027925# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027926# Avoid depending upon Character Ranges.
27927as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27928as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27929as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27930as_cr_digits='0123456789'
27931as_cr_alnum=$as_cr_Letters$as_cr_digits
27932
27933# The user is always right.
27934if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027935 echo "#! /bin/sh" >conf$$.sh
27936 echo "exit 0" >>conf$$.sh
27937 chmod +x conf$$.sh
27938 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27939 PATH_SEPARATOR=';'
27940 else
27941 PATH_SEPARATOR=:
27942 fi
27943 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027944fi
27945
Martin v. Löwiseba40652007-08-30 20:10:57 +000027946# Support unset when possible.
27947if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27948 as_unset=unset
27949else
27950 as_unset=false
27951fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027952
Martin v. Löwiseba40652007-08-30 20:10:57 +000027953
27954# IFS
27955# We need space, tab and new line, in precisely that order. Quoting is
27956# there to prevent editors from complaining about space-tab.
27957# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27958# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027959as_nl='
27960'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027961IFS=" "" $as_nl"
27962
27963# Find who we are. Look in the path if we contain no directory separator.
27964case $0 in
27965 *[\\/]* ) as_myself=$0 ;;
27966 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027967for as_dir in $PATH
27968do
27969 IFS=$as_save_IFS
27970 test -z "$as_dir" && as_dir=.
27971 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27972done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027973IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027974
Martin v. Löwiseba40652007-08-30 20:10:57 +000027975 ;;
27976esac
27977# We did not find ourselves, most probably we were run as `sh COMMAND'
27978# in which case we are not to be found in the path.
27979if test "x$as_myself" = x; then
27980 as_myself=$0
27981fi
27982if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027983 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027984 { (exit 1); exit 1; }
27985fi
27986
27987# Work around bugs in pre-3.0 UWIN ksh.
27988for as_var in ENV MAIL MAILPATH
27989do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27990done
27991PS1='$ '
27992PS2='> '
27993PS4='+ '
27994
27995# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027996for as_var in \
27997 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27998 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27999 LC_TELEPHONE LC_TIME
28000do
28001 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28002 eval $as_var=C; export $as_var
28003 else
28004 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28005 fi
28006done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028007
28008# Required to use basename.
28009if expr a : '\(a\)' >/dev/null 2>&1 &&
28010 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28011 as_expr=expr
28012else
28013 as_expr=false
28014fi
28015
28016if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28017 as_basename=basename
28018else
28019 as_basename=false
28020fi
28021
28022
28023# Name of the executable.
28024as_me=`$as_basename -- "$0" ||
28025$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28026 X"$0" : 'X\(//\)$' \| \
28027 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028028echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028029 sed '/^.*\/\([^/][^/]*\)\/*$/{
28030 s//\1/
28031 q
28032 }
28033 /^X\/\(\/\/\)$/{
28034 s//\1/
28035 q
28036 }
28037 /^X\/\(\/\).*/{
28038 s//\1/
28039 q
28040 }
28041 s/.*/./; q'`
28042
28043# CDPATH.
28044$as_unset CDPATH
28045
28046
28047
Martin v. Löwis11437992002-04-12 09:54:03 +000028048 as_lineno_1=$LINENO
28049 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028050 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028051 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028052
Martin v. Löwis11437992002-04-12 09:54:03 +000028053 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28054 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028055 # line-number line after each line using $LINENO; the second 'sed'
28056 # does the real work. The second script uses 'N' to pair each
28057 # line-number line with the line containing $LINENO, and appends
28058 # trailing '-' during substitution so that $LINENO is not a special
28059 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028060 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028061 # scripts with optimization help from Paolo Bonzini. Blame Lee
28062 # E. McMahon (1931-1989) for sed's syntax. :-)
28063 sed -n '
28064 p
28065 /[$]LINENO/=
28066 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028067 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028068 s/[$]LINENO.*/&-/
28069 t lineno
28070 b
28071 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028072 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028073 :loop
28074 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028075 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028076 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028077 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028078 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028079 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028080 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028081
Martin v. Löwis11437992002-04-12 09:54:03 +000028082 # Don't try to exec as it changes $[0], causing all sort of problems
28083 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028084 # original and so on. Autoconf is especially sensitive to this).
28085 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028086 # Exit status is that of the last command.
28087 exit
28088}
28089
28090
Martin v. Löwiseba40652007-08-30 20:10:57 +000028091if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28092 as_dirname=dirname
28093else
28094 as_dirname=false
28095fi
28096
28097ECHO_C= ECHO_N= ECHO_T=
28098case `echo -n x` in
28099-n*)
28100 case `echo 'x\c'` in
28101 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28102 *) ECHO_C='\c';;
28103 esac;;
28104*)
28105 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028107
Martin v. Löwiseba40652007-08-30 20:10:57 +000028108if expr a : '\(a\)' >/dev/null 2>&1 &&
28109 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028110 as_expr=expr
28111else
28112 as_expr=false
28113fi
28114
28115rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028116if test -d conf$$.dir; then
28117 rm -f conf$$.dir/conf$$.file
28118else
28119 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028120 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028121fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028122echo >conf$$.file
28123if ln -s conf$$.file conf$$ 2>/dev/null; then
28124 as_ln_s='ln -s'
28125 # ... but there are two gotchas:
28126 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28127 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28128 # In both cases, we have to default to `cp -p'.
28129 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028130 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028131elif ln conf$$.file conf$$ 2>/dev/null; then
28132 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028133else
28134 as_ln_s='cp -p'
28135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028136rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28137rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028138
Skip Montanaro6dead952003-09-25 14:50:04 +000028139if mkdir -p . 2>/dev/null; then
28140 as_mkdir_p=:
28141else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028142 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028143 as_mkdir_p=false
28144fi
28145
Martin v. Löwiseba40652007-08-30 20:10:57 +000028146if test -x / >/dev/null 2>&1; then
28147 as_test_x='test -x'
28148else
28149 if ls -dL / >/dev/null 2>&1; then
28150 as_ls_L_option=L
28151 else
28152 as_ls_L_option=
28153 fi
28154 as_test_x='
28155 eval sh -c '\''
28156 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028157 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028158 else
28159 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028160 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028161 esac;
28162 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28163 ???[sx]*):;;*)false;;esac;fi
28164 '\'' sh
28165 '
28166fi
28167as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028168
28169# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028170as_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 +000028171
28172# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028173as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028174
28175
Martin v. Löwis11437992002-04-12 09:54:03 +000028176exec 6>&1
28177
Martin v. Löwiseba40652007-08-30 20:10:57 +000028178# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028179# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028180# values after options handling.
28181ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028182This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028183generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028184
28185 CONFIG_FILES = $CONFIG_FILES
28186 CONFIG_HEADERS = $CONFIG_HEADERS
28187 CONFIG_LINKS = $CONFIG_LINKS
28188 CONFIG_COMMANDS = $CONFIG_COMMANDS
28189 $ $0 $@
28190
Martin v. Löwiseba40652007-08-30 20:10:57 +000028191on `(hostname || uname -n) 2>/dev/null | sed 1q`
28192"
28193
Martin v. Löwis11437992002-04-12 09:54:03 +000028194_ACEOF
28195
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028196cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028197# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028198config_files="$ac_config_files"
28199config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028200
Martin v. Löwiseba40652007-08-30 20:10:57 +000028201_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028203cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028204ac_cs_usage="\
28205\`$as_me' instantiates files from templates according to the
28206current configuration.
28207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028208Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028209
28210 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028211 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028212 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028213 -d, --debug don't remove temporary files
28214 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028215 --file=FILE[:TEMPLATE]
28216 instantiate the configuration file FILE
28217 --header=FILE[:TEMPLATE]
28218 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028219
28220Configuration files:
28221$config_files
28222
28223Configuration headers:
28224$config_headers
28225
28226Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028227
Martin v. Löwiseba40652007-08-30 20:10:57 +000028228_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028229cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028230ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028231python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028232configured by $0, generated by GNU Autoconf 2.61,
28233 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028235Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028236This config.status script is free software; the Free Software Foundation
28237gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028238
28239ac_pwd='$ac_pwd'
28240srcdir='$srcdir'
28241INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028242_ACEOF
28243
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028244cat >>$CONFIG_STATUS <<\_ACEOF
28245# If no file are specified by the user, then we need to provide default
28246# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028247ac_need_defaults=:
28248while test $# != 0
28249do
28250 case $1 in
28251 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028252 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28253 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028254 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028255 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028256 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028257 ac_option=$1
28258 ac_optarg=$2
28259 ac_shift=shift
28260 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028261 esac
28262
Skip Montanaro6dead952003-09-25 14:50:04 +000028263 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028264 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028265 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28266 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028267 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028268 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028269 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028270 debug=: ;;
28271 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028272 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028273 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028274 ac_need_defaults=false;;
28275 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028276 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028277 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028278 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028279 --he | --h)
28280 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028281 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028282Try \`$0 --help' for more information." >&2
28283 { (exit 1); exit 1; }; };;
28284 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028285 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028286 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28287 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28288 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028289
28290 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028291 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028292Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028293 { (exit 1); exit 1; }; } ;;
28294
Martin v. Löwiseba40652007-08-30 20:10:57 +000028295 *) ac_config_targets="$ac_config_targets $1"
28296 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028297
28298 esac
28299 shift
28300done
28301
Skip Montanaro6dead952003-09-25 14:50:04 +000028302ac_configure_extra_args=
28303
28304if $ac_cs_silent; then
28305 exec 6>/dev/null
28306 ac_configure_extra_args="$ac_configure_extra_args --silent"
28307fi
28308
28309_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028310cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028311if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028312 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28313 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028314 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028315 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028316fi
28317
Martin v. Löwis11437992002-04-12 09:54:03 +000028318_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028319cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028320exec 5>>config.log
28321{
28322 echo
28323 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28324## Running $as_me. ##
28325_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028326 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028327} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028328
Martin v. Löwiseba40652007-08-30 20:10:57 +000028329_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028330cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028331_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028332
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028333cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028334
28335# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028336for ac_config_target in $ac_config_targets
28337do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028338 case $ac_config_target in
28339 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28340 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28341 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28342 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028343 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28344 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028345 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28346 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028347 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028348
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028349 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28350echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028351 { (exit 1); exit 1; }; };;
28352 esac
28353done
28354
Martin v. Löwiseba40652007-08-30 20:10:57 +000028355
Martin v. Löwis11437992002-04-12 09:54:03 +000028356# If the user did not use the arguments to specify the items to instantiate,
28357# then the envvar interface is used. Set only those that are not.
28358# We use the long form for the default assignment because of an extremely
28359# bizarre bug on SunOS 4.1.3.
28360if $ac_need_defaults; then
28361 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28362 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28363fi
28364
Skip Montanaro6dead952003-09-25 14:50:04 +000028365# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028366# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028367# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028368# Hook for its removal unless debugging.
28369# Note that there is a small window in which the directory will not be cleaned:
28370# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028371$debug ||
28372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028373 tmp=
28374 trap 'exit_status=$?
28375 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28376' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028377 trap '{ (exit 1); exit 1; }' 1 2 13 15
28378}
Martin v. Löwis11437992002-04-12 09:54:03 +000028379# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028380
Martin v. Löwis11437992002-04-12 09:54:03 +000028381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028382 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028383 test -n "$tmp" && test -d "$tmp"
28384} ||
28385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028386 tmp=./conf$$-$RANDOM
28387 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028388} ||
28389{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028390 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028391 { (exit 1); exit 1; }
28392}
28393
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028394#
28395# Set up the sed scripts for CONFIG_FILES section.
28396#
28397
28398# No need to generate the scripts if there are no CONFIG_FILES.
28399# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028400if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028401
28402_ACEOF
28403
Martin v. Löwiseba40652007-08-30 20:10:57 +000028404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028405
Martin v. Löwiseba40652007-08-30 20:10:57 +000028406ac_delim='%!_!# '
28407for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028408 cat >conf$$subs.sed <<_ACEOF
28409SHELL!$SHELL$ac_delim
28410PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28411PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28412PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28413PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28414PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28415PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28416exec_prefix!$exec_prefix$ac_delim
28417prefix!$prefix$ac_delim
28418program_transform_name!$program_transform_name$ac_delim
28419bindir!$bindir$ac_delim
28420sbindir!$sbindir$ac_delim
28421libexecdir!$libexecdir$ac_delim
28422datarootdir!$datarootdir$ac_delim
28423datadir!$datadir$ac_delim
28424sysconfdir!$sysconfdir$ac_delim
28425sharedstatedir!$sharedstatedir$ac_delim
28426localstatedir!$localstatedir$ac_delim
28427includedir!$includedir$ac_delim
28428oldincludedir!$oldincludedir$ac_delim
28429docdir!$docdir$ac_delim
28430infodir!$infodir$ac_delim
28431htmldir!$htmldir$ac_delim
28432dvidir!$dvidir$ac_delim
28433pdfdir!$pdfdir$ac_delim
28434psdir!$psdir$ac_delim
28435libdir!$libdir$ac_delim
28436localedir!$localedir$ac_delim
28437mandir!$mandir$ac_delim
28438DEFS!$DEFS$ac_delim
28439ECHO_C!$ECHO_C$ac_delim
28440ECHO_N!$ECHO_N$ac_delim
28441ECHO_T!$ECHO_T$ac_delim
28442LIBS!$LIBS$ac_delim
28443build_alias!$build_alias$ac_delim
28444host_alias!$host_alias$ac_delim
28445target_alias!$target_alias$ac_delim
28446VERSION!$VERSION$ac_delim
28447SOVERSION!$SOVERSION$ac_delim
28448CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28449UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28450ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028451LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028452PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28453PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28454PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28455PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28456PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28457FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28458FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28459FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28460FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28461FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28462MACHDEP!$MACHDEP$ac_delim
28463SGI_ABI!$SGI_ABI$ac_delim
28464EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28465EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28466CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28467EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28468CC!$CC$ac_delim
28469CFLAGS!$CFLAGS$ac_delim
28470LDFLAGS!$LDFLAGS$ac_delim
28471CPPFLAGS!$CPPFLAGS$ac_delim
28472ac_ct_CC!$ac_ct_CC$ac_delim
28473EXEEXT!$EXEEXT$ac_delim
28474OBJEXT!$OBJEXT$ac_delim
28475CXX!$CXX$ac_delim
28476MAINCC!$MAINCC$ac_delim
28477CPP!$CPP$ac_delim
28478GREP!$GREP$ac_delim
28479EGREP!$EGREP$ac_delim
28480BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28481LIBRARY!$LIBRARY$ac_delim
28482LDLIBRARY!$LDLIBRARY$ac_delim
28483DLLLIBRARY!$DLLLIBRARY$ac_delim
28484BLDLIBRARY!$BLDLIBRARY$ac_delim
28485LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28486INSTSONAME!$INSTSONAME$ac_delim
28487RUNSHARED!$RUNSHARED$ac_delim
28488LINKCC!$LINKCC$ac_delim
28489GNULD!$GNULD$ac_delim
28490RANLIB!$RANLIB$ac_delim
28491AR!$AR$ac_delim
28492ARFLAGS!$ARFLAGS$ac_delim
28493SVNVERSION!$SVNVERSION$ac_delim
28494INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28495INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28496INSTALL_DATA!$INSTALL_DATA$ac_delim
28497LN!$LN$ac_delim
28498OPT!$OPT$ac_delim
28499BASECFLAGS!$BASECFLAGS$ac_delim
28500UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28501OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28502LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28503SO!$SO$ac_delim
28504LDSHARED!$LDSHARED$ac_delim
28505BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028506_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028508 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 +000028509 break
28510 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028511 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28512echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028513 { (exit 1); exit 1; }; }
28514 else
28515 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028516 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028517done
28518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028519ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28520if test -n "$ac_eof"; then
28521 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28522 ac_eof=`expr $ac_eof + 1`
28523fi
28524
28525cat >>$CONFIG_STATUS <<_ACEOF
28526cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28527/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028528_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028529sed '
28530s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28531s/^/s,@/; s/!/@,|#_!!_#|/
28532:n
28533t n
28534s/'"$ac_delim"'$/,g/; t
28535s/$/\\/; p
28536N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28537' >>$CONFIG_STATUS <conf$$subs.sed
28538rm -f conf$$subs.sed
28539cat >>$CONFIG_STATUS <<_ACEOF
28540CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028541_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028542
28543
28544ac_delim='%!_!# '
28545for ac_last_try in false false false false false :; do
28546 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028547CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028548LINKFORSHARED!$LINKFORSHARED$ac_delim
28549CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28550SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028551PKG_CONFIG!$PKG_CONFIG$ac_delim
28552LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028553USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28554SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28555USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28556LDLAST!$LDLAST$ac_delim
28557THREADOBJ!$THREADOBJ$ac_delim
28558DLINCLDIR!$DLINCLDIR$ac_delim
28559DYNLOADFILE!$DYNLOADFILE$ac_delim
28560MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28561TRUE!$TRUE$ac_delim
28562LIBOBJS!$LIBOBJS$ac_delim
28563HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28564HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28565HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28566HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28567HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28568LIBM!$LIBM$ac_delim
28569LIBC!$LIBC$ac_delim
28570UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28571THREADHEADERS!$THREADHEADERS$ac_delim
28572SRCDIRS!$SRCDIRS$ac_delim
28573LTLIBOBJS!$LTLIBOBJS$ac_delim
28574_ACEOF
28575
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028576 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028577 break
28578 elif $ac_last_try; then
28579 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28580echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028581 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028582 else
28583 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28584 fi
28585done
28586
28587ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28588if test -n "$ac_eof"; then
28589 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28590 ac_eof=`expr $ac_eof + 1`
28591fi
28592
28593cat >>$CONFIG_STATUS <<_ACEOF
28594cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28595/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028596_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028597sed '
28598s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28599s/^/s,@/; s/!/@,|#_!!_#|/
28600:n
28601t n
28602s/'"$ac_delim"'$/,g/; t
28603s/$/\\/; p
28604N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28605' >>$CONFIG_STATUS <conf$$subs.sed
28606rm -f conf$$subs.sed
28607cat >>$CONFIG_STATUS <<_ACEOF
28608:end
28609s/|#_!!_#|//g
28610CEOF$ac_eof
28611_ACEOF
28612
Martin v. Löwiseba40652007-08-30 20:10:57 +000028613
28614# VPATH may cause trouble with some makes, so we remove $(srcdir),
28615# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28616# trailing colons and then remove the whole line if VPATH becomes empty
28617# (actually we leave an empty line to preserve line numbers).
28618if test "x$srcdir" = x.; then
28619 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28620s/:*\$(srcdir):*/:/
28621s/:*\${srcdir}:*/:/
28622s/:*@srcdir@:*/:/
28623s/^\([^=]*=[ ]*\):*/\1/
28624s/:*$//
28625s/^[^=]*=[ ]*$//
28626}'
28627fi
28628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028629cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028630fi # test -n "$CONFIG_FILES"
28631
Martin v. Löwiseba40652007-08-30 20:10:57 +000028632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028633for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028634do
28635 case $ac_tag in
28636 :[FHLC]) ac_mode=$ac_tag; continue;;
28637 esac
28638 case $ac_mode$ac_tag in
28639 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028640 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28641echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028642 { (exit 1); exit 1; }; };;
28643 :[FH]-) ac_tag=-:-;;
28644 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28645 esac
28646 ac_save_IFS=$IFS
28647 IFS=:
28648 set x $ac_tag
28649 IFS=$ac_save_IFS
28650 shift
28651 ac_file=$1
28652 shift
28653
28654 case $ac_mode in
28655 :L) ac_source=$1;;
28656 :[FH])
28657 ac_file_inputs=
28658 for ac_f
28659 do
28660 case $ac_f in
28661 -) ac_f="$tmp/stdin";;
28662 *) # Look for the file first in the build tree, then in the source tree
28663 # (if the path is not absolute). The absolute path cannot be DOS-style,
28664 # because $ac_f cannot contain `:'.
28665 test -f "$ac_f" ||
28666 case $ac_f in
28667 [\\/$]*) false;;
28668 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28669 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028670 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28671echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028672 { (exit 1); exit 1; }; };;
28673 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028674 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028675 done
28676
28677 # Let's still pretend it is `configure' which instantiates (i.e., don't
28678 # use $as_me), people would be surprised to read:
28679 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028680 configure_input="Generated from "`IFS=:
28681 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028682 if test x"$ac_file" != x-; then
28683 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028684 { echo "$as_me:$LINENO: creating $ac_file" >&5
28685echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028686 fi
28687
28688 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028689 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028690 esac
28691 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028692 esac
28693
Martin v. Löwiseba40652007-08-30 20:10:57 +000028694 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028695$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028696 X"$ac_file" : 'X\(//\)[^/]' \| \
28697 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028698 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028699echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028700 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28701 s//\1/
28702 q
28703 }
28704 /^X\(\/\/\)[^/].*/{
28705 s//\1/
28706 q
28707 }
28708 /^X\(\/\/\)$/{
28709 s//\1/
28710 q
28711 }
28712 /^X\(\/\).*/{
28713 s//\1/
28714 q
28715 }
28716 s/.*/./; q'`
28717 { as_dir="$ac_dir"
28718 case $as_dir in #(
28719 -*) as_dir=./$as_dir;;
28720 esac
28721 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028722 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028723 while :; do
28724 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028725 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028726 *) as_qdir=$as_dir;;
28727 esac
28728 as_dirs="'$as_qdir' $as_dirs"
28729 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028730$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028731 X"$as_dir" : 'X\(//\)[^/]' \| \
28732 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028733 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028734echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028735 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28736 s//\1/
28737 q
28738 }
28739 /^X\(\/\/\)[^/].*/{
28740 s//\1/
28741 q
28742 }
28743 /^X\(\/\/\)$/{
28744 s//\1/
28745 q
28746 }
28747 /^X\(\/\).*/{
28748 s//\1/
28749 q
28750 }
28751 s/.*/./; q'`
28752 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028753 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028754 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028755 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28756echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028757 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028758 ac_builddir=.
28759
Martin v. Löwiseba40652007-08-30 20:10:57 +000028760case "$ac_dir" in
28761.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28762*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028763 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028764 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028765 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028766 case $ac_top_builddir_sub in
28767 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28768 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28769 esac ;;
28770esac
28771ac_abs_top_builddir=$ac_pwd
28772ac_abs_builddir=$ac_pwd$ac_dir_suffix
28773# for backward compatibility:
28774ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028775
28776case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028777 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028778 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028779 ac_top_srcdir=$ac_top_builddir_sub
28780 ac_abs_top_srcdir=$ac_pwd ;;
28781 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028782 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028783 ac_top_srcdir=$srcdir
28784 ac_abs_top_srcdir=$srcdir ;;
28785 *) # Relative name.
28786 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28787 ac_top_srcdir=$ac_top_build_prefix$srcdir
28788 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028789esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028790ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028791
Martin v. Löwis11437992002-04-12 09:54:03 +000028792
Martin v. Löwiseba40652007-08-30 20:10:57 +000028793 case $ac_mode in
28794 :F)
28795 #
28796 # CONFIG_FILE
28797 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028798
28799 case $INSTALL in
28800 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028801 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028802 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028803_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028805cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028806# If the template does not know about datarootdir, expand it.
28807# FIXME: This hack should be removed a few years after 2.60.
28808ac_datarootdir_hack=; ac_datarootdir_seen=
28809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028810case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028811 p
28812 q
28813}
28814/@datadir@/p
28815/@docdir@/p
28816/@infodir@/p
28817/@localedir@/p
28818/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028819' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028820*datarootdir*) ac_datarootdir_seen=yes;;
28821*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028822 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28823echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028824_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028825cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028826 ac_datarootdir_hack='
28827 s&@datadir@&$datadir&g
28828 s&@docdir@&$docdir&g
28829 s&@infodir@&$infodir&g
28830 s&@localedir@&$localedir&g
28831 s&@mandir@&$mandir&g
28832 s&\\\${datarootdir}&$datarootdir&g' ;;
28833esac
28834_ACEOF
28835
28836# Neutralize VPATH when `$srcdir' = `.'.
28837# Shell code in configure.ac might set extrasub.
28838# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028839cat >>$CONFIG_STATUS <<_ACEOF
28840 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028841$extrasub
28842_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028843cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028844:t
28845/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028846s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028847s&@top_builddir@&$ac_top_builddir_sub&;t t
28848s&@srcdir@&$ac_srcdir&;t t
28849s&@abs_srcdir@&$ac_abs_srcdir&;t t
28850s&@top_srcdir@&$ac_top_srcdir&;t t
28851s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28852s&@builddir@&$ac_builddir&;t t
28853s&@abs_builddir@&$ac_abs_builddir&;t t
28854s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28855s&@INSTALL@&$ac_INSTALL&;t t
28856$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028857" $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 +000028858
Martin v. Löwiseba40652007-08-30 20:10:57 +000028859test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28860 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28861 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028862 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028863which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028864echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028865which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028866
Martin v. Löwiseba40652007-08-30 20:10:57 +000028867 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028868 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028869 -) cat "$tmp/out"; rm -f "$tmp/out";;
28870 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28871 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028872 ;;
28873 :H)
28874 #
28875 # CONFIG_HEADER
28876 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028877_ACEOF
28878
28879# Transform confdefs.h into a sed script `conftest.defines', that
28880# substitutes the proper values into config.h.in to produce config.h.
28881rm -f conftest.defines conftest.tail
28882# First, append a space to every undef/define line, to ease matching.
28883echo 's/$/ /' >conftest.defines
28884# Then, protect against being on the right side of a sed subst, or in
28885# an unquoted here document, in config.status. If some macros were
28886# called several times there might be several #defines for the same
28887# symbol, which is useless. But do not sort them, since the last
28888# AC_DEFINE must be honored.
28889ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28890# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28891# NAME is the cpp macro being defined, VALUE is the value it is being given.
28892# PARAMS is the parameter list in the macro definition--in most cases, it's
28893# just an empty string.
28894ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28895ac_dB='\\)[ (].*,\\1define\\2'
28896ac_dC=' '
28897ac_dD=' ,'
28898
28899uniq confdefs.h |
28900 sed -n '
28901 t rset
28902 :rset
28903 s/^[ ]*#[ ]*define[ ][ ]*//
28904 t ok
28905 d
28906 :ok
28907 s/[\\&,]/\\&/g
28908 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28909 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28910 ' >>conftest.defines
28911
28912# Remove the space that was appended to ease matching.
28913# Then replace #undef with comments. This is necessary, for
28914# example, in the case of _POSIX_SOURCE, which is predefined and required
28915# on some systems where configure will not decide to define it.
28916# (The regexp can be short, since the line contains either #define or #undef.)
28917echo 's/ $//
28918s,^[ #]*u.*,/* & */,' >>conftest.defines
28919
28920# Break up conftest.defines:
28921ac_max_sed_lines=50
28922
28923# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28924# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28925# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28926# et cetera.
28927ac_in='$ac_file_inputs'
28928ac_out='"$tmp/out1"'
28929ac_nxt='"$tmp/out2"'
28930
28931while :
28932do
28933 # Write a here document:
28934 cat >>$CONFIG_STATUS <<_ACEOF
28935 # First, check the format of the line:
28936 cat >"\$tmp/defines.sed" <<\\CEOF
28937/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28938/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28939b
28940:def
28941_ACEOF
28942 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28943 echo 'CEOF
28944 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28945 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28946 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28947 grep . conftest.tail >/dev/null || break
28948 rm -f conftest.defines
28949 mv conftest.tail conftest.defines
28950done
28951rm -f conftest.defines conftest.tail
28952
28953echo "ac_result=$ac_in" >>$CONFIG_STATUS
28954cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028955 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028956 echo "/* $configure_input */" >"$tmp/config.h"
28957 cat "$ac_result" >>"$tmp/config.h"
28958 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28959 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28960echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028961 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028962 rm -f $ac_file
28963 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028964 fi
28965 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028966 echo "/* $configure_input */"
28967 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028968 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028969 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028970 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028971
Martin v. Löwiseba40652007-08-30 20:10:57 +000028972
28973 esac
28974
28975done # for ac_tag
28976
Guido van Rossum627b2d71993-12-24 10:39:16 +000028977
Martin v. Löwis11437992002-04-12 09:54:03 +000028978{ (exit 0); exit 0; }
28979_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028980chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028981ac_clean_files=$ac_clean_files_save
28982
28983
28984# configure is writing to config.log, and then calls config.status.
28985# config.status does its own redirection, appending to config.log.
28986# Unfortunately, on DOS this fails, as config.log is still kept open
28987# by configure, so config.status won't be able to write to it; its
28988# output is simply discarded. So we exec the FD to /dev/null,
28989# effectively closing config.log, so it can be properly (re)opened and
28990# appended to by config.status. When coming back to configure, we
28991# need to make the FD available again.
28992if test "$no_create" != yes; then
28993 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028994 ac_config_status_args=
28995 test "$silent" = yes &&
28996 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028997 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028998 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028999 exec 5>>config.log
29000 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29001 # would make configure fail if this is the last instruction.
29002 $ac_cs_success || { (exit 1); exit 1; }
29003fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029004
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029005
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029006echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029007if test ! -f Modules/Setup
29008then
29009 cp $srcdir/Modules/Setup.dist Modules/Setup
29010fi
29011
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029012echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029013if test ! -f Modules/Setup.local
29014then
29015 echo "# Edit this file for local setup changes" >Modules/Setup.local
29016fi
29017
29018echo "creating Makefile"
29019$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29020 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029021 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029022
29023case $ac_sys_system in
29024BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029025 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029026
29027 Support for BeOS is deprecated as of Python 2.6.
29028 See PEP 11 for the gory details.
29029 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029030echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029031
29032 Support for BeOS is deprecated as of Python 2.6.
29033 See PEP 11 for the gory details.
29034 " >&2;}
29035 ;;
29036*) ;;
29037esac
29038
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029039mv config.c Modules