blob: f29edc7a3978da01553c880414654eca9d3e4ddd [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren92397ce2010-01-17 19:32:00 +00002# From configure.in Revision: 77587 .
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öwis4d542ec2006-11-25 15:39:19 +00002135 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2136 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2137 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002138 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 +00002139 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002140 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2141 # of union __?sigval. Reported by Stuart Bishop.
2142 SunOS/5.6)
2143 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002144 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2145 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002146 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002147 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002148 define_xopen_source=no;;
2149 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002150 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002151 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002152 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002153 # On FreeBSD 4, the math functions C89 does not cover are never defined
2154 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2155 FreeBSD/4.*)
2156 define_xopen_source=no;;
2157 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2158 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2159 # identifies itself as Darwin/7.*
2160 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2161 # disables platform specific features beyond repair.
2162 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2163 # has no effect, don't bother defining them
2164 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002165 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002166 Darwin/1[0-9].*)
2167 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002168 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2169 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2170 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002171 AIX/4)
2172 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002173 AIX/5)
2174 if test `uname -r` -eq 1; then
2175 define_xopen_source=no
2176 fi
2177 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002178 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2179 # defining NI_NUMERICHOST.
2180 QNX/6.3.2)
2181 define_xopen_source=no
2182 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002183
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002184esac
2185
2186if test $define_xopen_source = yes
2187then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002188 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2189 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002190 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2191 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002192 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002193 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002194
2195cat >>confdefs.h <<\_ACEOF
2196#define _XOPEN_SOURCE 500
2197_ACEOF
2198
2199 ;;
2200 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002201
2202cat >>confdefs.h <<\_ACEOF
2203#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002204_ACEOF
2205
Skip Montanarof0d5f792004-08-15 14:08:23 +00002206 ;;
2207 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002208
2209 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2210 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2211 # several APIs are not declared. Since this is also needed in some
2212 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002213 # except for Solaris 10, where it must not be defined,
2214 # as it implies XPG4.2
2215 case $ac_sys_system/$ac_sys_release in
2216 SunOS/5.10)
2217 ;;
2218 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002219
2220cat >>confdefs.h <<\_ACEOF
2221#define _XOPEN_SOURCE_EXTENDED 1
2222_ACEOF
2223
Martin v. Löwis7dece662005-11-26 11:38:24 +00002224 ;;
2225 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002226
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002227
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002228cat >>confdefs.h <<\_ACEOF
2229#define _POSIX_C_SOURCE 200112L
2230_ACEOF
2231
2232
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002233fi
2234
Guido van Rossum91922671997-10-09 20:24:13 +00002235#
2236# SGI compilers allow the specification of the both the ABI and the
2237# ISA on the command line. Depending on the values of these switches,
2238# different and often incompatable code will be generated.
2239#
2240# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2241# thus supply support for various ABI/ISA combinations. The MACHDEP
2242# variable is also adjusted.
2243#
2244
2245if test ! -z "$SGI_ABI"
2246then
2247 CC="cc $SGI_ABI"
2248 LDFLAGS="$SGI_ABI $LDFLAGS"
2249 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002251{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2252echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002253
Jack Jansen83f898c2002-12-30 22:23:40 +00002254# And add extra plat-mac for darwin
2255
Jack Jansen7b59b422003-03-17 15:44:10 +00002256
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002257{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2258echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002259if test -z "$EXTRAPLATDIR"
2260then
2261 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002262 darwin)
2263 EXTRAPLATDIR="\$(PLATMACDIRS)"
2264 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2265 ;;
2266 *)
2267 EXTRAPLATDIR=""
2268 EXTRAMACHDEPPATH=""
2269 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002270 esac
2271fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002272{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2273echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002274
Jack Jansen6b08a402004-06-03 12:41:45 +00002275# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2276# it may influence the way we can build extensions, so distutils
2277# needs to check it
2278
Ronald Oussoren988117f2006-04-29 11:31:35 +00002279
Jack Jansen6b08a402004-06-03 12:41:45 +00002280CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002281EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002282
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002283{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2284echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002285ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002286{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2287echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002288
Guido van Rossum627b2d71993-12-24 10:39:16 +00002289# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002290
2291# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2292# for debug/optimization stuff. BASECFLAGS is for flags that are required
2293# just to get things to compile and link. Users are free to override OPT
2294# when running configure or make. The build should not break if they do.
2295# BASECFLAGS should generally not be messed with, however.
2296
2297# XXX shouldn't some/most/all of this code be merged with the stuff later
2298# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002299{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2300echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002301
Martin v. Löwiseba40652007-08-30 20:10:57 +00002302# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002303if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002304 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002305 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002306 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002307 without_gcc=yes;;
2308 yes) CC=gcc
2309 without_gcc=no;;
2310 *) CC=$withval
2311 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002312 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002313else
Martin v. Löwis11437992002-04-12 09:54:03 +00002314
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002315 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002316 AIX*) CC=cc_r
2317 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002318 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002319 case $BE_HOST_CPU in
2320 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002321 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002322 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002323 BASECFLAGS="$BASECFLAGS -export pragma"
2324 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002325 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002326 ;;
2327 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002328 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002329 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002330 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002331 ;;
2332 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002333 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2334echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002335 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002336 ;;
2337 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002338 AR="\$(srcdir)/Modules/ar_beos"
2339 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002340 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002341 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002342 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002343fi
2344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002345{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2346echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002347
Guido van Rossum8b131c51995-03-09 14:10:13 +00002348# If the user switches compilers, we can't believe the cache
2349if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2350then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002351 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002352(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002353echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002354(it is also a good idea to do 'make clean' before compiling)" >&2;}
2355 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002356fi
2357
Martin v. Löwis11437992002-04-12 09:54:03 +00002358ac_ext=c
2359ac_cpp='$CPP $CPPFLAGS'
2360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2362ac_compiler_gnu=$ac_cv_c_compiler_gnu
2363if test -n "$ac_tool_prefix"; then
2364 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2365set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002368if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002370else
2371 if test -n "$CC"; then
2372 ac_cv_prog_CC="$CC" # Let the user override the test.
2373else
Martin v. Löwis11437992002-04-12 09:54:03 +00002374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
2379 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002380 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 +00002381 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002383 break 2
2384 fi
2385done
2386done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
Jack Jansendd19cf82001-12-06 22:36:17 +00002389fi
2390fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002391CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002392if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002393 { echo "$as_me:$LINENO: result: $CC" >&5
2394echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002395else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002396 { echo "$as_me:$LINENO: result: no" >&5
2397echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002398fi
2399
Martin v. Löwiseba40652007-08-30 20:10:57 +00002400
Martin v. Löwis11437992002-04-12 09:54:03 +00002401fi
2402if test -z "$ac_cv_prog_CC"; then
2403 ac_ct_CC=$CC
2404 # Extract the first word of "gcc", so it can be a program name with args.
2405set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002406{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2407echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
2411 if test -n "$ac_ct_CC"; then
2412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2413else
2414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2415for as_dir in $PATH
2416do
2417 IFS=$as_save_IFS
2418 test -z "$as_dir" && as_dir=.
2419 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002420 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 +00002421 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002422 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002423 break 2
2424 fi
2425done
2426done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002427IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429fi
2430fi
2431ac_ct_CC=$ac_cv_prog_ac_ct_CC
2432if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002433 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2434echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002436 { echo "$as_me:$LINENO: result: no" >&5
2437echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002438fi
2439
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440 if test "x$ac_ct_CC" = x; then
2441 CC=""
2442 else
2443 case $cross_compiling:$ac_tool_warned in
2444yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002445{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2446whose name does not start with the host triplet. If you think this
2447configuration is useful to you, please write to autoconf@gnu.org." >&5
2448echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2449whose name does not start with the host triplet. If you think this
2450configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451ac_tool_warned=yes ;;
2452esac
2453 CC=$ac_ct_CC
2454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002455else
2456 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002457fi
2458
Jack Jansendd19cf82001-12-06 22:36:17 +00002459if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460 if test -n "$ac_tool_prefix"; then
2461 # 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 +00002462set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002463{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002465if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002466 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002467else
2468 if test -n "$CC"; then
2469 ac_cv_prog_CC="$CC" # Let the user override the test.
2470else
Martin v. Löwis11437992002-04-12 09:54:03 +00002471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
2476 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 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 +00002478 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002479 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 break 2
2481 fi
2482done
2483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486fi
2487fi
2488CC=$ac_cv_prog_CC
2489if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002490 { echo "$as_me:$LINENO: result: $CC" >&5
2491echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002493 { echo "$as_me:$LINENO: result: no" >&5
2494echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002495fi
2496
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002499fi
2500if test -z "$CC"; then
2501 # Extract the first word of "cc", so it can be a program name with args.
2502set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002503{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2504echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002505if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002506 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
2508 if test -n "$CC"; then
2509 ac_cv_prog_CC="$CC" # Let the user override the test.
2510else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2513for as_dir in $PATH
2514do
2515 IFS=$as_save_IFS
2516 test -z "$as_dir" && as_dir=.
2517 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518 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 +00002519 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2520 ac_prog_rejected=yes
2521 continue
2522 fi
2523 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002524 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 break 2
2526 fi
2527done
2528done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002530
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002531if test $ac_prog_rejected = yes; then
2532 # We found a bogon in the path, so make sure we never use it.
2533 set dummy $ac_cv_prog_CC
2534 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002536 # We chose a different compiler from the bogus one.
2537 # However, it has the same basename, so the bogon will be chosen
2538 # first if we set CC to just the basename; use the full file name.
2539 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002541 fi
2542fi
2543fi
2544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002545CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002546if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002547 { echo "$as_me:$LINENO: result: $CC" >&5
2548echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002549else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002550 { echo "$as_me:$LINENO: result: no" >&5
2551echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002552fi
2553
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555fi
2556if test -z "$CC"; then
2557 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 do
2560 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2561set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002562{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2563echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002564if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002566else
2567 if test -n "$CC"; then
2568 ac_cv_prog_CC="$CC" # Let the user override the test.
2569else
Martin v. Löwis11437992002-04-12 09:54:03 +00002570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2571for as_dir in $PATH
2572do
2573 IFS=$as_save_IFS
2574 test -z "$as_dir" && as_dir=.
2575 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 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 +00002577 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002578 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002581done
2582done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002584
2585fi
2586fi
2587CC=$ac_cv_prog_CC
2588if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002589 { echo "$as_me:$LINENO: result: $CC" >&5
2590echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002592 { echo "$as_me:$LINENO: result: no" >&5
2593echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002594fi
2595
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 test -n "$CC" && break
2598 done
2599fi
2600if test -z "$CC"; then
2601 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002603do
2604 # Extract the first word of "$ac_prog", so it can be a program name with args.
2605set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002606{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2607echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002608if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002610else
2611 if test -n "$ac_ct_CC"; then
2612 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2613else
2614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2615for as_dir in $PATH
2616do
2617 IFS=$as_save_IFS
2618 test -z "$as_dir" && as_dir=.
2619 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002620 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 +00002621 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002622 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 break 2
2624 fi
2625done
2626done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629fi
2630fi
2631ac_ct_CC=$ac_cv_prog_ac_ct_CC
2632if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002633 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2634echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002636 { echo "$as_me:$LINENO: result: no" >&5
2637echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002638fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002639
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 test -n "$ac_ct_CC" && break
2642done
Michael W. Hudson54241132001-12-07 15:38:26 +00002643
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "x$ac_ct_CC" = x; then
2645 CC=""
2646 else
2647 case $cross_compiling:$ac_tool_warned in
2648yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2650whose name does not start with the host triplet. If you think this
2651configuration is useful to you, please write to autoconf@gnu.org." >&5
2652echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2653whose name does not start with the host triplet. If you think this
2654configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002655ac_tool_warned=yes ;;
2656esac
2657 CC=$ac_ct_CC
2658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002659fi
2660
2661fi
2662
2663
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002664test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002665See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002666echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002667See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002668 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002669
2670# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002671echo "$as_me:$LINENO: checking for C compiler version" >&5
2672ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002673{ (ac_try="$ac_compiler --version >&5"
2674case "(($ac_try" in
2675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2676 *) ac_try_echo=$ac_try;;
2677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683{ (ac_try="$ac_compiler -v >&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 -v >&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); }
2703
2704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002705/* confdefs.h. */
2706_ACEOF
2707cat confdefs.h >>conftest.$ac_ext
2708cat >>conftest.$ac_ext <<_ACEOF
2709/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002710
Martin v. Löwis11437992002-04-12 09:54:03 +00002711int
2712main ()
2713{
2714
2715 ;
2716 return 0;
2717}
2718_ACEOF
2719ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002720ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002721# Try to create an executable without -o first, disregard a.out.
2722# It will help us diagnose broken compilers, and finding out an intuition
2723# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002724{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2725echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2726ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2727#
2728# List of possible output files, starting from the most likely.
2729# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2730# only as a last resort. b.out is created by i960 compilers.
2731ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2732#
2733# The IRIX 6 linker writes into existing files which may not be
2734# executable, retaining their permissions. Remove them first so a
2735# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002736ac_rmfiles=
2737for ac_file in $ac_files
2738do
2739 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002740 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002741 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2742 esac
2743done
2744rm -f $ac_rmfiles
2745
2746if { (ac_try="$ac_link_default"
2747case "(($ac_try" in
2748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2749 *) ac_try_echo=$ac_try;;
2750esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002752 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2757# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2758# in a Makefile. We should not override ac_cv_exeext if it was cached,
2759# so that the user can short-circuit this test for compilers unknown to
2760# Autoconf.
2761for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002762do
2763 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002766 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002767 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002768 # We found the default executable, but exeext='' is most
2769 # certainly right.
2770 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002771 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002772 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2773 then :; else
2774 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2775 fi
2776 # We set ac_cv_exeext here because the later test for it is not
2777 # safe: cross compilers may not add the suffix if given an `-o'
2778 # argument, so we may need to know it at that point already.
2779 # Even if this section looks crufty: it has the advantage of
2780 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002781 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002782 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002783 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 esac
2785done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786test "$ac_cv_exeext" = no && ac_cv_exeext=
2787
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002788else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002789 ac_file=''
2790fi
2791
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002792{ echo "$as_me:$LINENO: result: $ac_file" >&5
2793echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002796sed 's/^/| /' conftest.$ac_ext >&5
2797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002798{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002799See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002801See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002802 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002803fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002804
Martin v. Löwis11437992002-04-12 09:54:03 +00002805ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002806
Martin v. Löwiseba40652007-08-30 20:10:57 +00002807# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002808# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2810echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2812# If not cross compiling, check that we can run a simple program.
2813if test "$cross_compiling" != yes; then
2814 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815 { (case "(($ac_try" in
2816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2817 *) ac_try_echo=$ac_try;;
2818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002820 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002823 (exit $ac_status); }; }; then
2824 cross_compiling=no
2825 else
2826 if test "$cross_compiling" = maybe; then
2827 cross_compiling=yes
2828 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002829 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002830If you meant to cross compile, use \`--host'.
2831See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002833If you meant to cross compile, use \`--host'.
2834See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002835 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 fi
2837 fi
2838fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002839{ echo "$as_me:$LINENO: result: yes" >&5
2840echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002843ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002844# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002845# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2847echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2848{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2849echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2852echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002853if { (ac_try="$ac_link"
2854case "(($ac_try" in
2855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2856 *) ac_try_echo=$ac_try;;
2857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002859 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 (exit $ac_status); }; then
2863 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2864# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2865# work properly (i.e., refer to `conftest.exe'), while it won't with
2866# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002867for ac_file in conftest.exe conftest conftest.*; do
2868 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002869 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002870 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002872 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 * ) break;;
2874 esac
2875done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002877 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002878See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002879echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002880See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002881 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002882fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002883
Martin v. Löwis11437992002-04-12 09:54:03 +00002884rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002885{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2886echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002887
2888rm -f conftest.$ac_ext
2889EXEEXT=$ac_cv_exeext
2890ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2892echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002893if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002894 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002895else
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002897/* confdefs.h. */
2898_ACEOF
2899cat confdefs.h >>conftest.$ac_ext
2900cat >>conftest.$ac_ext <<_ACEOF
2901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002902
Martin v. Löwis11437992002-04-12 09:54:03 +00002903int
2904main ()
2905{
2906
2907 ;
2908 return 0;
2909}
2910_ACEOF
2911rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912if { (ac_try="$ac_compile"
2913case "(($ac_try" in
2914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2915 *) ac_try_echo=$ac_try;;
2916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002918 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002921 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 for ac_file in conftest.o conftest.obj conftest.*; do
2923 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002924 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002925 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002926 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2927 break;;
2928 esac
2929done
2930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002932sed 's/^/| /' conftest.$ac_ext >&5
2933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002934{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002935See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002936echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002937See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002938 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002939fi
2940
2941rm -f conftest.$ac_cv_objext conftest.$ac_ext
2942fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002943{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2944echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002945OBJEXT=$ac_cv_objext
2946ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002947{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2948echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002949if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002951else
2952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002953/* confdefs.h. */
2954_ACEOF
2955cat confdefs.h >>conftest.$ac_ext
2956cat >>conftest.$ac_ext <<_ACEOF
2957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959int
2960main ()
2961{
2962#ifndef __GNUC__
2963 choke me
2964#endif
2965
2966 ;
2967 return 0;
2968}
2969_ACEOF
2970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971if { (ac_try="$ac_compile"
2972case "(($ac_try" in
2973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2974 *) ac_try_echo=$ac_try;;
2975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002979 grep -v '^ *+' conftest.er1 >conftest.err
2980 rm -f conftest.er1
2981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002983 (exit $ac_status); } && {
2984 test -z "$ac_c_werror_flag" ||
2985 test ! -s conftest.err
2986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002987 ac_compiler_gnu=yes
2988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002990sed 's/^/| /' conftest.$ac_ext >&5
2991
Martin v. Löwiseba40652007-08-30 20:10:57 +00002992 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002994
2995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002996ac_cv_c_compiler_gnu=$ac_compiler_gnu
2997
2998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002999{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3000echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3001GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003002ac_test_CFLAGS=${CFLAGS+set}
3003ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003004{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3005echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003006if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003007 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003008else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003009 ac_save_c_werror_flag=$ac_c_werror_flag
3010 ac_c_werror_flag=yes
3011 ac_cv_prog_cc_g=no
3012 CFLAGS="-g"
3013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003014/* confdefs.h. */
3015_ACEOF
3016cat confdefs.h >>conftest.$ac_ext
3017cat >>conftest.$ac_ext <<_ACEOF
3018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
Martin v. Löwis11437992002-04-12 09:54:03 +00003020int
3021main ()
3022{
3023
3024 ;
3025 return 0;
3026}
3027_ACEOF
3028rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003029if { (ac_try="$ac_compile"
3030case "(($ac_try" in
3031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3032 *) ac_try_echo=$ac_try;;
3033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003037 grep -v '^ *+' conftest.er1 >conftest.err
3038 rm -f conftest.er1
3039 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003041 (exit $ac_status); } && {
3042 test -z "$ac_c_werror_flag" ||
3043 test ! -s conftest.err
3044 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003045 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003046else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003048sed 's/^/| /' conftest.$ac_ext >&5
3049
Martin v. Löwiseba40652007-08-30 20:10:57 +00003050 CFLAGS=""
3051 cat >conftest.$ac_ext <<_ACEOF
3052/* confdefs.h. */
3053_ACEOF
3054cat confdefs.h >>conftest.$ac_ext
3055cat >>conftest.$ac_ext <<_ACEOF
3056/* end confdefs.h. */
3057
3058int
3059main ()
3060{
3061
3062 ;
3063 return 0;
3064}
3065_ACEOF
3066rm -f conftest.$ac_objext
3067if { (ac_try="$ac_compile"
3068case "(($ac_try" in
3069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3070 *) ac_try_echo=$ac_try;;
3071esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073 (eval "$ac_compile") 2>conftest.er1
3074 ac_status=$?
3075 grep -v '^ *+' conftest.er1 >conftest.err
3076 rm -f conftest.er1
3077 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003079 (exit $ac_status); } && {
3080 test -z "$ac_c_werror_flag" ||
3081 test ! -s conftest.err
3082 } && test -s conftest.$ac_objext; then
3083 :
3084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003085 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003086sed 's/^/| /' conftest.$ac_ext >&5
3087
3088 ac_c_werror_flag=$ac_save_c_werror_flag
3089 CFLAGS="-g"
3090 cat >conftest.$ac_ext <<_ACEOF
3091/* confdefs.h. */
3092_ACEOF
3093cat confdefs.h >>conftest.$ac_ext
3094cat >>conftest.$ac_ext <<_ACEOF
3095/* end confdefs.h. */
3096
3097int
3098main ()
3099{
3100
3101 ;
3102 return 0;
3103}
3104_ACEOF
3105rm -f conftest.$ac_objext
3106if { (ac_try="$ac_compile"
3107case "(($ac_try" in
3108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109 *) ac_try_echo=$ac_try;;
3110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003112 (eval "$ac_compile") 2>conftest.er1
3113 ac_status=$?
3114 grep -v '^ *+' conftest.er1 >conftest.err
3115 rm -f conftest.er1
3116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118 (exit $ac_status); } && {
3119 test -z "$ac_c_werror_flag" ||
3120 test ! -s conftest.err
3121 } && test -s conftest.$ac_objext; then
3122 ac_cv_prog_cc_g=yes
3123else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003124 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125sed 's/^/| /' conftest.$ac_ext >&5
3126
3127
Guido van Rossum627b2d71993-12-24 10:39:16 +00003128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003129
3130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132
3133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3134fi
3135
3136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3137 ac_c_werror_flag=$ac_save_c_werror_flag
3138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003139{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3140echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003141if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003142 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003143elif test $ac_cv_prog_cc_g = yes; then
3144 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003145 CFLAGS="-g -O2"
3146 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003147 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148 fi
3149else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003150 if test "$GCC" = yes; then
3151 CFLAGS="-O2"
3152 else
3153 CFLAGS=
3154 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003155fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003156{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3157echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003159 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003160else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003161 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003162ac_save_CC=$CC
3163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003164/* confdefs.h. */
3165_ACEOF
3166cat confdefs.h >>conftest.$ac_ext
3167cat >>conftest.$ac_ext <<_ACEOF
3168/* end confdefs.h. */
3169#include <stdarg.h>
3170#include <stdio.h>
3171#include <sys/types.h>
3172#include <sys/stat.h>
3173/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3174struct buf { int x; };
3175FILE * (*rcsopen) (struct buf *, struct stat *, int);
3176static char *e (p, i)
3177 char **p;
3178 int i;
3179{
3180 return p[i];
3181}
3182static char *f (char * (*g) (char **, int), char **p, ...)
3183{
3184 char *s;
3185 va_list v;
3186 va_start (v,p);
3187 s = g (p, va_arg (v,int));
3188 va_end (v);
3189 return s;
3190}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003191
3192/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3193 function prototypes and stuff, but not '\xHH' hex character constants.
3194 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003196 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3197 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003199int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3200
Martin v. Löwiseba40652007-08-30 20:10:57 +00003201/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3202 inside strings and character constants. */
3203#define FOO(x) 'x'
3204int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3205
Skip Montanaro6dead952003-09-25 14:50:04 +00003206int test (int i, double x);
3207struct s1 {int (*f) (int a);};
3208struct s2 {int (*f) (double a);};
3209int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3210int argc;
3211char **argv;
3212int
3213main ()
3214{
3215return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3216 ;
3217 return 0;
3218}
3219_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003220for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3221 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003222do
3223 CC="$ac_save_CC $ac_arg"
3224 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003225if { (ac_try="$ac_compile"
3226case "(($ac_try" in
3227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3228 *) ac_try_echo=$ac_try;;
3229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003231 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003233 grep -v '^ *+' conftest.er1 >conftest.err
3234 rm -f conftest.er1
3235 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237 (exit $ac_status); } && {
3238 test -z "$ac_c_werror_flag" ||
3239 test ! -s conftest.err
3240 } && test -s conftest.$ac_objext; then
3241 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003244sed 's/^/| /' conftest.$ac_ext >&5
3245
Martin v. Löwiseba40652007-08-30 20:10:57 +00003246
Skip Montanaro6dead952003-09-25 14:50:04 +00003247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003248
3249rm -f core conftest.err conftest.$ac_objext
3250 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003251done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003252rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003253CC=$ac_save_CC
3254
3255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256# AC_CACHE_VAL
3257case "x$ac_cv_prog_cc_c89" in
3258 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003259 { echo "$as_me:$LINENO: result: none needed" >&5
3260echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003261 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003262 { echo "$as_me:$LINENO: result: unsupported" >&5
3263echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003264 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003266 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3267echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003268esac
3269
Skip Montanaro6dead952003-09-25 14:50:04 +00003270
Martin v. Löwis11437992002-04-12 09:54:03 +00003271ac_ext=c
3272ac_cpp='$CPP $CPPFLAGS'
3273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3275ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003277
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003278
3279
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003280{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3281echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003282
Martin v. Löwiseba40652007-08-30 20:10:57 +00003283# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003284if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003286
3287 case $withval in
3288 no) with_cxx_main=no
3289 MAINCC='$(CC)';;
3290 yes) with_cxx_main=yes
3291 MAINCC='$(CXX)';;
3292 *) with_cxx_main=yes
3293 MAINCC=$withval
3294 if test -z "$CXX"
3295 then
3296 CXX=$withval
3297 fi;;
3298 esac
3299else
3300
3301 with_cxx_main=no
3302 MAINCC='$(CC)'
3303
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304fi
3305
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003306{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3307echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308
3309preset_cxx="$CXX"
3310if test -z "$CXX"
3311then
3312 case "$CC" in
3313 gcc) # Extract the first word of "g++", so it can be a program name with args.
3314set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003317if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003318 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003319else
3320 case $CXX in
3321 [\\/]* | ?:[\\/]*)
3322 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3323 ;;
3324 *)
3325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in notfound
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
3330 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331 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 +00003332 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334 break 2
3335 fi
3336done
3337done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003338IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003339
3340 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3341 ;;
3342esac
3343fi
3344CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003345if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003353 ;;
3354 cc) # Extract the first word of "c++", so it can be a program name with args.
3355set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003356{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003358if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003360else
3361 case $CXX in
3362 [\\/]* | ?:[\\/]*)
3363 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3364 ;;
3365 *)
3366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3367for as_dir in notfound
3368do
3369 IFS=$as_save_IFS
3370 test -z "$as_dir" && as_dir=.
3371 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372 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 +00003373 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375 break 2
3376 fi
3377done
3378done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003379IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003380
3381 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3382 ;;
3383esac
3384fi
3385CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003386if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003387 { echo "$as_me:$LINENO: result: $CXX" >&5
3388echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003390 { echo "$as_me:$LINENO: result: no" >&5
3391echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394 ;;
3395 esac
3396 if test "$CXX" = "notfound"
3397 then
3398 CXX=""
3399 fi
3400fi
3401if test -z "$CXX"
3402then
3403 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3404do
3405 # Extract the first word of "$ac_prog", so it can be a program name with args.
3406set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003407{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3408echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003410 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003411else
3412 if test -n "$CXX"; then
3413 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3414else
3415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3416for as_dir in $PATH
3417do
3418 IFS=$as_save_IFS
3419 test -z "$as_dir" && as_dir=.
3420 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003421 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 +00003422 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003423 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003424 break 2
3425 fi
3426done
3427done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003428IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003429
3430fi
3431fi
3432CXX=$ac_cv_prog_CXX
3433if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003434 { echo "$as_me:$LINENO: result: $CXX" >&5
3435echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003437 { echo "$as_me:$LINENO: result: no" >&5
3438echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003439fi
3440
Martin v. Löwiseba40652007-08-30 20:10:57 +00003441
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003442 test -n "$CXX" && break
3443done
3444test -n "$CXX" || CXX="notfound"
3445
3446 if test "$CXX" = "notfound"
3447 then
3448 CXX=""
3449 fi
3450fi
3451if test "$preset_cxx" != "$CXX"
3452then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003453 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003454
3455 By default, distutils will build C++ extension modules with \"$CXX\".
3456 If this is not intended, then set CXX on the configure command line.
3457 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003458echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003459
3460 By default, distutils will build C++ extension modules with \"$CXX\".
3461 If this is not intended, then set CXX on the configure command line.
3462 " >&2;}
3463fi
3464
3465
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003466# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003467
3468ac_ext=c
3469ac_cpp='$CPP $CPPFLAGS'
3470ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3471ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3472ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003473{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3474echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003475# On Suns, sometimes $CPP names a directory.
3476if test -n "$CPP" && test -d "$CPP"; then
3477 CPP=
3478fi
3479if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # Double quotes because CPP needs to be expanded
3484 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3485 do
3486 ac_preproc_ok=false
3487for ac_c_preproc_warn_flag in '' yes
3488do
3489 # Use a header file that comes with gcc, so configuring glibc
3490 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003491 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3492 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003493 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # not just through cpp. "Syntax error" is here to catch this case.
3495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003496/* confdefs.h. */
3497_ACEOF
3498cat confdefs.h >>conftest.$ac_ext
3499cat >>conftest.$ac_ext <<_ACEOF
3500/* end confdefs.h. */
3501#ifdef __STDC__
3502# include <limits.h>
3503#else
3504# include <assert.h>
3505#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003506 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003507_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003508if { (ac_try="$ac_cpp conftest.$ac_ext"
3509case "(($ac_try" in
3510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3511 *) ac_try_echo=$ac_try;;
3512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003516 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 rm -f conftest.er1
3518 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003520 (exit $ac_status); } >/dev/null && {
3521 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3522 test ! -s conftest.err
3523 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003524 :
3525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003527sed 's/^/| /' conftest.$ac_ext >&5
3528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 # Broken: fails on valid input.
3530continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532
Martin v. Löwis11437992002-04-12 09:54:03 +00003533rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003534
Martin v. Löwiseba40652007-08-30 20:10:57 +00003535 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 # can be detected and how.
3537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003538/* confdefs.h. */
3539_ACEOF
3540cat confdefs.h >>conftest.$ac_ext
3541cat >>conftest.$ac_ext <<_ACEOF
3542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003543#include <ac_nonexistent.h>
3544_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003545if { (ac_try="$ac_cpp conftest.$ac_ext"
3546case "(($ac_try" in
3547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3548 *) ac_try_echo=$ac_try;;
3549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003551 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003553 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 rm -f conftest.er1
3555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003557 (exit $ac_status); } >/dev/null && {
3558 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3559 test ! -s conftest.err
3560 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 # Broken: success on invalid input.
3562continue
3563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003565sed 's/^/| /' conftest.$ac_ext >&5
3566
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 # Passes both tests.
3568ac_preproc_ok=:
3569break
3570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572rm -f conftest.err conftest.$ac_ext
3573
3574done
3575# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3576rm -f conftest.err conftest.$ac_ext
3577if $ac_preproc_ok; then
3578 break
3579fi
3580
3581 done
3582 ac_cv_prog_CPP=$CPP
3583
3584fi
3585 CPP=$ac_cv_prog_CPP
3586else
3587 ac_cv_prog_CPP=$CPP
3588fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003589{ echo "$as_me:$LINENO: result: $CPP" >&5
3590echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591ac_preproc_ok=false
3592for ac_c_preproc_warn_flag in '' yes
3593do
3594 # Use a header file that comes with gcc, so configuring glibc
3595 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003596 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3597 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 # On the NeXT, cc -E runs the code through the compiler's parser,
3599 # not just through cpp. "Syntax error" is here to catch this case.
3600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003601/* confdefs.h. */
3602_ACEOF
3603cat confdefs.h >>conftest.$ac_ext
3604cat >>conftest.$ac_ext <<_ACEOF
3605/* end confdefs.h. */
3606#ifdef __STDC__
3607# include <limits.h>
3608#else
3609# include <assert.h>
3610#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003611 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003612_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003613if { (ac_try="$ac_cpp conftest.$ac_ext"
3614case "(($ac_try" in
3615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3616 *) ac_try_echo=$ac_try;;
3617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003621 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 rm -f conftest.er1
3623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625 (exit $ac_status); } >/dev/null && {
3626 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3627 test ! -s conftest.err
3628 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 :
3630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003632sed 's/^/| /' conftest.$ac_ext >&5
3633
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 # Broken: fails on valid input.
3635continue
3636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638rm -f conftest.err conftest.$ac_ext
3639
Martin v. Löwiseba40652007-08-30 20:10:57 +00003640 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 # can be detected and how.
3642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003643/* confdefs.h. */
3644_ACEOF
3645cat confdefs.h >>conftest.$ac_ext
3646cat >>conftest.$ac_ext <<_ACEOF
3647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003648#include <ac_nonexistent.h>
3649_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003650if { (ac_try="$ac_cpp conftest.$ac_ext"
3651case "(($ac_try" in
3652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3653 *) ac_try_echo=$ac_try;;
3654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003656 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003657 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 rm -f conftest.er1
3660 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003662 (exit $ac_status); } >/dev/null && {
3663 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3664 test ! -s conftest.err
3665 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 # Broken: success on invalid input.
3667continue
3668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003670sed 's/^/| /' conftest.$ac_ext >&5
3671
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 # Passes both tests.
3673ac_preproc_ok=:
3674break
3675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676
Martin v. Löwis11437992002-04-12 09:54:03 +00003677rm -f conftest.err conftest.$ac_ext
3678
3679done
3680# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3681rm -f conftest.err conftest.$ac_ext
3682if $ac_preproc_ok; then
3683 :
3684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003686See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003687echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003688See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003689 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
3692ac_ext=c
3693ac_cpp='$CPP $CPPFLAGS'
3694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3696ac_compiler_gnu=$ac_cv_c_compiler_gnu
3697
3698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3700echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003701if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003702 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003704 # Extract the first word of "grep ggrep" to use in msg output
3705if test -z "$GREP"; then
3706set dummy grep ggrep; ac_prog_name=$2
3707if test "${ac_cv_path_GREP+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003711# Loop through the user's path and test for each of PROGNAME-LIST
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
3717 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
3719 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3720 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3721 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722 # Check for GNU $ac_path_GREP
3723case `"$ac_path_GREP" --version 2>&1` in
3724*GNU*)
3725 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3726*)
3727 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003728 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003729 while :
3730 do
3731 cat "conftest.in" "conftest.in" >"conftest.tmp"
3732 mv "conftest.tmp" "conftest.in"
3733 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003734 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003735 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737 ac_count=`expr $ac_count + 1`
3738 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3739 # Best one so far, save it but keep looking for a better one
3740 ac_cv_path_GREP="$ac_path_GREP"
3741 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003742 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003743 # 10*(2^10) chars as input seems more than enough
3744 test $ac_count -gt 10 && break
3745 done
3746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3747esac
3748
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003749
3750 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003751 done
3752done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753
3754done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003756
3757
3758fi
3759
3760GREP="$ac_cv_path_GREP"
3761if test -z "$GREP"; then
3762 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3763echo "$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 +00003764 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003765fi
3766
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767else
3768 ac_cv_path_GREP=$GREP
3769fi
3770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003773{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3774echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775 GREP="$ac_cv_path_GREP"
3776
3777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003778{ echo "$as_me:$LINENO: checking for egrep" >&5
3779echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003780if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782else
3783 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3784 then ac_cv_path_EGREP="$GREP -E"
3785 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003786 # Extract the first word of "egrep" to use in msg output
3787if test -z "$EGREP"; then
3788set dummy egrep; ac_prog_name=$2
3789if test "${ac_cv_path_EGREP+set}" = set; then
3790 echo $ECHO_N "(cached) $ECHO_C" >&6
3791else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793# Loop through the user's path and test for each of PROGNAME-LIST
3794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3796do
3797 IFS=$as_save_IFS
3798 test -z "$as_dir" && as_dir=.
3799 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003800 for ac_exec_ext in '' $ac_executable_extensions; do
3801 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3802 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3803 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804 # Check for GNU $ac_path_EGREP
3805case `"$ac_path_EGREP" --version 2>&1` in
3806*GNU*)
3807 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3808*)
3809 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003810 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003811 while :
3812 do
3813 cat "conftest.in" "conftest.in" >"conftest.tmp"
3814 mv "conftest.tmp" "conftest.in"
3815 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003816 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3818 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3819 ac_count=`expr $ac_count + 1`
3820 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3821 # Best one so far, save it but keep looking for a better one
3822 ac_cv_path_EGREP="$ac_path_EGREP"
3823 ac_path_EGREP_max=$ac_count
3824 fi
3825 # 10*(2^10) chars as input seems more than enough
3826 test $ac_count -gt 10 && break
3827 done
3828 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3829esac
3830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003831
3832 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 done
3834done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003835
3836done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003838
3839
3840fi
3841
3842EGREP="$ac_cv_path_EGREP"
3843if test -z "$EGREP"; then
3844 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3845echo "$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 +00003846 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003847fi
3848
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849else
3850 ac_cv_path_EGREP=$EGREP
3851fi
3852
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003853
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 fi
3855fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003856{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3857echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003859
3860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003861
3862{ echo "$as_me:$LINENO: checking for AIX" >&5
3863echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3864cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003865/* confdefs.h. */
3866_ACEOF
3867cat confdefs.h >>conftest.$ac_ext
3868cat >>conftest.$ac_ext <<_ACEOF
3869/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003870#ifdef _AIX
3871 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003872#endif
3873
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003874_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3876 $EGREP "yes" >/dev/null 2>&1; then
3877 { echo "$as_me:$LINENO: result: yes" >&5
3878echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003879cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003880#define _ALL_SOURCE 1
3881_ACEOF
3882
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003883else
3884 { echo "$as_me:$LINENO: result: no" >&5
3885echo "${ECHO_T}no" >&6; }
3886fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003887rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003888
3889
3890
3891# Check for unsupported systems
3892case $ac_sys_system/$ac_sys_release in
3893atheos*|Linux*/1*)
3894 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3895 echo See README for details.
3896 exit 1;;
3897esac
3898
3899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003900{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3901echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902
3903# Check whether --with-suffix was given.
3904if test "${with_suffix+set}" = set; then
3905 withval=$with_suffix;
3906 case $withval in
3907 no) EXEEXT=;;
3908 yes) EXEEXT=.exe;;
3909 *) EXEEXT=$withval;;
3910 esac
3911fi
3912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003913{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3914echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003915
3916# Test whether we're running on a non-case-sensitive system, in which
3917# case we give a warning if no ext is given
3918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003919{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3920echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003921if test ! -d CaseSensitiveTestDir; then
3922mkdir CaseSensitiveTestDir
3923fi
3924
3925if test -d casesensitivetestdir
3926then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003927 { echo "$as_me:$LINENO: result: yes" >&5
3928echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003929 BUILDEXEEXT=.exe
3930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003931 { echo "$as_me:$LINENO: result: no" >&5
3932echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003933 BUILDEXEEXT=$EXEEXT
3934fi
3935rmdir CaseSensitiveTestDir
3936
3937case $MACHDEP in
3938bsdos*)
3939 case $CC in
3940 gcc) CC="$CC -D_HAVE_BSDI";;
3941 esac;;
3942esac
3943
3944case $ac_sys_system in
3945hp*|HP*)
3946 case $CC in
3947 cc|*/cc) CC="$CC -Ae";;
3948 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003949SunOS*)
3950 # Some functions have a prototype only with that define, e.g. confstr
3951
3952cat >>confdefs.h <<\_ACEOF
3953#define __EXTENSIONS__ 1
3954_ACEOF
3955
3956 ;;
3957esac
3958
3959
3960
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003961{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3962echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003963if test -z "$LIBRARY"
3964then
3965 LIBRARY='libpython$(VERSION).a'
3966fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003967{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3968echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003969
3970# LDLIBRARY is the name of the library to link against (as opposed to the
3971# name of the library into which to insert object files). BLDLIBRARY is also
3972# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3973# is blank as the main program is not linked directly against LDLIBRARY.
3974# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3975# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3976# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3977# DLLLIBRARY is the shared (i.e., DLL) library.
3978#
3979# RUNSHARED is used to run shared python without installed libraries
3980#
3981# INSTSONAME is the name of the shared library that will be use to install
3982# on the system - some systems like version suffix, others don't
3983
3984
3985
3986
3987
3988
3989LDLIBRARY="$LIBRARY"
3990BLDLIBRARY='$(LDLIBRARY)'
3991INSTSONAME='$(LDLIBRARY)'
3992DLLLIBRARY=''
3993LDLIBRARYDIR=''
3994RUNSHARED=''
3995
3996# LINKCC is the command that links the python executable -- default is $(CC).
3997# If CXX is set, and if it is needed to link a main function that was
3998# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3999# python might then depend on the C++ runtime
4000# This is altered for AIX in order to build the export list before
4001# linking.
4002
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004003{ echo "$as_me:$LINENO: checking LINKCC" >&5
4004echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004005if test -z "$LINKCC"
4006then
4007 LINKCC='$(PURIFY) $(MAINCC)'
4008 case $ac_sys_system in
4009 AIX*)
4010 exp_extra="\"\""
4011 if test $ac_sys_release -ge 5 -o \
4012 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4013 exp_extra="."
4014 fi
4015 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004016 QNX*)
4017 # qcc must be used because the other compilers do not
4018 # support -N.
4019 LINKCC=qcc;;
4020 esac
4021fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004022{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4023echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004024
4025# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4026# make sure we default having it set to "no": this is used by
4027# distutils.unixccompiler to know if it should add --enable-new-dtags
4028# to linker command lines, and failing to detect GNU ld simply results
4029# in the same bahaviour as before.
4030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004031{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4032echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004033ac_prog=ld
4034if test "$GCC" = yes; then
4035 ac_prog=`$CC -print-prog-name=ld`
4036fi
4037case `"$ac_prog" -V 2>&1 < /dev/null` in
4038 *GNU*)
4039 GNULD=yes;;
4040 *)
4041 GNULD=no;;
4042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004043{ echo "$as_me:$LINENO: result: $GNULD" >&5
4044echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004046{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4047echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004048# Check whether --enable-shared was given.
4049if test "${enable_shared+set}" = set; then
4050 enableval=$enable_shared;
4051fi
4052
4053
4054if test -z "$enable_shared"
4055then
4056 case $ac_sys_system in
4057 CYGWIN* | atheos*)
4058 enable_shared="yes";;
4059 *)
4060 enable_shared="no";;
4061 esac
4062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004063{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4064echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004065
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004066{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4067echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004068# Check whether --enable-profiling was given.
4069if test "${enable_profiling+set}" = set; then
4070 enableval=$enable_profiling; ac_save_cc="$CC"
4071 CC="$CC -pg"
4072 if test "$cross_compiling" = yes; then
4073 ac_enable_profiling="no"
4074else
4075 cat >conftest.$ac_ext <<_ACEOF
4076/* confdefs.h. */
4077_ACEOF
4078cat confdefs.h >>conftest.$ac_ext
4079cat >>conftest.$ac_ext <<_ACEOF
4080/* end confdefs.h. */
4081int main() { return 0; }
4082_ACEOF
4083rm -f conftest$ac_exeext
4084if { (ac_try="$ac_link"
4085case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004090 (eval "$ac_link") 2>&5
4091 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4094 { (case "(($ac_try" in
4095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096 *) ac_try_echo=$ac_try;;
4097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004099 (eval "$ac_try") 2>&5
4100 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102 (exit $ac_status); }; }; then
4103 ac_enable_profiling="yes"
4104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004105 echo "$as_me: program exited with status $ac_status" >&5
4106echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004107sed 's/^/| /' conftest.$ac_ext >&5
4108
4109( exit $ac_status )
4110ac_enable_profiling="no"
4111fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4113fi
4114
4115
4116 CC="$ac_save_cc"
4117fi
4118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004119{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4120echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004121
4122case "$ac_enable_profiling" in
4123 "yes")
4124 BASECFLAGS="-pg $BASECFLAGS"
4125 LDFLAGS="-pg $LDFLAGS"
4126 ;;
4127esac
4128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004129{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4130echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004131
4132# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4133# library that we build, but we do not want to link against it (we
4134# will find it with a -framework option). For this reason there is an
4135# extra variable BLDLIBRARY against which Python and the extension
4136# modules are linked, BLDLIBRARY. This is normally the same as
4137# LDLIBRARY, but empty for MacOSX framework builds.
4138if test "$enable_framework"
4139then
4140 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4141 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4142 BLDLIBRARY=''
4143else
4144 BLDLIBRARY='$(LDLIBRARY)'
4145fi
4146
4147# Other platforms follow
4148if test $enable_shared = "yes"; then
4149
4150cat >>confdefs.h <<\_ACEOF
4151#define Py_ENABLE_SHARED 1
4152_ACEOF
4153
4154 case $ac_sys_system in
4155 BeOS*)
4156 LDLIBRARY='libpython$(VERSION).so'
4157 ;;
4158 CYGWIN*)
4159 LDLIBRARY='libpython$(VERSION).dll.a'
4160 DLLLIBRARY='libpython$(VERSION).dll'
4161 ;;
4162 SunOS*)
4163 LDLIBRARY='libpython$(VERSION).so'
4164 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4165 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4166 INSTSONAME="$LDLIBRARY".$SOVERSION
4167 ;;
4168 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4169 LDLIBRARY='libpython$(VERSION).so'
4170 BLDLIBRARY='-L. -lpython$(VERSION)'
4171 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4172 case $ac_sys_system in
4173 FreeBSD*)
4174 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4175 ;;
4176 esac
4177 INSTSONAME="$LDLIBRARY".$SOVERSION
4178 ;;
4179 hp*|HP*)
4180 case `uname -m` in
4181 ia64)
4182 LDLIBRARY='libpython$(VERSION).so'
4183 ;;
4184 *)
4185 LDLIBRARY='libpython$(VERSION).sl'
4186 ;;
4187 esac
4188 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4189 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4190 ;;
4191 OSF*)
4192 LDLIBRARY='libpython$(VERSION).so'
4193 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4194 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4195 ;;
4196 atheos*)
4197 LDLIBRARY='libpython$(VERSION).so'
4198 BLDLIBRARY='-L. -lpython$(VERSION)'
4199 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4200 ;;
4201 Darwin*)
4202 LDLIBRARY='libpython$(VERSION).dylib'
4203 BLDLIBRARY='-L. -lpython$(VERSION)'
4204 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4205 ;;
4206
4207 esac
4208else # shared is disabled
4209 case $ac_sys_system in
4210 CYGWIN*)
4211 BLDLIBRARY='$(LIBRARY)'
4212 LDLIBRARY='libpython$(VERSION).dll.a'
4213 ;;
4214 esac
4215fi
4216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004217{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4218echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004219
4220if test -n "$ac_tool_prefix"; then
4221 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4222set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004223{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4224echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004225if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004226 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004227else
4228 if test -n "$RANLIB"; then
4229 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4230else
4231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4232for as_dir in $PATH
4233do
4234 IFS=$as_save_IFS
4235 test -z "$as_dir" && as_dir=.
4236 for ac_exec_ext in '' $ac_executable_extensions; do
4237 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4238 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004239 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240 break 2
4241 fi
4242done
4243done
4244IFS=$as_save_IFS
4245
4246fi
4247fi
4248RANLIB=$ac_cv_prog_RANLIB
4249if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004250 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4251echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004253 { echo "$as_me:$LINENO: result: no" >&5
4254echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004255fi
4256
4257
4258fi
4259if test -z "$ac_cv_prog_RANLIB"; then
4260 ac_ct_RANLIB=$RANLIB
4261 # Extract the first word of "ranlib", so it can be a program name with args.
4262set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004263{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004265if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004266 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267else
4268 if test -n "$ac_ct_RANLIB"; then
4269 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4270else
4271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274 IFS=$as_save_IFS
4275 test -z "$as_dir" && as_dir=.
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4278 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004280 break 2
4281 fi
4282done
4283done
4284IFS=$as_save_IFS
4285
4286fi
4287fi
4288ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4289if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004290 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4291echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004292else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004293 { echo "$as_me:$LINENO: result: no" >&5
4294echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004295fi
4296
4297 if test "x$ac_ct_RANLIB" = x; then
4298 RANLIB=":"
4299 else
4300 case $cross_compiling:$ac_tool_warned in
4301yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004302{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4303whose name does not start with the host triplet. If you think this
4304configuration is useful to you, please write to autoconf@gnu.org." >&5
4305echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4306whose name does not start with the host triplet. If you think this
4307configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004308ac_tool_warned=yes ;;
4309esac
4310 RANLIB=$ac_ct_RANLIB
4311 fi
4312else
4313 RANLIB="$ac_cv_prog_RANLIB"
4314fi
4315
4316
4317for ac_prog in ar aal
4318do
4319 # Extract the first word of "$ac_prog", so it can be a program name with args.
4320set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004321{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004323if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004324 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004325else
4326 if test -n "$AR"; then
4327 ac_cv_prog_AR="$AR" # Let the user override the test.
4328else
4329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4330for as_dir in $PATH
4331do
4332 IFS=$as_save_IFS
4333 test -z "$as_dir" && as_dir=.
4334 for ac_exec_ext in '' $ac_executable_extensions; do
4335 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4336 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004337 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004338 break 2
4339 fi
4340done
4341done
4342IFS=$as_save_IFS
4343
4344fi
4345fi
4346AR=$ac_cv_prog_AR
4347if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004348 { echo "$as_me:$LINENO: result: $AR" >&5
4349echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004351 { echo "$as_me:$LINENO: result: no" >&5
4352echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004353fi
4354
4355
4356 test -n "$AR" && break
4357done
4358test -n "$AR" || AR="ar"
4359
4360
4361# tweak ARFLAGS only if the user didn't set it on the command line
4362
4363if test -z "$ARFLAGS"
4364then
4365 ARFLAGS="rc"
4366fi
4367
4368
4369# Extract the first word of "svnversion", so it can be a program name with args.
4370set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004373if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004374 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004375else
4376 if test -n "$SVNVERSION"; then
4377 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4378else
4379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4380for as_dir in $PATH
4381do
4382 IFS=$as_save_IFS
4383 test -z "$as_dir" && as_dir=.
4384 for ac_exec_ext in '' $ac_executable_extensions; do
4385 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4386 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004388 break 2
4389 fi
4390done
4391done
4392IFS=$as_save_IFS
4393
4394 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4395fi
4396fi
4397SVNVERSION=$ac_cv_prog_SVNVERSION
4398if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004399 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4400echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004402 { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004404fi
4405
4406
4407if test $SVNVERSION = found
4408then
4409 SVNVERSION="svnversion \$(srcdir)"
4410else
4411 SVNVERSION="echo Unversioned directory"
4412fi
4413
4414case $MACHDEP in
4415bsdos*|hp*|HP*)
4416 # install -d does not work on BSDI or HP-UX
4417 if test -z "$INSTALL"
4418 then
4419 INSTALL="${srcdir}/install-sh -c"
4420 fi
4421esac
4422ac_aux_dir=
4423for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4424 if test -f "$ac_dir/install-sh"; then
4425 ac_aux_dir=$ac_dir
4426 ac_install_sh="$ac_aux_dir/install-sh -c"
4427 break
4428 elif test -f "$ac_dir/install.sh"; then
4429 ac_aux_dir=$ac_dir
4430 ac_install_sh="$ac_aux_dir/install.sh -c"
4431 break
4432 elif test -f "$ac_dir/shtool"; then
4433 ac_aux_dir=$ac_dir
4434 ac_install_sh="$ac_aux_dir/shtool install -c"
4435 break
4436 fi
4437done
4438if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004439 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4440echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004441 { (exit 1); exit 1; }; }
4442fi
4443
4444# These three variables are undocumented and unsupported,
4445# and are intended to be withdrawn in a future Autoconf release.
4446# They can cause serious problems if a builder's source tree is in a directory
4447# whose full name contains unusual characters.
4448ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4449ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4450ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4451
4452
4453# Find a good install program. We prefer a C program (faster),
4454# so one script is as good as another. But avoid the broken or
4455# incompatible versions:
4456# SysV /etc/install, /usr/sbin/install
4457# SunOS /usr/etc/install
4458# IRIX /sbin/install
4459# AIX /bin/install
4460# AmigaOS /C/install, which installs bootblocks on floppy discs
4461# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4462# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4463# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4464# OS/2's system install, which has a completely different semantic
4465# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004466{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4467echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004468if test -z "$INSTALL"; then
4469if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004470 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004471else
4472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4473for as_dir in $PATH
4474do
4475 IFS=$as_save_IFS
4476 test -z "$as_dir" && as_dir=.
4477 # Account for people who put trailing slashes in PATH elements.
4478case $as_dir/ in
4479 ./ | .// | /cC/* | \
4480 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4481 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4482 /usr/ucb/* ) ;;
4483 *)
4484 # OSF1 and SCO ODT 3.0 have their own names for install.
4485 # Don't use installbsd from OSF since it installs stuff as root
4486 # by default.
4487 for ac_prog in ginstall scoinst install; do
4488 for ac_exec_ext in '' $ac_executable_extensions; do
4489 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4490 if test $ac_prog = install &&
4491 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4492 # AIX install. It has an incompatible calling convention.
4493 :
4494 elif test $ac_prog = install &&
4495 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4496 # program-specific install script used by HP pwplus--don't use.
4497 :
4498 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004499 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4500 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004501 fi
4502 fi
4503 done
4504 done
4505 ;;
4506esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004507done
4508IFS=$as_save_IFS
4509
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004510
4511fi
4512 if test "${ac_cv_path_install+set}" = set; then
4513 INSTALL=$ac_cv_path_install
4514 else
4515 # As a last resort, use the slow shell script. Don't cache a
4516 # value for INSTALL within a source directory, because that will
4517 # break other packages using the cache if that directory is
4518 # removed, or if the value is a relative name.
4519 INSTALL=$ac_install_sh
4520 fi
4521fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004522{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4523echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004524
4525# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4526# It thinks the first close brace ends the variable substitution.
4527test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4528
4529test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4530
4531test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4532
4533
4534# Not every filesystem supports hard links
4535
4536if test -z "$LN" ; then
4537 case $ac_sys_system in
4538 BeOS*) LN="ln -s";;
4539 CYGWIN*) LN="ln -s";;
4540 atheos*) LN="ln -s";;
4541 *) LN=ln;;
4542 esac
4543fi
4544
4545# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004546{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4547echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004548
4549# Check whether --with-pydebug was given.
4550if test "${with_pydebug+set}" = set; then
4551 withval=$with_pydebug;
4552if test "$withval" != no
4553then
4554
4555cat >>confdefs.h <<\_ACEOF
4556#define Py_DEBUG 1
4557_ACEOF
4558
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004559 { echo "$as_me:$LINENO: result: yes" >&5
4560echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004561 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004562else { echo "$as_me:$LINENO: result: no" >&5
4563echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004564fi
4565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004566 { echo "$as_me:$LINENO: result: no" >&5
4567echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004568fi
4569
4570
4571# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4572# merged with this chunk of code?
4573
4574# Optimizer/debugger flags
4575# ------------------------
4576# (The following bit of code is complicated enough - please keep things
4577# indented properly. Just pretend you're editing Python code. ;-)
4578
4579# There are two parallel sets of case statements below, one that checks to
4580# see if OPT was set and one that does BASECFLAGS setting based upon
4581# compiler and platform. BASECFLAGS tweaks need to be made even if the
4582# user set OPT.
4583
4584# tweak OPT based on compiler and platform, only if the user didn't set
4585# it on the command line
4586
4587if test -z "$OPT"
4588then
4589 case $GCC in
4590 yes)
4591 if test "$CC" != 'g++' ; then
4592 STRICT_PROTO="-Wstrict-prototypes"
4593 fi
4594 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4595 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4596 WRAP="-fwrapv"
4597 fi
4598 case $ac_cv_prog_cc_g in
4599 yes)
4600 if test "$Py_DEBUG" = 'true' ; then
4601 # Optimization messes up debuggers, so turn it off for
4602 # debug builds.
4603 OPT="-g -Wall $STRICT_PROTO"
4604 else
4605 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4606 fi
4607 ;;
4608 *)
4609 OPT="-O3 -Wall $STRICT_PROTO"
4610 ;;
4611 esac
4612 case $ac_sys_system in
4613 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4614 ;;
4615 esac
4616 ;;
4617
4618 *)
4619 OPT="-O"
4620 ;;
4621 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004622fi
4623
4624
4625
4626# The -arch flags for universal builds on OSX
4627UNIVERSAL_ARCH_FLAGS=
4628
4629
4630# tweak BASECFLAGS based on compiler and platform
4631case $GCC in
4632yes)
4633 # Python violates C99 rules, by casting between incompatible
4634 # pointer types. GCC may generate bad code as a result of that,
4635 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004636 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4637echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004638 ac_save_cc="$CC"
4639 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004640 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4641 echo $ECHO_N "(cached) $ECHO_C" >&6
4642else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004643 cat >conftest.$ac_ext <<_ACEOF
4644/* confdefs.h. */
4645_ACEOF
4646cat confdefs.h >>conftest.$ac_ext
4647cat >>conftest.$ac_ext <<_ACEOF
4648/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004649
4650int
4651main ()
4652{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004654 ;
4655 return 0;
4656}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004657_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004658rm -f conftest.$ac_objext
4659if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004660case "(($ac_try" in
4661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4662 *) ac_try_echo=$ac_try;;
4663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004665 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004666 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004667 grep -v '^ *+' conftest.er1 >conftest.err
4668 rm -f conftest.er1
4669 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004671 (exit $ac_status); } && {
4672 test -z "$ac_c_werror_flag" ||
4673 test ! -s conftest.err
4674 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004675 ac_cv_no_strict_aliasing_ok=yes
4676else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004677 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004678sed 's/^/| /' conftest.$ac_ext >&5
4679
Gregory P. Smith373469a2009-11-01 21:03:38 +00004680 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681fi
4682
Gregory P. Smith373469a2009-11-01 21:03:38 +00004683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004684fi
4685
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004686 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004687 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4688echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004689 if test $ac_cv_no_strict_aliasing_ok = yes
4690 then
4691 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4692 fi
4693
4694 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4695 # support. Without this, treatment of subnormals doesn't follow
4696 # the standard.
4697 case $ac_sys_machine in
4698 alpha*)
4699 BASECFLAGS="$BASECFLAGS -mieee"
4700 ;;
4701 esac
4702
4703 case $ac_sys_system in
4704 SCO_SV*)
4705 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4706 ;;
4707 # is there any other compiler on Darwin besides gcc?
4708 Darwin*)
4709 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4710 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004711 if test "${CC}" = gcc
4712 then
4713 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4714echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4715 case "${UNIVERSALSDK}" in
4716 */MacOSX10.4u.sdk)
4717 # Build using 10.4 SDK, force usage of gcc when the
4718 # compiler is gcc, otherwise the user will get very
4719 # confusing error messages when building on OSX 10.6
4720 CC=gcc-4.0
4721 CPP=cpp-4.0
4722 ;;
4723 esac
4724 { echo "$as_me:$LINENO: result: $CC" >&5
4725echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004726 fi
4727
4728 # Calculate the right deployment target for this build.
4729 #
4730 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4731 if test ${cur_target} '>' 10.2; then
4732 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004733 if test ${enable_universalsdk}; then
4734 if test "${UNIVERSAL_ARCHS}" = "all"; then
4735 # Ensure that the default platform for a
4736 # 4-way universal build is OSX 10.5,
4737 # that's the first OS release where
4738 # 4-way builds make sense.
4739 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004740
4741 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4742 cur_target='10.5'
4743
4744 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4745 cur_target='10.5'
4746
4747 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4748 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004749 fi
4750 else
4751 if test `arch` = "i386"; then
4752 # On Intel macs default to a deployment
4753 # target of 10.4, that's the first OSX
4754 # release with Intel support.
4755 cur_target="10.4"
4756 fi
4757 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004758 fi
4759 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4760
4761 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4762 # environment with a value that is the same as what we'll use
4763 # in the Makefile to ensure that we'll get the same compiler
4764 # environment during configure and build time.
4765 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4766 export MACOSX_DEPLOYMENT_TARGET
4767 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4768
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004769 if test "${enable_universalsdk}"; then
4770 UNIVERSAL_ARCH_FLAGS=""
4771 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4772 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4773 ARCH_RUN_32BIT=""
4774 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4775
4776
4777 # You have to use different flags on various versions of
4778 # OSX to extract PPC code from an universal binary, basically
4779 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4780 # newer.
4781 # Because '-arch pp7400' works on OSX 10.5 or higher this
4782 # test is only present in the '32-bit' branch, all other
4783 # branches require OSX 10.5 to compile.
4784
4785 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4786echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4787 FN="test.$$"
4788 cat >${FN}.c <<-EOF
4789 int main() { return 0; }
4790EOF
4791 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4792 if test $? != 0 ; then
4793 rm ${FN} ${FN}.c
4794 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4795echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4796 else
4797 lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
4798 if test $? != 0 ; then
4799 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4800 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4801echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4802 else
4803 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4804echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4805 fi
4806 rm -f ${FN} ${FN}.c ${FN}.out
4807 fi
4808
4809 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4810 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4811 LIPO_32BIT_FLAGS=""
4812 ARCH_RUN_32BIT="true"
4813
4814 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4815 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4816 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004817 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004818
4819 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4820 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4821 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004822 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004823
4824 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4825 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -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 -ppc7400"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004828
4829 else
4830 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4831echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4832 { (exit 1); exit 1; }; }
4833
4834 fi
4835
4836
4837 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4838 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4839 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4840 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4841 CPPFLAGS="-isysroot ${UNIVERSALSDK}"
4842 fi
4843
4844 fi
4845
4846
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004847 ;;
4848 OSF*)
4849 BASECFLAGS="$BASECFLAGS -mieee"
4850 ;;
4851 esac
4852 ;;
4853
4854*)
4855 case $ac_sys_system in
4856 OpenUNIX*|UnixWare*)
4857 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4858 ;;
4859 OSF*)
4860 BASECFLAGS="$BASECFLAGS -ieee -std"
4861 ;;
4862 SCO_SV*)
4863 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4864 ;;
4865 esac
4866 ;;
4867esac
4868
4869if test "$Py_DEBUG" = 'true'; then
4870 :
4871else
4872 OPT="-DNDEBUG $OPT"
4873fi
4874
4875if test "$ac_arch_flags"
4876then
4877 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4878fi
4879
4880# disable check for icc since it seems to pass, but generates a warning
4881if test "$CC" = icc
4882then
4883 ac_cv_opt_olimit_ok=no
4884fi
4885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004886{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4887echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004889 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004890else
4891 ac_save_cc="$CC"
4892CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004893cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004894/* confdefs.h. */
4895_ACEOF
4896cat confdefs.h >>conftest.$ac_ext
4897cat >>conftest.$ac_ext <<_ACEOF
4898/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004899
4900int
4901main ()
4902{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004903int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004904 ;
4905 return 0;
4906}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004908rm -f conftest.$ac_objext
4909if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910case "(($ac_try" in
4911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4912 *) ac_try_echo=$ac_try;;
4913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004915 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004917 grep -v '^ *+' conftest.er1 >conftest.err
4918 rm -f conftest.er1
4919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004921 (exit $ac_status); } && {
4922 test -z "$ac_c_werror_flag" ||
4923 test ! -s conftest.err
4924 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004925 ac_cv_opt_olimit_ok=yes
4926else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004927 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004928sed 's/^/| /' conftest.$ac_ext >&5
4929
Gregory P. Smith373469a2009-11-01 21:03:38 +00004930 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004931fi
4932
Gregory P. Smith373469a2009-11-01 21:03:38 +00004933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004934CC="$ac_save_cc"
4935fi
4936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004937{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4938echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939if test $ac_cv_opt_olimit_ok = yes; then
4940 case $ac_sys_system in
4941 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4942 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4943 # environment?
4944 Darwin*)
4945 ;;
4946 *)
4947 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4948 ;;
4949 esac
4950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004951 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4952echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004953 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004954 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004955else
4956 ac_save_cc="$CC"
4957 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004958 cat >conftest.$ac_ext <<_ACEOF
4959/* confdefs.h. */
4960_ACEOF
4961cat confdefs.h >>conftest.$ac_ext
4962cat >>conftest.$ac_ext <<_ACEOF
4963/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004964
4965int
4966main ()
4967{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004968int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004969 ;
4970 return 0;
4971}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004973rm -f conftest.$ac_objext
4974if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004975case "(($ac_try" in
4976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4977 *) ac_try_echo=$ac_try;;
4978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004980 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004982 grep -v '^ *+' conftest.er1 >conftest.err
4983 rm -f conftest.er1
4984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004986 (exit $ac_status); } && {
4987 test -z "$ac_c_werror_flag" ||
4988 test ! -s conftest.err
4989 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004990 ac_cv_olimit_ok=yes
4991else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004992 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
Gregory P. Smith373469a2009-11-01 21:03:38 +00004995 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004996fi
4997
Gregory P. Smith373469a2009-11-01 21:03:38 +00004998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999 CC="$ac_save_cc"
5000fi
5001
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005002 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5003echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005004 if test $ac_cv_olimit_ok = yes; then
5005 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5006 fi
5007fi
5008
5009# Check whether GCC supports PyArg_ParseTuple format
5010if test "$GCC" = "yes"
5011then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005012 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5013echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014 save_CFLAGS=$CFLAGS
5015 CFLAGS="$CFLAGS -Werror"
5016 cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h. */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h. */
5022
5023 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5024
5025int
5026main ()
5027{
5028
5029 ;
5030 return 0;
5031}
5032_ACEOF
5033rm -f conftest.$ac_objext
5034if { (ac_try="$ac_compile"
5035case "(($ac_try" in
5036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037 *) ac_try_echo=$ac_try;;
5038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005040 (eval "$ac_compile") 2>conftest.er1
5041 ac_status=$?
5042 grep -v '^ *+' conftest.er1 >conftest.err
5043 rm -f conftest.er1
5044 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046 (exit $ac_status); } && {
5047 test -z "$ac_c_werror_flag" ||
5048 test ! -s conftest.err
5049 } && test -s conftest.$ac_objext; then
5050
5051cat >>confdefs.h <<\_ACEOF
5052#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5053_ACEOF
5054
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005055 { echo "$as_me:$LINENO: result: yes" >&5
5056echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005058 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005059sed 's/^/| /' conftest.$ac_ext >&5
5060
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005061 { echo "$as_me:$LINENO: result: no" >&5
5062echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005063
5064fi
5065
5066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5067 CFLAGS=$save_CFLAGS
5068fi
5069
5070# On some compilers, pthreads are available without further options
5071# (e.g. MacOS X). On some of these systems, the compiler will not
5072# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5073# So we have to see first whether pthreads are available without
5074# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005075{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5076echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005077if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005078 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005079else
5080 if test "$cross_compiling" = yes; then
5081 ac_cv_pthread_is_default=no
5082else
5083 cat >conftest.$ac_ext <<_ACEOF
5084/* confdefs.h. */
5085_ACEOF
5086cat confdefs.h >>conftest.$ac_ext
5087cat >>conftest.$ac_ext <<_ACEOF
5088/* end confdefs.h. */
5089
5090#include <pthread.h>
5091
5092void* routine(void* p){return NULL;}
5093
5094int main(){
5095 pthread_t p;
5096 if(pthread_create(&p,NULL,routine,NULL)!=0)
5097 return 1;
5098 (void)pthread_detach(p);
5099 return 0;
5100}
5101
5102_ACEOF
5103rm -f conftest$ac_exeext
5104if { (ac_try="$ac_link"
5105case "(($ac_try" in
5106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5107 *) ac_try_echo=$ac_try;;
5108esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005110 (eval "$ac_link") 2>&5
5111 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5114 { (case "(($ac_try" in
5115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116 *) ac_try_echo=$ac_try;;
5117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119 (eval "$ac_try") 2>&5
5120 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122 (exit $ac_status); }; }; then
5123
5124 ac_cv_pthread_is_default=yes
5125 ac_cv_kthread=no
5126 ac_cv_pthread=no
5127
5128else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005129 echo "$as_me: program exited with status $ac_status" >&5
5130echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005131sed 's/^/| /' conftest.$ac_ext >&5
5132
5133( exit $ac_status )
5134ac_cv_pthread_is_default=no
5135fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5137fi
5138
5139
5140
5141fi
5142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005143{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5144echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005145
5146
5147if test $ac_cv_pthread_is_default = yes
5148then
5149 ac_cv_kpthread=no
5150else
5151# -Kpthread, if available, provides the right #defines
5152# and linker options to make pthread_create available
5153# Some compilers won't report that they do not support -Kpthread,
5154# so we need to run a program to see whether it really made the
5155# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005156{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5157echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005158if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005159 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005160else
5161 ac_save_cc="$CC"
5162CC="$CC -Kpthread"
5163if test "$cross_compiling" = yes; then
5164 ac_cv_kpthread=no
5165else
5166 cat >conftest.$ac_ext <<_ACEOF
5167/* confdefs.h. */
5168_ACEOF
5169cat confdefs.h >>conftest.$ac_ext
5170cat >>conftest.$ac_ext <<_ACEOF
5171/* end confdefs.h. */
5172
5173#include <pthread.h>
5174
5175void* routine(void* p){return NULL;}
5176
5177int main(){
5178 pthread_t p;
5179 if(pthread_create(&p,NULL,routine,NULL)!=0)
5180 return 1;
5181 (void)pthread_detach(p);
5182 return 0;
5183}
5184
5185_ACEOF
5186rm -f conftest$ac_exeext
5187if { (ac_try="$ac_link"
5188case "(($ac_try" in
5189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5190 *) ac_try_echo=$ac_try;;
5191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193 (eval "$ac_link") 2>&5
5194 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5197 { (case "(($ac_try" in
5198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5199 *) ac_try_echo=$ac_try;;
5200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005202 (eval "$ac_try") 2>&5
5203 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205 (exit $ac_status); }; }; then
5206 ac_cv_kpthread=yes
5207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005208 echo "$as_me: program exited with status $ac_status" >&5
5209echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210sed 's/^/| /' conftest.$ac_ext >&5
5211
5212( exit $ac_status )
5213ac_cv_kpthread=no
5214fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5216fi
5217
5218
5219CC="$ac_save_cc"
5220fi
5221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005222{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5223echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224fi
5225
5226if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5227then
5228# -Kthread, if available, provides the right #defines
5229# and linker options to make pthread_create available
5230# Some compilers won't report that they do not support -Kthread,
5231# so we need to run a program to see whether it really made the
5232# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005233{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5234echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005235if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005236 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237else
5238 ac_save_cc="$CC"
5239CC="$CC -Kthread"
5240if test "$cross_compiling" = yes; then
5241 ac_cv_kthread=no
5242else
5243 cat >conftest.$ac_ext <<_ACEOF
5244/* confdefs.h. */
5245_ACEOF
5246cat confdefs.h >>conftest.$ac_ext
5247cat >>conftest.$ac_ext <<_ACEOF
5248/* end confdefs.h. */
5249
5250#include <pthread.h>
5251
5252void* routine(void* p){return NULL;}
5253
5254int main(){
5255 pthread_t p;
5256 if(pthread_create(&p,NULL,routine,NULL)!=0)
5257 return 1;
5258 (void)pthread_detach(p);
5259 return 0;
5260}
5261
5262_ACEOF
5263rm -f conftest$ac_exeext
5264if { (ac_try="$ac_link"
5265case "(($ac_try" in
5266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5267 *) ac_try_echo=$ac_try;;
5268esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270 (eval "$ac_link") 2>&5
5271 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5274 { (case "(($ac_try" in
5275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5276 *) ac_try_echo=$ac_try;;
5277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005279 (eval "$ac_try") 2>&5
5280 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005282 (exit $ac_status); }; }; then
5283 ac_cv_kthread=yes
5284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005285 echo "$as_me: program exited with status $ac_status" >&5
5286echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005287sed 's/^/| /' conftest.$ac_ext >&5
5288
5289( exit $ac_status )
5290ac_cv_kthread=no
5291fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5293fi
5294
5295
5296CC="$ac_save_cc"
5297fi
5298
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005299{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5300echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301fi
5302
5303if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5304then
5305# -pthread, if available, provides the right #defines
5306# and linker options to make pthread_create available
5307# Some compilers won't report that they do not support -pthread,
5308# so we need to run a program to see whether it really made the
5309# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005310{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5311echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005313 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005314else
5315 ac_save_cc="$CC"
5316CC="$CC -pthread"
5317if test "$cross_compiling" = yes; then
5318 ac_cv_pthread=no
5319else
5320 cat >conftest.$ac_ext <<_ACEOF
5321/* confdefs.h. */
5322_ACEOF
5323cat confdefs.h >>conftest.$ac_ext
5324cat >>conftest.$ac_ext <<_ACEOF
5325/* end confdefs.h. */
5326
5327#include <pthread.h>
5328
5329void* routine(void* p){return NULL;}
5330
5331int main(){
5332 pthread_t p;
5333 if(pthread_create(&p,NULL,routine,NULL)!=0)
5334 return 1;
5335 (void)pthread_detach(p);
5336 return 0;
5337}
5338
5339_ACEOF
5340rm -f conftest$ac_exeext
5341if { (ac_try="$ac_link"
5342case "(($ac_try" in
5343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5344 *) ac_try_echo=$ac_try;;
5345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347 (eval "$ac_link") 2>&5
5348 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5351 { (case "(($ac_try" in
5352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5353 *) ac_try_echo=$ac_try;;
5354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005356 (eval "$ac_try") 2>&5
5357 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005359 (exit $ac_status); }; }; then
5360 ac_cv_pthread=yes
5361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005362 echo "$as_me: program exited with status $ac_status" >&5
5363echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005364sed 's/^/| /' conftest.$ac_ext >&5
5365
5366( exit $ac_status )
5367ac_cv_pthread=no
5368fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5370fi
5371
5372
5373CC="$ac_save_cc"
5374fi
5375
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005376{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5377echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378fi
5379
5380# If we have set a CC compiler flag for thread support then
5381# check if it works for CXX, too.
5382ac_cv_cxx_thread=no
5383if test ! -z "$CXX"
5384then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005385{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5386echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387ac_save_cxx="$CXX"
5388
5389if test "$ac_cv_kpthread" = "yes"
5390then
5391 CXX="$CXX -Kpthread"
5392 ac_cv_cxx_thread=yes
5393elif test "$ac_cv_kthread" = "yes"
5394then
5395 CXX="$CXX -Kthread"
5396 ac_cv_cxx_thread=yes
5397elif test "$ac_cv_pthread" = "yes"
5398then
5399 CXX="$CXX -pthread"
5400 ac_cv_cxx_thread=yes
5401fi
5402
5403if test $ac_cv_cxx_thread = yes
5404then
5405 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5406 $CXX -c conftest.$ac_ext 2>&5
5407 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5408 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5409 then
5410 ac_cv_cxx_thread=yes
5411 else
5412 ac_cv_cxx_thread=no
5413 fi
5414 rm -fr conftest*
5415fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005416{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5417echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418fi
5419CXX="$ac_save_cxx"
5420
5421
5422# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005423{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5424echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005426 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427else
5428 cat >conftest.$ac_ext <<_ACEOF
5429/* confdefs.h. */
5430_ACEOF
5431cat confdefs.h >>conftest.$ac_ext
5432cat >>conftest.$ac_ext <<_ACEOF
5433/* end confdefs.h. */
5434#include <stdlib.h>
5435#include <stdarg.h>
5436#include <string.h>
5437#include <float.h>
5438
5439int
5440main ()
5441{
5442
5443 ;
5444 return 0;
5445}
5446_ACEOF
5447rm -f conftest.$ac_objext
5448if { (ac_try="$ac_compile"
5449case "(($ac_try" in
5450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5451 *) ac_try_echo=$ac_try;;
5452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454 (eval "$ac_compile") 2>conftest.er1
5455 ac_status=$?
5456 grep -v '^ *+' conftest.er1 >conftest.err
5457 rm -f conftest.er1
5458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460 (exit $ac_status); } && {
5461 test -z "$ac_c_werror_flag" ||
5462 test ! -s conftest.err
5463 } && test -s conftest.$ac_objext; then
5464 ac_cv_header_stdc=yes
5465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005466 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005467sed 's/^/| /' conftest.$ac_ext >&5
5468
5469 ac_cv_header_stdc=no
5470fi
5471
5472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473
5474if test $ac_cv_header_stdc = yes; then
5475 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5476 cat >conftest.$ac_ext <<_ACEOF
5477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
5482#include <string.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "memchr" >/dev/null 2>&1; then
5487 :
5488else
5489 ac_cv_header_stdc=no
5490fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005491rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5497 cat >conftest.$ac_ext <<_ACEOF
5498/* confdefs.h. */
5499_ACEOF
5500cat confdefs.h >>conftest.$ac_ext
5501cat >>conftest.$ac_ext <<_ACEOF
5502/* end confdefs.h. */
5503#include <stdlib.h>
5504
5505_ACEOF
5506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5507 $EGREP "free" >/dev/null 2>&1; then
5508 :
5509else
5510 ac_cv_header_stdc=no
5511fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005512rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005513
5514fi
5515
5516if test $ac_cv_header_stdc = yes; then
5517 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5518 if test "$cross_compiling" = yes; then
5519 :
5520else
5521 cat >conftest.$ac_ext <<_ACEOF
5522/* confdefs.h. */
5523_ACEOF
5524cat confdefs.h >>conftest.$ac_ext
5525cat >>conftest.$ac_ext <<_ACEOF
5526/* end confdefs.h. */
5527#include <ctype.h>
5528#include <stdlib.h>
5529#if ((' ' & 0x0FF) == 0x020)
5530# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5531# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5532#else
5533# define ISLOWER(c) \
5534 (('a' <= (c) && (c) <= 'i') \
5535 || ('j' <= (c) && (c) <= 'r') \
5536 || ('s' <= (c) && (c) <= 'z'))
5537# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5538#endif
5539
5540#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5541int
5542main ()
5543{
5544 int i;
5545 for (i = 0; i < 256; i++)
5546 if (XOR (islower (i), ISLOWER (i))
5547 || toupper (i) != TOUPPER (i))
5548 return 2;
5549 return 0;
5550}
5551_ACEOF
5552rm -f conftest$ac_exeext
5553if { (ac_try="$ac_link"
5554case "(($ac_try" in
5555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5556 *) ac_try_echo=$ac_try;;
5557esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559 (eval "$ac_link") 2>&5
5560 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5563 { (case "(($ac_try" in
5564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5565 *) ac_try_echo=$ac_try;;
5566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005568 (eval "$ac_try") 2>&5
5569 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005571 (exit $ac_status); }; }; then
5572 :
5573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005574 echo "$as_me: program exited with status $ac_status" >&5
5575echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576sed 's/^/| /' conftest.$ac_ext >&5
5577
5578( exit $ac_status )
5579ac_cv_header_stdc=no
5580fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5582fi
5583
5584
5585fi
5586fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005587{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5588echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005589if test $ac_cv_header_stdc = yes; then
5590
5591cat >>confdefs.h <<\_ACEOF
5592#define STDC_HEADERS 1
5593_ACEOF
5594
5595fi
5596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005597# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5608 inttypes.h stdint.h unistd.h
5609do
5610as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5611{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5612echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5613if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5614 echo $ECHO_N "(cached) $ECHO_C" >&6
5615else
5616 cat >conftest.$ac_ext <<_ACEOF
5617/* confdefs.h. */
5618_ACEOF
5619cat confdefs.h >>conftest.$ac_ext
5620cat >>conftest.$ac_ext <<_ACEOF
5621/* end confdefs.h. */
5622$ac_includes_default
5623
5624#include <$ac_header>
5625_ACEOF
5626rm -f conftest.$ac_objext
5627if { (ac_try="$ac_compile"
5628case "(($ac_try" in
5629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5630 *) ac_try_echo=$ac_try;;
5631esac
5632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5633 (eval "$ac_compile") 2>conftest.er1
5634 ac_status=$?
5635 grep -v '^ *+' conftest.er1 >conftest.err
5636 rm -f conftest.er1
5637 cat conftest.err >&5
5638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5639 (exit $ac_status); } && {
5640 test -z "$ac_c_werror_flag" ||
5641 test ! -s conftest.err
5642 } && test -s conftest.$ac_objext; then
5643 eval "$as_ac_Header=yes"
5644else
5645 echo "$as_me: failed program was:" >&5
5646sed 's/^/| /' conftest.$ac_ext >&5
5647
5648 eval "$as_ac_Header=no"
5649fi
5650
5651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5652fi
5653ac_res=`eval echo '${'$as_ac_Header'}'`
5654 { echo "$as_me:$LINENO: result: $ac_res" >&5
5655echo "${ECHO_T}$ac_res" >&6; }
5656if test `eval echo '${'$as_ac_Header'}'` = yes; then
5657 cat >>confdefs.h <<_ACEOF
5658#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5659_ACEOF
5660
5661fi
5662
5663done
5664
5665
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005666
Martin v. Löwis11437992002-04-12 09:54:03 +00005667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
Anthony Baxter8a560de2004-10-13 15:30:56 +00005702
Martin v. Löwisc3001752005-01-23 09:27:24 +00005703
Martin v. Löwis11017b12006-01-14 18:12:57 +00005704
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005705
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005706
5707
5708
5709
5710
5711
5712
5713
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005714
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005715
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005716
5717
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005718
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005719
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005720
5721
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005722for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5723fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005724ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005725shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005726unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005727sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5728sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005729sys/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 +00005730sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005731sys/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 +00005732sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005733bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005734do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005735as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005736if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005737 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5738echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005739if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005741fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005742ac_res=`eval echo '${'$as_ac_Header'}'`
5743 { echo "$as_me:$LINENO: result: $ac_res" >&5
5744echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745else
Martin v. Löwis11437992002-04-12 09:54:03 +00005746 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5748echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005750/* confdefs.h. */
5751_ACEOF
5752cat confdefs.h >>conftest.$ac_ext
5753cat >>conftest.$ac_ext <<_ACEOF
5754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005755$ac_includes_default
5756#include <$ac_header>
5757_ACEOF
5758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759if { (ac_try="$ac_compile"
5760case "(($ac_try" in
5761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5762 *) ac_try_echo=$ac_try;;
5763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005767 grep -v '^ *+' conftest.er1 >conftest.err
5768 rm -f conftest.er1
5769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 (exit $ac_status); } && {
5772 test -z "$ac_c_werror_flag" ||
5773 test ! -s conftest.err
5774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005775 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005778sed 's/^/| /' conftest.$ac_ext >&5
5779
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005782
5783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005784{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5785echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005786
5787# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005788{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5789echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005791/* confdefs.h. */
5792_ACEOF
5793cat confdefs.h >>conftest.$ac_ext
5794cat >>conftest.$ac_ext <<_ACEOF
5795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005796#include <$ac_header>
5797_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798if { (ac_try="$ac_cpp conftest.$ac_ext"
5799case "(($ac_try" in
5800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5801 *) ac_try_echo=$ac_try;;
5802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005805 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005806 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005807 rm -f conftest.er1
5808 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810 (exit $ac_status); } >/dev/null && {
5811 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5812 test ! -s conftest.err
5813 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005814 ac_header_preproc=yes
5815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005817sed 's/^/| /' conftest.$ac_ext >&5
5818
Martin v. Löwis11437992002-04-12 09:54:03 +00005819 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005821
Martin v. Löwis11437992002-04-12 09:54:03 +00005822rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005823{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5824echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005825
5826# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005827case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5828 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005829 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5830echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5831 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5832echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005833 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005834 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005835 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005836 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5837echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5838 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5839echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5840 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5841echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5842 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5843echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5844 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5845echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5846 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5847echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005848 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005849## -------------------------------------- ##
5850## Report this to http://bugs.python.org/ ##
5851## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005852_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005854 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005856{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5857echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005858if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005859 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005860else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005861 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005862fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005863ac_res=`eval echo '${'$as_ac_Header'}'`
5864 { echo "$as_me:$LINENO: result: $ac_res" >&5
5865echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005866
5867fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005868if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005870#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005871_ACEOF
5872
5873fi
5874
Guido van Rossum627b2d71993-12-24 10:39:16 +00005875done
5876
Martin v. Löwis11437992002-04-12 09:54:03 +00005877
5878
5879
5880
5881
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005883for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005884 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5885{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5886echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005889else
Martin v. Löwis11437992002-04-12 09:54:03 +00005890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005891/* confdefs.h. */
5892_ACEOF
5893cat confdefs.h >>conftest.$ac_ext
5894cat >>conftest.$ac_ext <<_ACEOF
5895/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005896#include <sys/types.h>
5897#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005898
Martin v. Löwis11437992002-04-12 09:54:03 +00005899int
5900main ()
5901{
5902if ((DIR *) 0)
5903return 0;
5904 ;
5905 return 0;
5906}
5907_ACEOF
5908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909if { (ac_try="$ac_compile"
5910case "(($ac_try" in
5911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5912 *) ac_try_echo=$ac_try;;
5913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005917 grep -v '^ *+' conftest.er1 >conftest.err
5918 rm -f conftest.er1
5919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921 (exit $ac_status); } && {
5922 test -z "$ac_c_werror_flag" ||
5923 test ! -s conftest.err
5924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005925 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005928sed 's/^/| /' conftest.$ac_ext >&5
5929
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932
5933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005935ac_res=`eval echo '${'$as_ac_Header'}'`
5936 { echo "$as_me:$LINENO: result: $ac_res" >&5
5937echo "${ECHO_T}$ac_res" >&6; }
5938if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005939 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005940#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005941_ACEOF
5942
5943ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946done
5947# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5948if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005949 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5950echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005951if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953else
Martin v. Löwis11437992002-04-12 09:54:03 +00005954 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005956/* confdefs.h. */
5957_ACEOF
5958cat confdefs.h >>conftest.$ac_ext
5959cat >>conftest.$ac_ext <<_ACEOF
5960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005961
Martin v. Löwiseba40652007-08-30 20:10:57 +00005962/* Override any GCC internal prototype to avoid an error.
5963 Use char because int might match the return type of a GCC
5964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005965#ifdef __cplusplus
5966extern "C"
5967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005968char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005969int
5970main ()
5971{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005972return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005973 ;
5974 return 0;
5975}
5976_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005977for ac_lib in '' dir; do
5978 if test -z "$ac_lib"; then
5979 ac_res="none required"
5980 else
5981 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005982 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983 fi
5984 rm -f conftest.$ac_objext conftest$ac_exeext
5985if { (ac_try="$ac_link"
5986case "(($ac_try" in
5987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5988 *) ac_try_echo=$ac_try;;
5989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005992 ac_status=$?
5993 grep -v '^ *+' conftest.er1 >conftest.err
5994 rm -f conftest.er1
5995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997 (exit $ac_status); } && {
5998 test -z "$ac_c_werror_flag" ||
5999 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006000 } && test -s conftest$ac_exeext &&
6001 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006002 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006004 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006005sed 's/^/| /' conftest.$ac_ext >&5
6006
Martin v. Löwiseba40652007-08-30 20:10:57 +00006007
Brett Cannon19fab762007-06-02 03:02:29 +00006008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009
6010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6011 conftest$ac_exeext
6012 if test "${ac_cv_search_opendir+set}" = set; then
6013 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006015done
6016if test "${ac_cv_search_opendir+set}" = set; then
6017 :
6018else
6019 ac_cv_search_opendir=no
6020fi
6021rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006022LIBS=$ac_func_search_save_LIBS
6023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006024{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6025echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006026ac_res=$ac_cv_search_opendir
6027if test "$ac_res" != no; then
6028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Michael W. Hudson54241132001-12-07 15:38:26 +00006032else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006033 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6034echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006035if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006037else
6038 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006045
Martin v. Löwiseba40652007-08-30 20:10:57 +00006046/* Override any GCC internal prototype to avoid an error.
6047 Use char because int might match the return type of a GCC
6048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006049#ifdef __cplusplus
6050extern "C"
6051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006052char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006053int
6054main ()
6055{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006056return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006057 ;
6058 return 0;
6059}
6060_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061for ac_lib in '' x; do
6062 if test -z "$ac_lib"; then
6063 ac_res="none required"
6064 else
6065 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006066 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067 fi
6068 rm -f conftest.$ac_objext conftest$ac_exeext
6069if { (ac_try="$ac_link"
6070case "(($ac_try" in
6071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6072 *) ac_try_echo=$ac_try;;
6073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006076 ac_status=$?
6077 grep -v '^ *+' conftest.er1 >conftest.err
6078 rm -f conftest.er1
6079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006081 (exit $ac_status); } && {
6082 test -z "$ac_c_werror_flag" ||
6083 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006084 } && test -s conftest$ac_exeext &&
6085 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006088 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006089sed 's/^/| /' conftest.$ac_ext >&5
6090
Martin v. Löwiseba40652007-08-30 20:10:57 +00006091
Brett Cannon19fab762007-06-02 03:02:29 +00006092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093
6094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6095 conftest$ac_exeext
6096 if test "${ac_cv_search_opendir+set}" = set; then
6097 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006099done
6100if test "${ac_cv_search_opendir+set}" = set; then
6101 :
6102else
6103 ac_cv_search_opendir=no
6104fi
6105rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006106LIBS=$ac_func_search_save_LIBS
6107fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006108{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6109echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110ac_res=$ac_cv_search_opendir
6111if test "$ac_res" != no; then
6112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006114fi
6115
6116fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006117
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006118{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6119echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006121 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122else
6123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006124/* confdefs.h. */
6125_ACEOF
6126cat confdefs.h >>conftest.$ac_ext
6127cat >>conftest.$ac_ext <<_ACEOF
6128/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130int
6131main ()
6132{
6133return makedev(0, 0);
6134 ;
6135 return 0;
6136}
6137_ACEOF
6138rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139if { (ac_try="$ac_link"
6140case "(($ac_try" in
6141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6142 *) ac_try_echo=$ac_try;;
6143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006147 grep -v '^ *+' conftest.er1 >conftest.err
6148 rm -f conftest.er1
6149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151 (exit $ac_status); } && {
6152 test -z "$ac_c_werror_flag" ||
6153 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006154 } && test -s conftest$ac_exeext &&
6155 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156 ac_cv_header_sys_types_h_makedev=yes
6157else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006159sed 's/^/| /' conftest.$ac_ext >&5
6160
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163
6164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166
6167fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170
6171if test $ac_cv_header_sys_types_h_makedev = no; then
6172if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006173 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6174echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006178{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6179echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180else
6181 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6183echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* confdefs.h. */
6186_ACEOF
6187cat confdefs.h >>conftest.$ac_ext
6188cat >>conftest.$ac_ext <<_ACEOF
6189/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190$ac_includes_default
6191#include <sys/mkdev.h>
6192_ACEOF
6193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006194if { (ac_try="$ac_compile"
6195case "(($ac_try" in
6196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6197 *) ac_try_echo=$ac_try;;
6198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006202 grep -v '^ *+' conftest.er1 >conftest.err
6203 rm -f conftest.er1
6204 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206 (exit $ac_status); } && {
6207 test -z "$ac_c_werror_flag" ||
6208 test ! -s conftest.err
6209 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210 ac_header_compiler=yes
6211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006213sed 's/^/| /' conftest.$ac_ext >&5
6214
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217
6218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006219{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6220echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006223{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6224echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006226/* confdefs.h. */
6227_ACEOF
6228cat confdefs.h >>conftest.$ac_ext
6229cat >>conftest.$ac_ext <<_ACEOF
6230/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231#include <sys/mkdev.h>
6232_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006233if { (ac_try="$ac_cpp conftest.$ac_ext"
6234case "(($ac_try" in
6235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6236 *) ac_try_echo=$ac_try;;
6237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006241 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242 rm -f conftest.er1
6243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006245 (exit $ac_status); } >/dev/null && {
6246 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6247 test ! -s conftest.err
6248 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249 ac_header_preproc=yes
6250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006252sed 's/^/| /' conftest.$ac_ext >&5
6253
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254 ac_header_preproc=no
6255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006258{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6259echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260
6261# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006262case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6263 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006264 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6265echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6266 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6267echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006269 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006270 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006271 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6272echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6273 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6274echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6275 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6276echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6277 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6278echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6279 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6280echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6281 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6282echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006283 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006284## -------------------------------------- ##
6285## Report this to http://bugs.python.org/ ##
6286## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006287_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006289 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006291{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6292echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006294 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295else
6296 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6297fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006298{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6299echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300
6301fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303
6304cat >>confdefs.h <<\_ACEOF
6305#define MAJOR_IN_MKDEV 1
6306_ACEOF
6307
6308fi
6309
6310
6311
6312 if test $ac_cv_header_sys_mkdev_h = no; then
6313 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006314 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6315echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006317 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006319{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6320echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321else
6322 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6324echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006326/* confdefs.h. */
6327_ACEOF
6328cat confdefs.h >>conftest.$ac_ext
6329cat >>conftest.$ac_ext <<_ACEOF
6330/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331$ac_includes_default
6332#include <sys/sysmacros.h>
6333_ACEOF
6334rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335if { (ac_try="$ac_compile"
6336case "(($ac_try" in
6337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6338 *) ac_try_echo=$ac_try;;
6339esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006343 grep -v '^ *+' conftest.er1 >conftest.err
6344 rm -f conftest.er1
6345 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 (exit $ac_status); } && {
6348 test -z "$ac_c_werror_flag" ||
6349 test ! -s conftest.err
6350 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351 ac_header_compiler=yes
6352else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006354sed 's/^/| /' conftest.$ac_ext >&5
6355
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006358
6359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006360{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6361echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362
6363# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006364{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6365echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006367/* confdefs.h. */
6368_ACEOF
6369cat confdefs.h >>conftest.$ac_ext
6370cat >>conftest.$ac_ext <<_ACEOF
6371/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006372#include <sys/sysmacros.h>
6373_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006374if { (ac_try="$ac_cpp conftest.$ac_ext"
6375case "(($ac_try" in
6376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6377 *) ac_try_echo=$ac_try;;
6378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006380 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006381 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006382 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006383 rm -f conftest.er1
6384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386 (exit $ac_status); } >/dev/null && {
6387 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6388 test ! -s conftest.err
6389 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006390 ac_header_preproc=yes
6391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006393sed 's/^/| /' conftest.$ac_ext >&5
6394
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006395 ac_header_preproc=no
6396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006397
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006398rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006399{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6400echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006401
6402# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006403case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6404 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6406echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6407 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6408echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006409 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006410 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006411 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006412 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6413echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6414 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6415echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6416 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6417echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6418 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6419echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6420 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6421echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6422 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6423echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006425## -------------------------------------- ##
6426## Report this to http://bugs.python.org/ ##
6427## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006428_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006429 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006430 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006432{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6433echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006434if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006436else
6437 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6438fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006439{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6440echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006441
6442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006443if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006444
6445cat >>confdefs.h <<\_ACEOF
6446#define MAJOR_IN_SYSMACROS 1
6447_ACEOF
6448
6449fi
6450
6451
6452 fi
6453fi
6454
Michael W. Hudson54241132001-12-07 15:38:26 +00006455
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006456# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006457
6458for ac_header in term.h
6459do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6461{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006465else
6466 cat >conftest.$ac_ext <<_ACEOF
6467/* confdefs.h. */
6468_ACEOF
6469cat confdefs.h >>conftest.$ac_ext
6470cat >>conftest.$ac_ext <<_ACEOF
6471/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006472
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006473#ifdef HAVE_CURSES_H
6474#include <curses.h>
6475#endif
6476
6477
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006478#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006479_ACEOF
6480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481if { (ac_try="$ac_compile"
6482case "(($ac_try" in
6483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6484 *) ac_try_echo=$ac_try;;
6485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006488 ac_status=$?
6489 grep -v '^ *+' conftest.er1 >conftest.err
6490 rm -f conftest.er1
6491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493 (exit $ac_status); } && {
6494 test -z "$ac_c_werror_flag" ||
6495 test ! -s conftest.err
6496 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006497 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006499 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006500sed 's/^/| /' conftest.$ac_ext >&5
6501
Martin v. Löwiseba40652007-08-30 20:10:57 +00006502 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006504
6505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006506fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006507ac_res=`eval echo '${'$as_ac_Header'}'`
6508 { echo "$as_me:$LINENO: result: $ac_res" >&5
6509echo "${ECHO_T}$ac_res" >&6; }
6510if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006511 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006513_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006514
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006515fi
6516
6517done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006518
6519
Martin v. Löwis11017b12006-01-14 18:12:57 +00006520# On Linux, netlink.h requires asm/types.h
6521
6522for ac_header in linux/netlink.h
6523do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006524as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6525{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006528 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006529else
6530 cat >conftest.$ac_ext <<_ACEOF
6531/* confdefs.h. */
6532_ACEOF
6533cat confdefs.h >>conftest.$ac_ext
6534cat >>conftest.$ac_ext <<_ACEOF
6535/* end confdefs.h. */
6536
6537#ifdef HAVE_ASM_TYPES_H
6538#include <asm/types.h>
6539#endif
6540#ifdef HAVE_SYS_SOCKET_H
6541#include <sys/socket.h>
6542#endif
6543
6544
6545#include <$ac_header>
6546_ACEOF
6547rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006548if { (ac_try="$ac_compile"
6549case "(($ac_try" in
6550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6551 *) ac_try_echo=$ac_try;;
6552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006555 ac_status=$?
6556 grep -v '^ *+' conftest.er1 >conftest.err
6557 rm -f conftest.er1
6558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560 (exit $ac_status); } && {
6561 test -z "$ac_c_werror_flag" ||
6562 test ! -s conftest.err
6563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006564 eval "$as_ac_Header=yes"
6565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006566 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006567sed 's/^/| /' conftest.$ac_ext >&5
6568
Martin v. Löwiseba40652007-08-30 20:10:57 +00006569 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571
6572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006573fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006574ac_res=`eval echo '${'$as_ac_Header'}'`
6575 { echo "$as_me:$LINENO: result: $ac_res" >&5
6576echo "${ECHO_T}$ac_res" >&6; }
6577if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006578 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006579#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006580_ACEOF
6581
6582fi
6583
6584done
6585
6586
Guido van Rossum627b2d71993-12-24 10:39:16 +00006587# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006588was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006589{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6590echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006592/* confdefs.h. */
6593_ACEOF
6594cat confdefs.h >>conftest.$ac_ext
6595cat >>conftest.$ac_ext <<_ACEOF
6596/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006597#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006598
6599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006601 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006602 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006603else
Martin v. Löwis11437992002-04-12 09:54:03 +00006604
6605
6606cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006607#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006608_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006609
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006610
Guido van Rossum627b2d71993-12-24 10:39:16 +00006611fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006612rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006614{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6615echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006616
Neal Norwitz11690112002-07-30 01:08:28 +00006617# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006618{ echo "$as_me:$LINENO: checking for makedev" >&5
6619echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006621/* confdefs.h. */
6622_ACEOF
6623cat confdefs.h >>conftest.$ac_ext
6624cat >>conftest.$ac_ext <<_ACEOF
6625/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006626#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006627int
6628main ()
6629{
6630 makedev(0, 0)
6631 ;
6632 return 0;
6633}
6634_ACEOF
6635rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006636if { (ac_try="$ac_link"
6637case "(($ac_try" in
6638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6639 *) ac_try_echo=$ac_try;;
6640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006642 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006644 grep -v '^ *+' conftest.er1 >conftest.err
6645 rm -f conftest.er1
6646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006648 (exit $ac_status); } && {
6649 test -z "$ac_c_werror_flag" ||
6650 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006651 } && test -s conftest$ac_exeext &&
6652 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006653 ac_cv_has_makedev=yes
6654else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006656sed 's/^/| /' conftest.$ac_ext >&5
6657
Martin v. Löwiseba40652007-08-30 20:10:57 +00006658 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006660
6661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006662 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006663if test "$ac_cv_has_makedev" = "no"; then
6664 # we didn't link, try if _OSF_SOURCE will allow us to link
6665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006666/* confdefs.h. */
6667_ACEOF
6668cat confdefs.h >>conftest.$ac_ext
6669cat >>conftest.$ac_ext <<_ACEOF
6670/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006671
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006672#define _OSF_SOURCE 1
6673#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006674
Neal Norwitz11690112002-07-30 01:08:28 +00006675int
6676main ()
6677{
6678 makedev(0, 0)
6679 ;
6680 return 0;
6681}
6682_ACEOF
6683rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684if { (ac_try="$ac_link"
6685case "(($ac_try" in
6686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6687 *) ac_try_echo=$ac_try;;
6688esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006692 grep -v '^ *+' conftest.er1 >conftest.err
6693 rm -f conftest.er1
6694 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006696 (exit $ac_status); } && {
6697 test -z "$ac_c_werror_flag" ||
6698 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006699 } && test -s conftest$ac_exeext &&
6700 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006701 ac_cv_has_makedev=yes
6702else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006704sed 's/^/| /' conftest.$ac_ext >&5
6705
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708
6709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006710 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006711 if test "$ac_cv_has_makedev" = "yes"; then
6712
6713cat >>confdefs.h <<\_ACEOF
6714#define _OSF_SOURCE 1
6715_ACEOF
6716
6717 fi
6718fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006719{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6720echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006721if test "$ac_cv_has_makedev" = "yes"; then
6722
6723cat >>confdefs.h <<\_ACEOF
6724#define HAVE_MAKEDEV 1
6725_ACEOF
6726
6727fi
6728
Martin v. Löwis399a6892002-10-04 10:22:02 +00006729# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6730# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6731# defined, but the compiler does not support pragma redefine_extname,
6732# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6733# structures (such as rlimit64) without declaring them. As a
6734# work-around, disable LFS on such configurations
6735
6736use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006737{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6738echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006745
6746#define _LARGEFILE_SOURCE 1
6747#define _FILE_OFFSET_BITS 64
6748#include <sys/resource.h>
6749
Martin v. Löwis399a6892002-10-04 10:22:02 +00006750int
6751main ()
6752{
6753struct rlimit foo;
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759if { (ac_try="$ac_compile"
6760case "(($ac_try" in
6761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6762 *) ac_try_echo=$ac_try;;
6763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006767 grep -v '^ *+' conftest.er1 >conftest.err
6768 rm -f conftest.er1
6769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771 (exit $ac_status); } && {
6772 test -z "$ac_c_werror_flag" ||
6773 test ! -s conftest.err
6774 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006775 sol_lfs_bug=no
6776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006778sed 's/^/| /' conftest.$ac_ext >&5
6779
Martin v. Löwiseba40652007-08-30 20:10:57 +00006780 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782
6783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006784{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6785echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006786if test "$sol_lfs_bug" = "yes"; then
6787 use_lfs=no
6788fi
6789
6790if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006791# Two defines needed to enable largefile support on various platforms
6792# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794cat >>confdefs.h <<\_ACEOF
6795#define _LARGEFILE_SOURCE 1
6796_ACEOF
6797
6798
6799cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006800#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006801_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006802
Martin v. Löwis399a6892002-10-04 10:22:02 +00006803fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006804
Guido van Rossum84e7b241996-08-19 21:59:00 +00006805# Add some code to confdefs.h so that the test for off_t works on SCO
6806cat >> confdefs.h <<\EOF
6807#if defined(SCO_DS)
6808#undef _OFF_T
6809#endif
6810EOF
6811
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006813{ echo "$as_me:$LINENO: checking for mode_t" >&5
6814echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006815if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006817else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006818 cat >conftest.$ac_ext <<_ACEOF
6819/* confdefs.h. */
6820_ACEOF
6821cat confdefs.h >>conftest.$ac_ext
6822cat >>conftest.$ac_ext <<_ACEOF
6823/* end confdefs.h. */
6824$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006825typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006826int
6827main ()
6828{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006829if ((ac__type_new_ *) 0)
6830 return 0;
6831if (sizeof (ac__type_new_))
6832 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006833 ;
6834 return 0;
6835}
6836_ACEOF
6837rm -f conftest.$ac_objext
6838if { (ac_try="$ac_compile"
6839case "(($ac_try" in
6840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6841 *) ac_try_echo=$ac_try;;
6842esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006844 (eval "$ac_compile") 2>conftest.er1
6845 ac_status=$?
6846 grep -v '^ *+' conftest.er1 >conftest.err
6847 rm -f conftest.er1
6848 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006850 (exit $ac_status); } && {
6851 test -z "$ac_c_werror_flag" ||
6852 test ! -s conftest.err
6853 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006854 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006855else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006857sed 's/^/| /' conftest.$ac_ext >&5
6858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006859 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006861
6862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006863fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006864{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6865echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6866if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006867 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006868else
Martin v. Löwis11437992002-04-12 09:54:03 +00006869
6870cat >>confdefs.h <<_ACEOF
6871#define mode_t int
6872_ACEOF
6873
6874fi
6875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006876{ echo "$as_me:$LINENO: checking for off_t" >&5
6877echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006878if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006879 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006880else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881 cat >conftest.$ac_ext <<_ACEOF
6882/* confdefs.h. */
6883_ACEOF
6884cat confdefs.h >>conftest.$ac_ext
6885cat >>conftest.$ac_ext <<_ACEOF
6886/* end confdefs.h. */
6887$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006888typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006889int
6890main ()
6891{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006892if ((ac__type_new_ *) 0)
6893 return 0;
6894if (sizeof (ac__type_new_))
6895 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006896 ;
6897 return 0;
6898}
6899_ACEOF
6900rm -f conftest.$ac_objext
6901if { (ac_try="$ac_compile"
6902case "(($ac_try" in
6903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6904 *) ac_try_echo=$ac_try;;
6905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006907 (eval "$ac_compile") 2>conftest.er1
6908 ac_status=$?
6909 grep -v '^ *+' conftest.er1 >conftest.err
6910 rm -f conftest.er1
6911 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006913 (exit $ac_status); } && {
6914 test -z "$ac_c_werror_flag" ||
6915 test ! -s conftest.err
6916 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006917 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006920sed 's/^/| /' conftest.$ac_ext >&5
6921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006922 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924
6925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006926fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006927{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6928echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6929if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006931else
Martin v. Löwis11437992002-04-12 09:54:03 +00006932
6933cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
6936
6937fi
6938
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006939{ echo "$as_me:$LINENO: checking for pid_t" >&5
6940echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006941if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006943else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006944 cat >conftest.$ac_ext <<_ACEOF
6945/* confdefs.h. */
6946_ACEOF
6947cat confdefs.h >>conftest.$ac_ext
6948cat >>conftest.$ac_ext <<_ACEOF
6949/* end confdefs.h. */
6950$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006951typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006952int
6953main ()
6954{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006955if ((ac__type_new_ *) 0)
6956 return 0;
6957if (sizeof (ac__type_new_))
6958 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006959 ;
6960 return 0;
6961}
6962_ACEOF
6963rm -f conftest.$ac_objext
6964if { (ac_try="$ac_compile"
6965case "(($ac_try" in
6966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6967 *) ac_try_echo=$ac_try;;
6968esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006970 (eval "$ac_compile") 2>conftest.er1
6971 ac_status=$?
6972 grep -v '^ *+' conftest.er1 >conftest.err
6973 rm -f conftest.er1
6974 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006976 (exit $ac_status); } && {
6977 test -z "$ac_c_werror_flag" ||
6978 test ! -s conftest.err
6979 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006983sed 's/^/| /' conftest.$ac_ext >&5
6984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987
6988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006989fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006990{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6991echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6992if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006994else
Martin v. Löwis11437992002-04-12 09:54:03 +00006995
6996cat >>confdefs.h <<_ACEOF
6997#define pid_t int
6998_ACEOF
6999
7000fi
7001
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007002{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7003echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007004if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007005 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007006else
7007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007008/* confdefs.h. */
7009_ACEOF
7010cat confdefs.h >>conftest.$ac_ext
7011cat >>conftest.$ac_ext <<_ACEOF
7012/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007013#include <sys/types.h>
7014#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007015
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 ;
7021 return 0;
7022}
7023_ACEOF
7024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025if { (ac_try="$ac_compile"
7026case "(($ac_try" in
7027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7028 *) ac_try_echo=$ac_try;;
7029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007033 grep -v '^ *+' conftest.er1 >conftest.err
7034 rm -f conftest.er1
7035 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037 (exit $ac_status); } && {
7038 test -z "$ac_c_werror_flag" ||
7039 test ! -s conftest.err
7040 } && test -s conftest.$ac_objext; then
7041 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007044sed 's/^/| /' conftest.$ac_ext >&5
7045
Martin v. Löwiseba40652007-08-30 20:10:57 +00007046 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007048
7049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007050fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007051{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7052echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007053
Martin v. Löwis11437992002-04-12 09:54:03 +00007054cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007055#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007056_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057
Michael W. Hudson54241132001-12-07 15:38:26 +00007058
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007059{ echo "$as_me:$LINENO: checking for size_t" >&5
7060echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007061if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007062 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007064 cat >conftest.$ac_ext <<_ACEOF
7065/* confdefs.h. */
7066_ACEOF
7067cat confdefs.h >>conftest.$ac_ext
7068cat >>conftest.$ac_ext <<_ACEOF
7069/* end confdefs.h. */
7070$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007071typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007072int
7073main ()
7074{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007075if ((ac__type_new_ *) 0)
7076 return 0;
7077if (sizeof (ac__type_new_))
7078 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007079 ;
7080 return 0;
7081}
7082_ACEOF
7083rm -f conftest.$ac_objext
7084if { (ac_try="$ac_compile"
7085case "(($ac_try" in
7086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7087 *) ac_try_echo=$ac_try;;
7088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007090 (eval "$ac_compile") 2>conftest.er1
7091 ac_status=$?
7092 grep -v '^ *+' conftest.er1 >conftest.err
7093 rm -f conftest.er1
7094 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007096 (exit $ac_status); } && {
7097 test -z "$ac_c_werror_flag" ||
7098 test ! -s conftest.err
7099 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007100 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007101else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007103sed 's/^/| /' conftest.$ac_ext >&5
7104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007105 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007107
7108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007110{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7111echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7112if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007114else
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
7116cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007117#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007118_ACEOF
7119
7120fi
7121
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007122{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7123echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007124if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007126else
7127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007128/* confdefs.h. */
7129_ACEOF
7130cat confdefs.h >>conftest.$ac_ext
7131cat >>conftest.$ac_ext <<_ACEOF
7132/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007133#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007134
7135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007137 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138 ac_cv_type_uid_t=yes
7139else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140 ac_cv_type_uid_t=no
7141fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007142rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007144fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007145{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7146echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007147if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148
Martin v. Löwis11437992002-04-12 09:54:03 +00007149cat >>confdefs.h <<\_ACEOF
7150#define uid_t int
7151_ACEOF
7152
7153
7154cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007155#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007156_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007157
7158fi
7159
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007161 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7162echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007163if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007164 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007165else
7166 ac_cv_c_uint32_t=no
7167 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7168 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
7175$ac_includes_default
7176int
7177main ()
7178{
7179static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7180test_array [0] = 0
7181
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (ac_try="$ac_compile"
7188case "(($ac_try" in
7189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7190 *) ac_try_echo=$ac_try;;
7191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193 (eval "$ac_compile") 2>conftest.er1
7194 ac_status=$?
7195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007199 (exit $ac_status); } && {
7200 test -z "$ac_c_werror_flag" ||
7201 test ! -s conftest.err
7202 } && test -s conftest.$ac_objext; then
7203 case $ac_type in
7204 uint32_t) ac_cv_c_uint32_t=yes ;;
7205 *) ac_cv_c_uint32_t=$ac_type ;;
7206esac
7207
7208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007209 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007210sed 's/^/| /' conftest.$ac_ext >&5
7211
7212
7213fi
7214
7215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7216 test "$ac_cv_c_uint32_t" != no && break
7217 done
7218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007219{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7220echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007221 case $ac_cv_c_uint32_t in #(
7222 no|yes) ;; #(
7223 *)
7224
7225cat >>confdefs.h <<\_ACEOF
7226#define _UINT32_T 1
7227_ACEOF
7228
7229
7230cat >>confdefs.h <<_ACEOF
7231#define uint32_t $ac_cv_c_uint32_t
7232_ACEOF
7233;;
7234 esac
7235
7236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007237 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7238echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007240 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007241else
7242 ac_cv_c_uint64_t=no
7243 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7244 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7245 cat >conftest.$ac_ext <<_ACEOF
7246/* confdefs.h. */
7247_ACEOF
7248cat confdefs.h >>conftest.$ac_ext
7249cat >>conftest.$ac_ext <<_ACEOF
7250/* end confdefs.h. */
7251$ac_includes_default
7252int
7253main ()
7254{
7255static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7256test_array [0] = 0
7257
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
7263if { (ac_try="$ac_compile"
7264case "(($ac_try" in
7265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7266 *) ac_try_echo=$ac_try;;
7267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007269 (eval "$ac_compile") 2>conftest.er1
7270 ac_status=$?
7271 grep -v '^ *+' conftest.er1 >conftest.err
7272 rm -f conftest.er1
7273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007275 (exit $ac_status); } && {
7276 test -z "$ac_c_werror_flag" ||
7277 test ! -s conftest.err
7278 } && test -s conftest.$ac_objext; then
7279 case $ac_type in
7280 uint64_t) ac_cv_c_uint64_t=yes ;;
7281 *) ac_cv_c_uint64_t=$ac_type ;;
7282esac
7283
7284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007285 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007286sed 's/^/| /' conftest.$ac_ext >&5
7287
7288
7289fi
7290
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292 test "$ac_cv_c_uint64_t" != no && break
7293 done
7294fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007295{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7296echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007297 case $ac_cv_c_uint64_t in #(
7298 no|yes) ;; #(
7299 *)
7300
7301cat >>confdefs.h <<\_ACEOF
7302#define _UINT64_T 1
7303_ACEOF
7304
7305
7306cat >>confdefs.h <<_ACEOF
7307#define uint64_t $ac_cv_c_uint64_t
7308_ACEOF
7309;;
7310 esac
7311
7312
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007313 { echo "$as_me:$LINENO: checking for int32_t" >&5
7314echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007315if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007316 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007317else
7318 ac_cv_c_int32_t=no
7319 for ac_type in 'int32_t' 'int' 'long int' \
7320 'long long int' 'short int' 'signed char'; do
7321 cat >conftest.$ac_ext <<_ACEOF
7322/* confdefs.h. */
7323_ACEOF
7324cat confdefs.h >>conftest.$ac_ext
7325cat >>conftest.$ac_ext <<_ACEOF
7326/* end confdefs.h. */
7327$ac_includes_default
7328int
7329main ()
7330{
7331static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (ac_try="$ac_compile"
7340case "(($ac_try" in
7341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7342 *) ac_try_echo=$ac_try;;
7343esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007345 (eval "$ac_compile") 2>conftest.er1
7346 ac_status=$?
7347 grep -v '^ *+' conftest.er1 >conftest.err
7348 rm -f conftest.er1
7349 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007351 (exit $ac_status); } && {
7352 test -z "$ac_c_werror_flag" ||
7353 test ! -s conftest.err
7354 } && test -s conftest.$ac_objext; then
7355 cat >conftest.$ac_ext <<_ACEOF
7356/* confdefs.h. */
7357_ACEOF
7358cat confdefs.h >>conftest.$ac_ext
7359cat >>conftest.$ac_ext <<_ACEOF
7360/* end confdefs.h. */
7361$ac_includes_default
7362int
7363main ()
7364{
7365static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007366 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007367test_array [0] = 0
7368
7369 ;
7370 return 0;
7371}
7372_ACEOF
7373rm -f conftest.$ac_objext
7374if { (ac_try="$ac_compile"
7375case "(($ac_try" in
7376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7377 *) ac_try_echo=$ac_try;;
7378esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007380 (eval "$ac_compile") 2>conftest.er1
7381 ac_status=$?
7382 grep -v '^ *+' conftest.er1 >conftest.err
7383 rm -f conftest.er1
7384 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007386 (exit $ac_status); } && {
7387 test -z "$ac_c_werror_flag" ||
7388 test ! -s conftest.err
7389 } && test -s conftest.$ac_objext; then
7390 :
7391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007392 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007393sed 's/^/| /' conftest.$ac_ext >&5
7394
7395 case $ac_type in
7396 int32_t) ac_cv_c_int32_t=yes ;;
7397 *) ac_cv_c_int32_t=$ac_type ;;
7398esac
7399
7400fi
7401
7402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007404 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007405sed 's/^/| /' conftest.$ac_ext >&5
7406
7407
7408fi
7409
7410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7411 test "$ac_cv_c_int32_t" != no && break
7412 done
7413fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007414{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7415echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007416 case $ac_cv_c_int32_t in #(
7417 no|yes) ;; #(
7418 *)
7419
7420cat >>confdefs.h <<_ACEOF
7421#define int32_t $ac_cv_c_int32_t
7422_ACEOF
7423;;
7424 esac
7425
7426
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007427 { echo "$as_me:$LINENO: checking for int64_t" >&5
7428echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007429if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007430 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007431else
7432 ac_cv_c_int64_t=no
7433 for ac_type in 'int64_t' 'int' 'long int' \
7434 'long long int' 'short int' 'signed char'; do
7435 cat >conftest.$ac_ext <<_ACEOF
7436/* confdefs.h. */
7437_ACEOF
7438cat confdefs.h >>conftest.$ac_ext
7439cat >>conftest.$ac_ext <<_ACEOF
7440/* end confdefs.h. */
7441$ac_includes_default
7442int
7443main ()
7444{
7445static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7446test_array [0] = 0
7447
7448 ;
7449 return 0;
7450}
7451_ACEOF
7452rm -f conftest.$ac_objext
7453if { (ac_try="$ac_compile"
7454case "(($ac_try" in
7455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7456 *) ac_try_echo=$ac_try;;
7457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007459 (eval "$ac_compile") 2>conftest.er1
7460 ac_status=$?
7461 grep -v '^ *+' conftest.er1 >conftest.err
7462 rm -f conftest.er1
7463 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007465 (exit $ac_status); } && {
7466 test -z "$ac_c_werror_flag" ||
7467 test ! -s conftest.err
7468 } && test -s conftest.$ac_objext; then
7469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
7476int
7477main ()
7478{
7479static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007480 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007481test_array [0] = 0
7482
7483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
7488if { (ac_try="$ac_compile"
7489case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007494 (eval "$ac_compile") 2>conftest.er1
7495 ac_status=$?
7496 grep -v '^ *+' conftest.er1 >conftest.err
7497 rm -f conftest.er1
7498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007500 (exit $ac_status); } && {
7501 test -z "$ac_c_werror_flag" ||
7502 test ! -s conftest.err
7503 } && test -s conftest.$ac_objext; then
7504 :
7505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007506 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007507sed 's/^/| /' conftest.$ac_ext >&5
7508
7509 case $ac_type in
7510 int64_t) ac_cv_c_int64_t=yes ;;
7511 *) ac_cv_c_int64_t=$ac_type ;;
7512esac
7513
7514fi
7515
7516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007518 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007519sed 's/^/| /' conftest.$ac_ext >&5
7520
7521
7522fi
7523
7524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7525 test "$ac_cv_c_int64_t" != no && break
7526 done
7527fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007528{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7529echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007530 case $ac_cv_c_int64_t in #(
7531 no|yes) ;; #(
7532 *)
7533
7534cat >>confdefs.h <<_ACEOF
7535#define int64_t $ac_cv_c_int64_t
7536_ACEOF
7537;;
7538 esac
7539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007540{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7541echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007542if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007543 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007544else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007545 cat >conftest.$ac_ext <<_ACEOF
7546/* confdefs.h. */
7547_ACEOF
7548cat confdefs.h >>conftest.$ac_ext
7549cat >>conftest.$ac_ext <<_ACEOF
7550/* end confdefs.h. */
7551$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007552typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007553int
7554main ()
7555{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007556if ((ac__type_new_ *) 0)
7557 return 0;
7558if (sizeof (ac__type_new_))
7559 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007560 ;
7561 return 0;
7562}
7563_ACEOF
7564rm -f conftest.$ac_objext
7565if { (ac_try="$ac_compile"
7566case "(($ac_try" in
7567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7568 *) ac_try_echo=$ac_try;;
7569esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007571 (eval "$ac_compile") 2>conftest.er1
7572 ac_status=$?
7573 grep -v '^ *+' conftest.er1 >conftest.err
7574 rm -f conftest.er1
7575 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007577 (exit $ac_status); } && {
7578 test -z "$ac_c_werror_flag" ||
7579 test ! -s conftest.err
7580 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007581 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007582else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007583 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007584sed 's/^/| /' conftest.$ac_ext >&5
7585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007586 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588
7589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007590fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007591{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7592echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7593if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007594
7595cat >>confdefs.h <<\_ACEOF
7596#define HAVE_SSIZE_T 1
7597_ACEOF
7598
7599fi
7600
Jack Jansendd19cf82001-12-06 22:36:17 +00007601
Michael W. Hudson54241132001-12-07 15:38:26 +00007602# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007603# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007604{ echo "$as_me:$LINENO: checking for int" >&5
7605echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7606if test "${ac_cv_type_int+set}" = set; then
7607 echo $ECHO_N "(cached) $ECHO_C" >&6
7608else
7609 cat >conftest.$ac_ext <<_ACEOF
7610/* confdefs.h. */
7611_ACEOF
7612cat confdefs.h >>conftest.$ac_ext
7613cat >>conftest.$ac_ext <<_ACEOF
7614/* end confdefs.h. */
7615$ac_includes_default
7616typedef int ac__type_new_;
7617int
7618main ()
7619{
7620if ((ac__type_new_ *) 0)
7621 return 0;
7622if (sizeof (ac__type_new_))
7623 return 0;
7624 ;
7625 return 0;
7626}
7627_ACEOF
7628rm -f conftest.$ac_objext
7629if { (ac_try="$ac_compile"
7630case "(($ac_try" in
7631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7632 *) ac_try_echo=$ac_try;;
7633esac
7634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7635 (eval "$ac_compile") 2>conftest.er1
7636 ac_status=$?
7637 grep -v '^ *+' conftest.er1 >conftest.err
7638 rm -f conftest.er1
7639 cat conftest.err >&5
7640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7641 (exit $ac_status); } && {
7642 test -z "$ac_c_werror_flag" ||
7643 test ! -s conftest.err
7644 } && test -s conftest.$ac_objext; then
7645 ac_cv_type_int=yes
7646else
7647 echo "$as_me: failed program was:" >&5
7648sed 's/^/| /' conftest.$ac_ext >&5
7649
7650 ac_cv_type_int=no
7651fi
7652
7653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7654fi
7655{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7656echo "${ECHO_T}$ac_cv_type_int" >&6; }
7657
Martin v. Löwiseba40652007-08-30 20:10:57 +00007658# The cast to long int works around a bug in the HP C Compiler
7659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7661# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007662{ echo "$as_me:$LINENO: checking size of int" >&5
7663echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007664if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007666else
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 if test "$cross_compiling" = yes; then
7668 # Depending upon the size, compute the lo and hi bounds.
7669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007670/* confdefs.h. */
7671_ACEOF
7672cat confdefs.h >>conftest.$ac_ext
7673cat >>conftest.$ac_ext <<_ACEOF
7674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007675$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007676 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677int
7678main ()
7679{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007681test_array [0] = 0
7682
7683 ;
7684 return 0;
7685}
7686_ACEOF
7687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007688if { (ac_try="$ac_compile"
7689case "(($ac_try" in
7690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7691 *) ac_try_echo=$ac_try;;
7692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007696 grep -v '^ *+' conftest.er1 >conftest.err
7697 rm -f conftest.er1
7698 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700 (exit $ac_status); } && {
7701 test -z "$ac_c_werror_flag" ||
7702 test ! -s conftest.err
7703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_lo=0 ac_mid=0
7705 while :; do
7706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007707/* confdefs.h. */
7708_ACEOF
7709cat confdefs.h >>conftest.$ac_ext
7710cat >>conftest.$ac_ext <<_ACEOF
7711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007712$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007714int
7715main ()
7716{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007718test_array [0] = 0
7719
7720 ;
7721 return 0;
7722}
7723_ACEOF
7724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725if { (ac_try="$ac_compile"
7726case "(($ac_try" in
7727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7728 *) ac_try_echo=$ac_try;;
7729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007733 grep -v '^ *+' conftest.er1 >conftest.err
7734 rm -f conftest.er1
7735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737 (exit $ac_status); } && {
7738 test -z "$ac_c_werror_flag" ||
7739 test ! -s conftest.err
7740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_hi=$ac_mid; break
7742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007744sed 's/^/| /' conftest.$ac_ext >&5
7745
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 ac_lo=`expr $ac_mid + 1`
7747 if test $ac_lo -le $ac_mid; then
7748 ac_lo= ac_hi=
7749 break
7750 fi
7751 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753
7754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 done
7756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007761/* confdefs.h. */
7762_ACEOF
7763cat confdefs.h >>conftest.$ac_ext
7764cat >>conftest.$ac_ext <<_ACEOF
7765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007766$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007767 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007768int
7769main ()
7770{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007772test_array [0] = 0
7773
7774 ;
7775 return 0;
7776}
7777_ACEOF
7778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779if { (ac_try="$ac_compile"
7780case "(($ac_try" in
7781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7782 *) ac_try_echo=$ac_try;;
7783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007787 grep -v '^ *+' conftest.er1 >conftest.err
7788 rm -f conftest.er1
7789 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007791 (exit $ac_status); } && {
7792 test -z "$ac_c_werror_flag" ||
7793 test ! -s conftest.err
7794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007795 ac_hi=-1 ac_mid=-1
7796 while :; do
7797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007798/* confdefs.h. */
7799_ACEOF
7800cat confdefs.h >>conftest.$ac_ext
7801cat >>conftest.$ac_ext <<_ACEOF
7802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007803$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007804 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007805int
7806main ()
7807{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007809test_array [0] = 0
7810
7811 ;
7812 return 0;
7813}
7814_ACEOF
7815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816if { (ac_try="$ac_compile"
7817case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007824 grep -v '^ *+' conftest.er1 >conftest.err
7825 rm -f conftest.er1
7826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828 (exit $ac_status); } && {
7829 test -z "$ac_c_werror_flag" ||
7830 test ! -s conftest.err
7831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ac_lo=$ac_mid; break
7833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007835sed 's/^/| /' conftest.$ac_ext >&5
7836
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 ac_hi=`expr '(' $ac_mid ')' - 1`
7838 if test $ac_mid -le $ac_hi; then
7839 ac_lo= ac_hi=
7840 break
7841 fi
7842 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007844
7845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 done
7847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007849sed 's/^/| /' conftest.$ac_ext >&5
7850
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007853
7854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856
7857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007858# Binary search between lo and hi bounds.
7859while test "x$ac_lo" != "x$ac_hi"; do
7860 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007867$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007869int
7870main ()
7871{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007873test_array [0] = 0
7874
7875 ;
7876 return 0;
7877}
7878_ACEOF
7879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880if { (ac_try="$ac_compile"
7881case "(($ac_try" in
7882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7883 *) ac_try_echo=$ac_try;;
7884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007888 grep -v '^ *+' conftest.er1 >conftest.err
7889 rm -f conftest.er1
7890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 (exit $ac_status); } && {
7893 test -z "$ac_c_werror_flag" ||
7894 test ! -s conftest.err
7895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 ac_hi=$ac_mid
7897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007899sed 's/^/| /' conftest.$ac_ext >&5
7900
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903
7904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007905done
7906case $ac_lo in
7907?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007911echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007913 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914 else
7915 ac_cv_sizeof_int=0
7916 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007917esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007920/* confdefs.h. */
7921_ACEOF
7922cat confdefs.h >>conftest.$ac_ext
7923cat >>conftest.$ac_ext <<_ACEOF
7924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007925$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007926 typedef int ac__type_sizeof_;
7927static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7928static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007929#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007930#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007933{
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
7935 FILE *f = fopen ("conftest.val", "w");
7936 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007938 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007941 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007943 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 }
7945 else
7946 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007947 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007948 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007950 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007953
7954 ;
7955 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007956}
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
7958rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959if { (ac_try="$ac_link"
7960case "(($ac_try" in
7961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7962 *) ac_try_echo=$ac_try;;
7963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969 { (case "(($ac_try" in
7970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7971 *) ac_try_echo=$ac_try;;
7972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 (exit $ac_status); }; }; then
7978 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007980 echo "$as_me: program exited with status $ac_status" >&5
7981echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007982sed 's/^/| /' conftest.$ac_ext >&5
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007986 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007987See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007988echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007989See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007991 else
7992 ac_cv_sizeof_int=0
7993 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995rm -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 +00007996fi
7997rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007999{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8000echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001
8002
8003
Martin v. Löwis11437992002-04-12 09:54:03 +00008004cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008005#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008007
8008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008009{ echo "$as_me:$LINENO: checking for long" >&5
8010echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8011if test "${ac_cv_type_long+set}" = set; then
8012 echo $ECHO_N "(cached) $ECHO_C" >&6
8013else
8014 cat >conftest.$ac_ext <<_ACEOF
8015/* confdefs.h. */
8016_ACEOF
8017cat confdefs.h >>conftest.$ac_ext
8018cat >>conftest.$ac_ext <<_ACEOF
8019/* end confdefs.h. */
8020$ac_includes_default
8021typedef long ac__type_new_;
8022int
8023main ()
8024{
8025if ((ac__type_new_ *) 0)
8026 return 0;
8027if (sizeof (ac__type_new_))
8028 return 0;
8029 ;
8030 return 0;
8031}
8032_ACEOF
8033rm -f conftest.$ac_objext
8034if { (ac_try="$ac_compile"
8035case "(($ac_try" in
8036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8037 *) ac_try_echo=$ac_try;;
8038esac
8039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8040 (eval "$ac_compile") 2>conftest.er1
8041 ac_status=$?
8042 grep -v '^ *+' conftest.er1 >conftest.err
8043 rm -f conftest.er1
8044 cat conftest.err >&5
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); } && {
8047 test -z "$ac_c_werror_flag" ||
8048 test ! -s conftest.err
8049 } && test -s conftest.$ac_objext; then
8050 ac_cv_type_long=yes
8051else
8052 echo "$as_me: failed program was:" >&5
8053sed 's/^/| /' conftest.$ac_ext >&5
8054
8055 ac_cv_type_long=no
8056fi
8057
8058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8059fi
8060{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8061echo "${ECHO_T}$ac_cv_type_long" >&6; }
8062
Martin v. Löwiseba40652007-08-30 20:10:57 +00008063# The cast to long int works around a bug in the HP C Compiler
8064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8066# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008067{ echo "$as_me:$LINENO: checking size of long" >&5
8068echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008069if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008070 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008071else
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 if test "$cross_compiling" = yes; then
8073 # Depending upon the size, compute the lo and hi bounds.
8074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008075/* confdefs.h. */
8076_ACEOF
8077cat confdefs.h >>conftest.$ac_ext
8078cat >>conftest.$ac_ext <<_ACEOF
8079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008080$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008081 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008086test_array [0] = 0
8087
8088 ;
8089 return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008093if { (ac_try="$ac_compile"
8094case "(($ac_try" in
8095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8096 *) ac_try_echo=$ac_try;;
8097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008101 grep -v '^ *+' conftest.er1 >conftest.err
8102 rm -f conftest.er1
8103 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105 (exit $ac_status); } && {
8106 test -z "$ac_c_werror_flag" ||
8107 test ! -s conftest.err
8108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_lo=0 ac_mid=0
8110 while :; do
8111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008112/* confdefs.h. */
8113_ACEOF
8114cat confdefs.h >>conftest.$ac_ext
8115cat >>conftest.$ac_ext <<_ACEOF
8116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008117$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008119int
8120main ()
8121{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008123test_array [0] = 0
8124
8125 ;
8126 return 0;
8127}
8128_ACEOF
8129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130if { (ac_try="$ac_compile"
8131case "(($ac_try" in
8132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8133 *) ac_try_echo=$ac_try;;
8134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008138 grep -v '^ *+' conftest.er1 >conftest.err
8139 rm -f conftest.er1
8140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142 (exit $ac_status); } && {
8143 test -z "$ac_c_werror_flag" ||
8144 test ! -s conftest.err
8145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_hi=$ac_mid; break
8147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008149sed 's/^/| /' conftest.$ac_ext >&5
8150
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 ac_lo=`expr $ac_mid + 1`
8152 if test $ac_lo -le $ac_mid; then
8153 ac_lo= ac_hi=
8154 break
8155 fi
8156 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008158
8159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 done
8161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008166/* confdefs.h. */
8167_ACEOF
8168cat confdefs.h >>conftest.$ac_ext
8169cat >>conftest.$ac_ext <<_ACEOF
8170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008171$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008172 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008173int
8174main ()
8175{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008176static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008177test_array [0] = 0
8178
8179 ;
8180 return 0;
8181}
8182_ACEOF
8183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184if { (ac_try="$ac_compile"
8185case "(($ac_try" in
8186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8187 *) ac_try_echo=$ac_try;;
8188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008192 grep -v '^ *+' conftest.er1 >conftest.err
8193 rm -f conftest.er1
8194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008196 (exit $ac_status); } && {
8197 test -z "$ac_c_werror_flag" ||
8198 test ! -s conftest.err
8199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 ac_hi=-1 ac_mid=-1
8201 while :; do
8202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008203/* confdefs.h. */
8204_ACEOF
8205cat confdefs.h >>conftest.$ac_ext
8206cat >>conftest.$ac_ext <<_ACEOF
8207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008208$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008209 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008210int
8211main ()
8212{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008214test_array [0] = 0
8215
8216 ;
8217 return 0;
8218}
8219_ACEOF
8220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221if { (ac_try="$ac_compile"
8222case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008229 grep -v '^ *+' conftest.er1 >conftest.err
8230 rm -f conftest.er1
8231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233 (exit $ac_status); } && {
8234 test -z "$ac_c_werror_flag" ||
8235 test ! -s conftest.err
8236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 ac_lo=$ac_mid; break
8238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008240sed 's/^/| /' conftest.$ac_ext >&5
8241
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242 ac_hi=`expr '(' $ac_mid ')' - 1`
8243 if test $ac_mid -le $ac_hi; then
8244 ac_lo= ac_hi=
8245 break
8246 fi
8247 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008249
8250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 done
8252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008254sed 's/^/| /' conftest.$ac_ext >&5
8255
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008258
8259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261
8262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008263# Binary search between lo and hi bounds.
8264while test "x$ac_lo" != "x$ac_hi"; do
8265 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008272$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008274int
8275main ()
8276{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008278test_array [0] = 0
8279
8280 ;
8281 return 0;
8282}
8283_ACEOF
8284rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285if { (ac_try="$ac_compile"
8286case "(($ac_try" in
8287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8288 *) ac_try_echo=$ac_try;;
8289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293 grep -v '^ *+' conftest.er1 >conftest.err
8294 rm -f conftest.er1
8295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 (exit $ac_status); } && {
8298 test -z "$ac_c_werror_flag" ||
8299 test ! -s conftest.err
8300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008301 ac_hi=$ac_mid
8302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008304sed 's/^/| /' conftest.$ac_ext >&5
8305
Martin v. Löwiseba40652007-08-30 20:10:57 +00008306 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308
8309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008310done
8311case $ac_lo in
8312?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008314 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008315See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008316echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008317See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008318 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319 else
8320 ac_cv_sizeof_long=0
8321 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008322esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323else
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008325/* confdefs.h. */
8326_ACEOF
8327cat confdefs.h >>conftest.$ac_ext
8328cat >>conftest.$ac_ext <<_ACEOF
8329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008330$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008331 typedef long ac__type_sizeof_;
8332static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8333static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008334#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008335#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008336int
8337main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008338{
Martin v. Löwis11437992002-04-12 09:54:03 +00008339
8340 FILE *f = fopen ("conftest.val", "w");
8341 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008343 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008344 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008346 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008348 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008349 }
8350 else
8351 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008352 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008353 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008354 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008355 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008358
8359 ;
8360 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008361}
Martin v. Löwis11437992002-04-12 09:54:03 +00008362_ACEOF
8363rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364if { (ac_try="$ac_link"
8365case "(($ac_try" in
8366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8367 *) ac_try_echo=$ac_try;;
8368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008371 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374 { (case "(($ac_try" in
8375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8376 *) ac_try_echo=$ac_try;;
8377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 (exit $ac_status); }; }; then
8383 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008384else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008385 echo "$as_me: program exited with status $ac_status" >&5
8386echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008387sed 's/^/| /' conftest.$ac_ext >&5
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008391 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008392See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008393echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008394See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008396 else
8397 ac_cv_sizeof_long=0
8398 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400rm -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 +00008401fi
8402rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008403fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008404{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8405echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008406
8407
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008410#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008412
8413
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008414{ echo "$as_me:$LINENO: checking for void *" >&5
8415echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8416if test "${ac_cv_type_void_p+set}" = set; then
8417 echo $ECHO_N "(cached) $ECHO_C" >&6
8418else
8419 cat >conftest.$ac_ext <<_ACEOF
8420/* confdefs.h. */
8421_ACEOF
8422cat confdefs.h >>conftest.$ac_ext
8423cat >>conftest.$ac_ext <<_ACEOF
8424/* end confdefs.h. */
8425$ac_includes_default
8426typedef void * ac__type_new_;
8427int
8428main ()
8429{
8430if ((ac__type_new_ *) 0)
8431 return 0;
8432if (sizeof (ac__type_new_))
8433 return 0;
8434 ;
8435 return 0;
8436}
8437_ACEOF
8438rm -f conftest.$ac_objext
8439if { (ac_try="$ac_compile"
8440case "(($ac_try" in
8441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8442 *) ac_try_echo=$ac_try;;
8443esac
8444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8445 (eval "$ac_compile") 2>conftest.er1
8446 ac_status=$?
8447 grep -v '^ *+' conftest.er1 >conftest.err
8448 rm -f conftest.er1
8449 cat conftest.err >&5
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); } && {
8452 test -z "$ac_c_werror_flag" ||
8453 test ! -s conftest.err
8454 } && test -s conftest.$ac_objext; then
8455 ac_cv_type_void_p=yes
8456else
8457 echo "$as_me: failed program was:" >&5
8458sed 's/^/| /' conftest.$ac_ext >&5
8459
8460 ac_cv_type_void_p=no
8461fi
8462
8463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8464fi
8465{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8466echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8467
Martin v. Löwiseba40652007-08-30 20:10:57 +00008468# The cast to long int works around a bug in the HP C Compiler
8469# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8470# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8471# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008472{ echo "$as_me:$LINENO: checking size of void *" >&5
8473echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008474if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008475 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008476else
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 if test "$cross_compiling" = yes; then
8478 # Depending upon the size, compute the lo and hi bounds.
8479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008480/* confdefs.h. */
8481_ACEOF
8482cat confdefs.h >>conftest.$ac_ext
8483cat >>conftest.$ac_ext <<_ACEOF
8484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008485$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008486 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008487int
8488main ()
8489{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008491test_array [0] = 0
8492
8493 ;
8494 return 0;
8495}
8496_ACEOF
8497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008498if { (ac_try="$ac_compile"
8499case "(($ac_try" in
8500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8501 *) ac_try_echo=$ac_try;;
8502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008506 grep -v '^ *+' conftest.er1 >conftest.err
8507 rm -f conftest.er1
8508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510 (exit $ac_status); } && {
8511 test -z "$ac_c_werror_flag" ||
8512 test ! -s conftest.err
8513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_lo=0 ac_mid=0
8515 while :; do
8516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* confdefs.h. */
8518_ACEOF
8519cat confdefs.h >>conftest.$ac_ext
8520cat >>conftest.$ac_ext <<_ACEOF
8521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008524int
8525main ()
8526{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008528test_array [0] = 0
8529
8530 ;
8531 return 0;
8532}
8533_ACEOF
8534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535if { (ac_try="$ac_compile"
8536case "(($ac_try" in
8537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8538 *) ac_try_echo=$ac_try;;
8539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008543 grep -v '^ *+' conftest.er1 >conftest.err
8544 rm -f conftest.er1
8545 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547 (exit $ac_status); } && {
8548 test -z "$ac_c_werror_flag" ||
8549 test ! -s conftest.err
8550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_hi=$ac_mid; break
8552else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008554sed 's/^/| /' conftest.$ac_ext >&5
8555
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 ac_lo=`expr $ac_mid + 1`
8557 if test $ac_lo -le $ac_mid; then
8558 ac_lo= ac_hi=
8559 break
8560 fi
8561 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008563
8564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 done
8566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008568sed 's/^/| /' conftest.$ac_ext >&5
8569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008571/* confdefs.h. */
8572_ACEOF
8573cat confdefs.h >>conftest.$ac_ext
8574cat >>conftest.$ac_ext <<_ACEOF
8575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008576$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008577 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008578int
8579main ()
8580{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008581static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008582test_array [0] = 0
8583
8584 ;
8585 return 0;
8586}
8587_ACEOF
8588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589if { (ac_try="$ac_compile"
8590case "(($ac_try" in
8591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8592 *) ac_try_echo=$ac_try;;
8593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008597 grep -v '^ *+' conftest.er1 >conftest.err
8598 rm -f conftest.er1
8599 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008601 (exit $ac_status); } && {
8602 test -z "$ac_c_werror_flag" ||
8603 test ! -s conftest.err
8604 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 ac_hi=-1 ac_mid=-1
8606 while :; do
8607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008608/* confdefs.h. */
8609_ACEOF
8610cat confdefs.h >>conftest.$ac_ext
8611cat >>conftest.$ac_ext <<_ACEOF
8612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008613$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008614 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
8617{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008619test_array [0] = 0
8620
8621 ;
8622 return 0;
8623}
8624_ACEOF
8625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626if { (ac_try="$ac_compile"
8627case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008634 grep -v '^ *+' conftest.er1 >conftest.err
8635 rm -f conftest.er1
8636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638 (exit $ac_status); } && {
8639 test -z "$ac_c_werror_flag" ||
8640 test ! -s conftest.err
8641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_lo=$ac_mid; break
8643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008645sed 's/^/| /' conftest.$ac_ext >&5
8646
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647 ac_hi=`expr '(' $ac_mid ')' - 1`
8648 if test $ac_mid -le $ac_hi; then
8649 ac_lo= ac_hi=
8650 break
8651 fi
8652 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008654
8655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 done
8657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008659sed 's/^/| /' conftest.$ac_ext >&5
8660
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008663
8664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666
8667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008668# Binary search between lo and hi bounds.
8669while test "x$ac_lo" != "x$ac_hi"; do
8670 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* confdefs.h. */
8673_ACEOF
8674cat confdefs.h >>conftest.$ac_ext
8675cat >>conftest.$ac_ext <<_ACEOF
8676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008677$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008683test_array [0] = 0
8684
8685 ;
8686 return 0;
8687}
8688_ACEOF
8689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008690if { (ac_try="$ac_compile"
8691case "(($ac_try" in
8692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8693 *) ac_try_echo=$ac_try;;
8694esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008698 grep -v '^ *+' conftest.er1 >conftest.err
8699 rm -f conftest.er1
8700 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 (exit $ac_status); } && {
8703 test -z "$ac_c_werror_flag" ||
8704 test ! -s conftest.err
8705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 ac_hi=$ac_mid
8707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008709sed 's/^/| /' conftest.$ac_ext >&5
8710
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713
8714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008715done
8716case $ac_lo in
8717?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008719 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008720See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008721echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008722See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008723 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724 else
8725 ac_cv_sizeof_void_p=0
8726 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008727esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008730/* confdefs.h. */
8731_ACEOF
8732cat confdefs.h >>conftest.$ac_ext
8733cat >>conftest.$ac_ext <<_ACEOF
8734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008736 typedef void * ac__type_sizeof_;
8737static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8738static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008739#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008740#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008743{
Martin v. Löwis11437992002-04-12 09:54:03 +00008744
8745 FILE *f = fopen ("conftest.val", "w");
8746 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008748 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008751 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008753 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 }
8755 else
8756 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008757 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008758 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008760 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
8764 ;
8765 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008766}
Martin v. Löwis11437992002-04-12 09:54:03 +00008767_ACEOF
8768rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769if { (ac_try="$ac_link"
8770case "(($ac_try" in
8771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8772 *) ac_try_echo=$ac_try;;
8773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779 { (case "(($ac_try" in
8780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8781 *) ac_try_echo=$ac_try;;
8782esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 (exit $ac_status); }; }; then
8788 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008790 echo "$as_me: program exited with status $ac_status" >&5
8791echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008792sed 's/^/| /' conftest.$ac_ext >&5
8793
Martin v. Löwis11437992002-04-12 09:54:03 +00008794( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008796 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008797See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008798echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008799See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008801 else
8802 ac_cv_sizeof_void_p=0
8803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805rm -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 +00008806fi
8807rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008808fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008809{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8810echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811
8812
8813
Martin v. Löwis11437992002-04-12 09:54:03 +00008814cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008815#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008816_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008817
8818
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008819{ echo "$as_me:$LINENO: checking for short" >&5
8820echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8821if test "${ac_cv_type_short+set}" = set; then
8822 echo $ECHO_N "(cached) $ECHO_C" >&6
8823else
8824 cat >conftest.$ac_ext <<_ACEOF
8825/* confdefs.h. */
8826_ACEOF
8827cat confdefs.h >>conftest.$ac_ext
8828cat >>conftest.$ac_ext <<_ACEOF
8829/* end confdefs.h. */
8830$ac_includes_default
8831typedef short ac__type_new_;
8832int
8833main ()
8834{
8835if ((ac__type_new_ *) 0)
8836 return 0;
8837if (sizeof (ac__type_new_))
8838 return 0;
8839 ;
8840 return 0;
8841}
8842_ACEOF
8843rm -f conftest.$ac_objext
8844if { (ac_try="$ac_compile"
8845case "(($ac_try" in
8846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8847 *) ac_try_echo=$ac_try;;
8848esac
8849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8850 (eval "$ac_compile") 2>conftest.er1
8851 ac_status=$?
8852 grep -v '^ *+' conftest.er1 >conftest.err
8853 rm -f conftest.er1
8854 cat conftest.err >&5
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); } && {
8857 test -z "$ac_c_werror_flag" ||
8858 test ! -s conftest.err
8859 } && test -s conftest.$ac_objext; then
8860 ac_cv_type_short=yes
8861else
8862 echo "$as_me: failed program was:" >&5
8863sed 's/^/| /' conftest.$ac_ext >&5
8864
8865 ac_cv_type_short=no
8866fi
8867
8868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8869fi
8870{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8871echo "${ECHO_T}$ac_cv_type_short" >&6; }
8872
Martin v. Löwiseba40652007-08-30 20:10:57 +00008873# The cast to long int works around a bug in the HP C Compiler
8874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8876# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008877{ echo "$as_me:$LINENO: checking size of short" >&5
8878echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008879if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008880 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008881else
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 if test "$cross_compiling" = yes; then
8883 # Depending upon the size, compute the lo and hi bounds.
8884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008885/* confdefs.h. */
8886_ACEOF
8887cat confdefs.h >>conftest.$ac_ext
8888cat >>conftest.$ac_ext <<_ACEOF
8889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008890$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008891 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892int
8893main ()
8894{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008895static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008896test_array [0] = 0
8897
8898 ;
8899 return 0;
8900}
8901_ACEOF
8902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008903if { (ac_try="$ac_compile"
8904case "(($ac_try" in
8905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8906 *) ac_try_echo=$ac_try;;
8907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008911 grep -v '^ *+' conftest.er1 >conftest.err
8912 rm -f conftest.er1
8913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915 (exit $ac_status); } && {
8916 test -z "$ac_c_werror_flag" ||
8917 test ! -s conftest.err
8918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_lo=0 ac_mid=0
8920 while :; do
8921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008933test_array [0] = 0
8934
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940if { (ac_try="$ac_compile"
8941case "(($ac_try" in
8942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8943 *) ac_try_echo=$ac_try;;
8944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008948 grep -v '^ *+' conftest.er1 >conftest.err
8949 rm -f conftest.er1
8950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952 (exit $ac_status); } && {
8953 test -z "$ac_c_werror_flag" ||
8954 test ! -s conftest.err
8955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_hi=$ac_mid; break
8957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008959sed 's/^/| /' conftest.$ac_ext >&5
8960
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 ac_lo=`expr $ac_mid + 1`
8962 if test $ac_lo -le $ac_mid; then
8963 ac_lo= ac_hi=
8964 break
8965 fi
8966 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968
8969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 done
8971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* confdefs.h. */
8977_ACEOF
8978cat confdefs.h >>conftest.$ac_ext
8979cat >>conftest.$ac_ext <<_ACEOF
8980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008981$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008982 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008983int
8984main ()
8985{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008986static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008987test_array [0] = 0
8988
8989 ;
8990 return 0;
8991}
8992_ACEOF
8993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994if { (ac_try="$ac_compile"
8995case "(($ac_try" in
8996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8997 *) ac_try_echo=$ac_try;;
8998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009002 grep -v '^ *+' conftest.er1 >conftest.err
9003 rm -f conftest.er1
9004 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009006 (exit $ac_status); } && {
9007 test -z "$ac_c_werror_flag" ||
9008 test ! -s conftest.err
9009 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 ac_hi=-1 ac_mid=-1
9011 while :; do
9012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* confdefs.h. */
9014_ACEOF
9015cat confdefs.h >>conftest.$ac_ext
9016cat >>conftest.$ac_ext <<_ACEOF
9017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009018$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009019 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009020int
9021main ()
9022{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009024test_array [0] = 0
9025
9026 ;
9027 return 0;
9028}
9029_ACEOF
9030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031if { (ac_try="$ac_compile"
9032case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009039 grep -v '^ *+' conftest.er1 >conftest.err
9040 rm -f conftest.er1
9041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043 (exit $ac_status); } && {
9044 test -z "$ac_c_werror_flag" ||
9045 test ! -s conftest.err
9046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ac_lo=$ac_mid; break
9048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009050sed 's/^/| /' conftest.$ac_ext >&5
9051
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052 ac_hi=`expr '(' $ac_mid ')' - 1`
9053 if test $ac_mid -le $ac_hi; then
9054 ac_lo= ac_hi=
9055 break
9056 fi
9057 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009059
9060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 done
9062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009064sed 's/^/| /' conftest.$ac_ext >&5
9065
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068
9069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071
9072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009073# Binary search between lo and hi bounds.
9074while test "x$ac_lo" != "x$ac_hi"; do
9075 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009082$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084int
9085main ()
9086{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009088test_array [0] = 0
9089
9090 ;
9091 return 0;
9092}
9093_ACEOF
9094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009095if { (ac_try="$ac_compile"
9096case "(($ac_try" in
9097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9098 *) ac_try_echo=$ac_try;;
9099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009103 grep -v '^ *+' conftest.er1 >conftest.err
9104 rm -f conftest.er1
9105 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 (exit $ac_status); } && {
9108 test -z "$ac_c_werror_flag" ||
9109 test ! -s conftest.err
9110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 ac_hi=$ac_mid
9112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009114sed 's/^/| /' conftest.$ac_ext >&5
9115
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118
9119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009120done
9121case $ac_lo in
9122?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009124 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009125See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009126echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009127See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009128 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129 else
9130 ac_cv_sizeof_short=0
9131 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009132esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009135/* confdefs.h. */
9136_ACEOF
9137cat confdefs.h >>conftest.$ac_ext
9138cat >>conftest.$ac_ext <<_ACEOF
9139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009140$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009141 typedef short ac__type_sizeof_;
9142static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9143static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009144#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009145#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009146int
9147main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009148{
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
9150 FILE *f = fopen ("conftest.val", "w");
9151 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009153 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009156 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009158 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 }
9160 else
9161 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009163 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009165 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009167 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
9169 ;
9170 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009171}
Martin v. Löwis11437992002-04-12 09:54:03 +00009172_ACEOF
9173rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174if { (ac_try="$ac_link"
9175case "(($ac_try" in
9176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9177 *) ac_try_echo=$ac_try;;
9178esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184 { (case "(($ac_try" in
9185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9186 *) ac_try_echo=$ac_try;;
9187esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 (exit $ac_status); }; }; then
9193 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009195 echo "$as_me: program exited with status $ac_status" >&5
9196echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009197sed 's/^/| /' conftest.$ac_ext >&5
9198
Martin v. Löwis11437992002-04-12 09:54:03 +00009199( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009201 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009202See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009203echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009204See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009206 else
9207 ac_cv_sizeof_short=0
9208 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210rm -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 +00009211fi
9212rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009213fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009214{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9215echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216
9217
9218
Martin v. Löwis11437992002-04-12 09:54:03 +00009219cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009220#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009221_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009222
9223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009224{ echo "$as_me:$LINENO: checking for float" >&5
9225echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9226if test "${ac_cv_type_float+set}" = set; then
9227 echo $ECHO_N "(cached) $ECHO_C" >&6
9228else
9229 cat >conftest.$ac_ext <<_ACEOF
9230/* confdefs.h. */
9231_ACEOF
9232cat confdefs.h >>conftest.$ac_ext
9233cat >>conftest.$ac_ext <<_ACEOF
9234/* end confdefs.h. */
9235$ac_includes_default
9236typedef float ac__type_new_;
9237int
9238main ()
9239{
9240if ((ac__type_new_ *) 0)
9241 return 0;
9242if (sizeof (ac__type_new_))
9243 return 0;
9244 ;
9245 return 0;
9246}
9247_ACEOF
9248rm -f conftest.$ac_objext
9249if { (ac_try="$ac_compile"
9250case "(($ac_try" in
9251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9252 *) ac_try_echo=$ac_try;;
9253esac
9254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9255 (eval "$ac_compile") 2>conftest.er1
9256 ac_status=$?
9257 grep -v '^ *+' conftest.er1 >conftest.err
9258 rm -f conftest.er1
9259 cat conftest.err >&5
9260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9261 (exit $ac_status); } && {
9262 test -z "$ac_c_werror_flag" ||
9263 test ! -s conftest.err
9264 } && test -s conftest.$ac_objext; then
9265 ac_cv_type_float=yes
9266else
9267 echo "$as_me: failed program was:" >&5
9268sed 's/^/| /' conftest.$ac_ext >&5
9269
9270 ac_cv_type_float=no
9271fi
9272
9273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9274fi
9275{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9276echo "${ECHO_T}$ac_cv_type_float" >&6; }
9277
Martin v. Löwiseba40652007-08-30 20:10:57 +00009278# The cast to long int works around a bug in the HP C Compiler
9279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9281# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009282{ echo "$as_me:$LINENO: checking size of float" >&5
9283echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009284if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009286else
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 if test "$cross_compiling" = yes; then
9288 # Depending upon the size, compute the lo and hi bounds.
9289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009290/* confdefs.h. */
9291_ACEOF
9292cat confdefs.h >>conftest.$ac_ext
9293cat >>conftest.$ac_ext <<_ACEOF
9294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009295$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009296 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009297int
9298main ()
9299{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009301test_array [0] = 0
9302
9303 ;
9304 return 0;
9305}
9306_ACEOF
9307rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009308if { (ac_try="$ac_compile"
9309case "(($ac_try" in
9310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9311 *) ac_try_echo=$ac_try;;
9312esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009316 grep -v '^ *+' conftest.er1 >conftest.err
9317 rm -f conftest.er1
9318 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320 (exit $ac_status); } && {
9321 test -z "$ac_c_werror_flag" ||
9322 test ! -s conftest.err
9323 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_lo=0 ac_mid=0
9325 while :; do
9326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009334int
9335main ()
9336{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009338test_array [0] = 0
9339
9340 ;
9341 return 0;
9342}
9343_ACEOF
9344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345if { (ac_try="$ac_compile"
9346case "(($ac_try" in
9347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9348 *) ac_try_echo=$ac_try;;
9349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009353 grep -v '^ *+' conftest.er1 >conftest.err
9354 rm -f conftest.er1
9355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357 (exit $ac_status); } && {
9358 test -z "$ac_c_werror_flag" ||
9359 test ! -s conftest.err
9360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_hi=$ac_mid; break
9362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009364sed 's/^/| /' conftest.$ac_ext >&5
9365
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 ac_lo=`expr $ac_mid + 1`
9367 if test $ac_lo -le $ac_mid; then
9368 ac_lo= ac_hi=
9369 break
9370 fi
9371 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009373
9374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 done
9376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009378sed 's/^/| /' conftest.$ac_ext >&5
9379
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009381/* confdefs.h. */
9382_ACEOF
9383cat confdefs.h >>conftest.$ac_ext
9384cat >>conftest.$ac_ext <<_ACEOF
9385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009386$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009387 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009388int
9389main ()
9390{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009391static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009392test_array [0] = 0
9393
9394 ;
9395 return 0;
9396}
9397_ACEOF
9398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399if { (ac_try="$ac_compile"
9400case "(($ac_try" in
9401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9402 *) ac_try_echo=$ac_try;;
9403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009407 grep -v '^ *+' conftest.er1 >conftest.err
9408 rm -f conftest.er1
9409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009411 (exit $ac_status); } && {
9412 test -z "$ac_c_werror_flag" ||
9413 test ! -s conftest.err
9414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 ac_hi=-1 ac_mid=-1
9416 while :; do
9417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009418/* confdefs.h. */
9419_ACEOF
9420cat confdefs.h >>conftest.$ac_ext
9421cat >>conftest.$ac_ext <<_ACEOF
9422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009423$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009424 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009425int
9426main ()
9427{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009429test_array [0] = 0
9430
9431 ;
9432 return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436if { (ac_try="$ac_compile"
9437case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009444 grep -v '^ *+' conftest.er1 >conftest.err
9445 rm -f conftest.er1
9446 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448 (exit $ac_status); } && {
9449 test -z "$ac_c_werror_flag" ||
9450 test ! -s conftest.err
9451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_lo=$ac_mid; break
9453else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009455sed 's/^/| /' conftest.$ac_ext >&5
9456
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 ac_hi=`expr '(' $ac_mid ')' - 1`
9458 if test $ac_mid -le $ac_hi; then
9459 ac_lo= ac_hi=
9460 break
9461 fi
9462 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009464
9465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 done
9467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009469sed 's/^/| /' conftest.$ac_ext >&5
9470
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009473
9474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476
9477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009478# Binary search between lo and hi bounds.
9479while test "x$ac_lo" != "x$ac_hi"; do
9480 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009482/* confdefs.h. */
9483_ACEOF
9484cat confdefs.h >>conftest.$ac_ext
9485cat >>conftest.$ac_ext <<_ACEOF
9486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009487$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009493test_array [0] = 0
9494
9495 ;
9496 return 0;
9497}
9498_ACEOF
9499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009500if { (ac_try="$ac_compile"
9501case "(($ac_try" in
9502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9503 *) ac_try_echo=$ac_try;;
9504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009508 grep -v '^ *+' conftest.er1 >conftest.err
9509 rm -f conftest.er1
9510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 (exit $ac_status); } && {
9513 test -z "$ac_c_werror_flag" ||
9514 test ! -s conftest.err
9515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ac_hi=$ac_mid
9517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009519sed 's/^/| /' conftest.$ac_ext >&5
9520
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523
9524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525done
9526case $ac_lo in
9527?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009530See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009531echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009532See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009533 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534 else
9535 ac_cv_sizeof_float=0
9536 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009537esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* confdefs.h. */
9541_ACEOF
9542cat confdefs.h >>conftest.$ac_ext
9543cat >>conftest.$ac_ext <<_ACEOF
9544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009545$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009546 typedef float ac__type_sizeof_;
9547static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9548static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009549#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009550#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009551int
9552main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009553{
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
9555 FILE *f = fopen ("conftest.val", "w");
9556 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009558 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009561 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009563 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 }
9565 else
9566 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009567 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009568 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009569 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009570 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009573
9574 ;
9575 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009576}
Martin v. Löwis11437992002-04-12 09:54:03 +00009577_ACEOF
9578rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579if { (ac_try="$ac_link"
9580case "(($ac_try" in
9581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9582 *) ac_try_echo=$ac_try;;
9583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589 { (case "(($ac_try" in
9590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9591 *) ac_try_echo=$ac_try;;
9592esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 (exit $ac_status); }; }; then
9598 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009599else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009600 echo "$as_me: program exited with status $ac_status" >&5
9601echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009602sed 's/^/| /' conftest.$ac_ext >&5
9603
Martin v. Löwis11437992002-04-12 09:54:03 +00009604( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009606 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009607See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009608echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009609See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009611 else
9612 ac_cv_sizeof_float=0
9613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615rm -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 +00009616fi
9617rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009618fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009619{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9620echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621
9622
9623
Martin v. Löwis11437992002-04-12 09:54:03 +00009624cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009625#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009626_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009627
9628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009629{ echo "$as_me:$LINENO: checking for double" >&5
9630echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9631if test "${ac_cv_type_double+set}" = set; then
9632 echo $ECHO_N "(cached) $ECHO_C" >&6
9633else
9634 cat >conftest.$ac_ext <<_ACEOF
9635/* confdefs.h. */
9636_ACEOF
9637cat confdefs.h >>conftest.$ac_ext
9638cat >>conftest.$ac_ext <<_ACEOF
9639/* end confdefs.h. */
9640$ac_includes_default
9641typedef double ac__type_new_;
9642int
9643main ()
9644{
9645if ((ac__type_new_ *) 0)
9646 return 0;
9647if (sizeof (ac__type_new_))
9648 return 0;
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653rm -f conftest.$ac_objext
9654if { (ac_try="$ac_compile"
9655case "(($ac_try" in
9656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9657 *) ac_try_echo=$ac_try;;
9658esac
9659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9660 (eval "$ac_compile") 2>conftest.er1
9661 ac_status=$?
9662 grep -v '^ *+' conftest.er1 >conftest.err
9663 rm -f conftest.er1
9664 cat conftest.err >&5
9665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666 (exit $ac_status); } && {
9667 test -z "$ac_c_werror_flag" ||
9668 test ! -s conftest.err
9669 } && test -s conftest.$ac_objext; then
9670 ac_cv_type_double=yes
9671else
9672 echo "$as_me: failed program was:" >&5
9673sed 's/^/| /' conftest.$ac_ext >&5
9674
9675 ac_cv_type_double=no
9676fi
9677
9678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9679fi
9680{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9681echo "${ECHO_T}$ac_cv_type_double" >&6; }
9682
Martin v. Löwiseba40652007-08-30 20:10:57 +00009683# The cast to long int works around a bug in the HP C Compiler
9684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9686# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009687{ echo "$as_me:$LINENO: checking size of double" >&5
9688echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009689if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009690 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009691else
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 if test "$cross_compiling" = yes; then
9693 # Depending upon the size, compute the lo and hi bounds.
9694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* confdefs.h. */
9696_ACEOF
9697cat confdefs.h >>conftest.$ac_ext
9698cat >>conftest.$ac_ext <<_ACEOF
9699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009700$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009701 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702int
9703main ()
9704{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009705static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009706test_array [0] = 0
9707
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009713if { (ac_try="$ac_compile"
9714case "(($ac_try" in
9715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9716 *) ac_try_echo=$ac_try;;
9717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009721 grep -v '^ *+' conftest.er1 >conftest.err
9722 rm -f conftest.er1
9723 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725 (exit $ac_status); } && {
9726 test -z "$ac_c_werror_flag" ||
9727 test ! -s conftest.err
9728 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_lo=0 ac_mid=0
9730 while :; do
9731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009732/* confdefs.h. */
9733_ACEOF
9734cat confdefs.h >>conftest.$ac_ext
9735cat >>conftest.$ac_ext <<_ACEOF
9736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009739int
9740main ()
9741{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009743test_array [0] = 0
9744
9745 ;
9746 return 0;
9747}
9748_ACEOF
9749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750if { (ac_try="$ac_compile"
9751case "(($ac_try" in
9752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9753 *) ac_try_echo=$ac_try;;
9754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009758 grep -v '^ *+' conftest.er1 >conftest.err
9759 rm -f conftest.er1
9760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762 (exit $ac_status); } && {
9763 test -z "$ac_c_werror_flag" ||
9764 test ! -s conftest.err
9765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_hi=$ac_mid; break
9767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009769sed 's/^/| /' conftest.$ac_ext >&5
9770
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 ac_lo=`expr $ac_mid + 1`
9772 if test $ac_lo -le $ac_mid; then
9773 ac_lo= ac_hi=
9774 break
9775 fi
9776 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009778
9779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 done
9781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009786/* confdefs.h. */
9787_ACEOF
9788cat confdefs.h >>conftest.$ac_ext
9789cat >>conftest.$ac_ext <<_ACEOF
9790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009791$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009792 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009793int
9794main ()
9795{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009797test_array [0] = 0
9798
9799 ;
9800 return 0;
9801}
9802_ACEOF
9803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804if { (ac_try="$ac_compile"
9805case "(($ac_try" in
9806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9807 *) ac_try_echo=$ac_try;;
9808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009812 grep -v '^ *+' conftest.er1 >conftest.err
9813 rm -f conftest.er1
9814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009816 (exit $ac_status); } && {
9817 test -z "$ac_c_werror_flag" ||
9818 test ! -s conftest.err
9819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ac_hi=-1 ac_mid=-1
9821 while :; do
9822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* confdefs.h. */
9824_ACEOF
9825cat confdefs.h >>conftest.$ac_ext
9826cat >>conftest.$ac_ext <<_ACEOF
9827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009829 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009830int
9831main ()
9832{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009834test_array [0] = 0
9835
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841if { (ac_try="$ac_compile"
9842case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009849 grep -v '^ *+' conftest.er1 >conftest.err
9850 rm -f conftest.er1
9851 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853 (exit $ac_status); } && {
9854 test -z "$ac_c_werror_flag" ||
9855 test ! -s conftest.err
9856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_lo=$ac_mid; break
9858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009860sed 's/^/| /' conftest.$ac_ext >&5
9861
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862 ac_hi=`expr '(' $ac_mid ')' - 1`
9863 if test $ac_mid -le $ac_hi; then
9864 ac_lo= ac_hi=
9865 break
9866 fi
9867 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009869
9870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 done
9872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009874sed 's/^/| /' conftest.$ac_ext >&5
9875
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878
9879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881
9882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009883# Binary search between lo and hi bounds.
9884while test "x$ac_lo" != "x$ac_hi"; do
9885 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009887/* confdefs.h. */
9888_ACEOF
9889cat confdefs.h >>conftest.$ac_ext
9890cat >>conftest.$ac_ext <<_ACEOF
9891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009892$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009894int
9895main ()
9896{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009898test_array [0] = 0
9899
9900 ;
9901 return 0;
9902}
9903_ACEOF
9904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009905if { (ac_try="$ac_compile"
9906case "(($ac_try" in
9907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9908 *) ac_try_echo=$ac_try;;
9909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009913 grep -v '^ *+' conftest.er1 >conftest.err
9914 rm -f conftest.er1
9915 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 (exit $ac_status); } && {
9918 test -z "$ac_c_werror_flag" ||
9919 test ! -s conftest.err
9920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ac_hi=$ac_mid
9922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009924sed 's/^/| /' conftest.$ac_ext >&5
9925
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928
9929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009930done
9931case $ac_lo in
9932?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009934 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009935See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009936echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009937See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009938 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939 else
9940 ac_cv_sizeof_double=0
9941 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009942esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009943else
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009945/* confdefs.h. */
9946_ACEOF
9947cat confdefs.h >>conftest.$ac_ext
9948cat >>conftest.$ac_ext <<_ACEOF
9949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009950$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009951 typedef double ac__type_sizeof_;
9952static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9953static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009954#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009955#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009956int
9957main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009958{
Martin v. Löwis11437992002-04-12 09:54:03 +00009959
9960 FILE *f = fopen ("conftest.val", "w");
9961 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009963 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009966 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009968 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009969 }
9970 else
9971 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009972 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009973 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009975 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009978
9979 ;
9980 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009981}
Martin v. Löwis11437992002-04-12 09:54:03 +00009982_ACEOF
9983rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984if { (ac_try="$ac_link"
9985case "(($ac_try" in
9986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9987 *) ac_try_echo=$ac_try;;
9988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009990 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994 { (case "(($ac_try" in
9995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9996 *) ac_try_echo=$ac_try;;
9997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 (exit $ac_status); }; }; then
10003 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010004else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010005 echo "$as_me: program exited with status $ac_status" >&5
10006echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010007sed 's/^/| /' conftest.$ac_ext >&5
10008
Martin v. Löwis11437992002-04-12 09:54:03 +000010009( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010011 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010012See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010013echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010014See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010016 else
10017 ac_cv_sizeof_double=0
10018 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020rm -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 +000010021fi
10022rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010024{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10025echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026
10027
10028
Martin v. Löwis11437992002-04-12 09:54:03 +000010029cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010030#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010031_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010032
10033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010034{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10035echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10036if test "${ac_cv_type_fpos_t+set}" = set; then
10037 echo $ECHO_N "(cached) $ECHO_C" >&6
10038else
10039 cat >conftest.$ac_ext <<_ACEOF
10040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
10045$ac_includes_default
10046typedef fpos_t ac__type_new_;
10047int
10048main ()
10049{
10050if ((ac__type_new_ *) 0)
10051 return 0;
10052if (sizeof (ac__type_new_))
10053 return 0;
10054 ;
10055 return 0;
10056}
10057_ACEOF
10058rm -f conftest.$ac_objext
10059if { (ac_try="$ac_compile"
10060case "(($ac_try" in
10061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10062 *) ac_try_echo=$ac_try;;
10063esac
10064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10065 (eval "$ac_compile") 2>conftest.er1
10066 ac_status=$?
10067 grep -v '^ *+' conftest.er1 >conftest.err
10068 rm -f conftest.er1
10069 cat conftest.err >&5
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); } && {
10072 test -z "$ac_c_werror_flag" ||
10073 test ! -s conftest.err
10074 } && test -s conftest.$ac_objext; then
10075 ac_cv_type_fpos_t=yes
10076else
10077 echo "$as_me: failed program was:" >&5
10078sed 's/^/| /' conftest.$ac_ext >&5
10079
10080 ac_cv_type_fpos_t=no
10081fi
10082
10083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10084fi
10085{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10086echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10087
Martin v. Löwiseba40652007-08-30 20:10:57 +000010088# The cast to long int works around a bug in the HP C Compiler
10089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10091# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010092{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10093echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010094if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010095 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010096else
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 if test "$cross_compiling" = yes; then
10098 # Depending upon the size, compute the lo and hi bounds.
10099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* confdefs.h. */
10101_ACEOF
10102cat confdefs.h >>conftest.$ac_ext
10103cat >>conftest.$ac_ext <<_ACEOF
10104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010105$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010106 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010107int
10108main ()
10109{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010110static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010111test_array [0] = 0
10112
10113 ;
10114 return 0;
10115}
10116_ACEOF
10117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010118if { (ac_try="$ac_compile"
10119case "(($ac_try" in
10120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10121 *) ac_try_echo=$ac_try;;
10122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010126 grep -v '^ *+' conftest.er1 >conftest.err
10127 rm -f conftest.er1
10128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130 (exit $ac_status); } && {
10131 test -z "$ac_c_werror_flag" ||
10132 test ! -s conftest.err
10133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_lo=0 ac_mid=0
10135 while :; do
10136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010137/* confdefs.h. */
10138_ACEOF
10139cat confdefs.h >>conftest.$ac_ext
10140cat >>conftest.$ac_ext <<_ACEOF
10141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010142$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010144int
10145main ()
10146{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010148test_array [0] = 0
10149
10150 ;
10151 return 0;
10152}
10153_ACEOF
10154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155if { (ac_try="$ac_compile"
10156case "(($ac_try" in
10157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10158 *) ac_try_echo=$ac_try;;
10159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010163 grep -v '^ *+' conftest.er1 >conftest.err
10164 rm -f conftest.er1
10165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167 (exit $ac_status); } && {
10168 test -z "$ac_c_werror_flag" ||
10169 test ! -s conftest.err
10170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_hi=$ac_mid; break
10172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010174sed 's/^/| /' conftest.$ac_ext >&5
10175
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 ac_lo=`expr $ac_mid + 1`
10177 if test $ac_lo -le $ac_mid; then
10178 ac_lo= ac_hi=
10179 break
10180 fi
10181 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183
10184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 done
10186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010191/* confdefs.h. */
10192_ACEOF
10193cat confdefs.h >>conftest.$ac_ext
10194cat >>conftest.$ac_ext <<_ACEOF
10195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010196$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010197 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010198int
10199main ()
10200{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010201static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010202test_array [0] = 0
10203
10204 ;
10205 return 0;
10206}
10207_ACEOF
10208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010209if { (ac_try="$ac_compile"
10210case "(($ac_try" in
10211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10212 *) ac_try_echo=$ac_try;;
10213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010217 grep -v '^ *+' conftest.er1 >conftest.err
10218 rm -f conftest.er1
10219 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010221 (exit $ac_status); } && {
10222 test -z "$ac_c_werror_flag" ||
10223 test ! -s conftest.err
10224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ac_hi=-1 ac_mid=-1
10226 while :; do
10227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010228/* confdefs.h. */
10229_ACEOF
10230cat confdefs.h >>conftest.$ac_ext
10231cat >>conftest.$ac_ext <<_ACEOF
10232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010233$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010234 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010235int
10236main ()
10237{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010239test_array [0] = 0
10240
10241 ;
10242 return 0;
10243}
10244_ACEOF
10245rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246if { (ac_try="$ac_compile"
10247case "(($ac_try" in
10248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10249 *) ac_try_echo=$ac_try;;
10250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010254 grep -v '^ *+' conftest.er1 >conftest.err
10255 rm -f conftest.er1
10256 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258 (exit $ac_status); } && {
10259 test -z "$ac_c_werror_flag" ||
10260 test ! -s conftest.err
10261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_lo=$ac_mid; break
10263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010265sed 's/^/| /' conftest.$ac_ext >&5
10266
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 ac_hi=`expr '(' $ac_mid ')' - 1`
10268 if test $ac_mid -le $ac_hi; then
10269 ac_lo= ac_hi=
10270 break
10271 fi
10272 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010274
10275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 done
10277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010279sed 's/^/| /' conftest.$ac_ext >&5
10280
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283
10284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286
10287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010288# Binary search between lo and hi bounds.
10289while test "x$ac_lo" != "x$ac_hi"; do
10290 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010292/* confdefs.h. */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010297$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010299int
10300main ()
10301{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010303test_array [0] = 0
10304
10305 ;
10306 return 0;
10307}
10308_ACEOF
10309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010310if { (ac_try="$ac_compile"
10311case "(($ac_try" in
10312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10313 *) ac_try_echo=$ac_try;;
10314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010318 grep -v '^ *+' conftest.er1 >conftest.err
10319 rm -f conftest.er1
10320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 (exit $ac_status); } && {
10323 test -z "$ac_c_werror_flag" ||
10324 test ! -s conftest.err
10325 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ac_hi=$ac_mid
10327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010329sed 's/^/| /' conftest.$ac_ext >&5
10330
Martin v. Löwiseba40652007-08-30 20:10:57 +000010331 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333
10334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010335done
10336case $ac_lo in
10337?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010340See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010341echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010342See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010343 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344 else
10345 ac_cv_sizeof_fpos_t=0
10346 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010347esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010348else
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010350/* confdefs.h. */
10351_ACEOF
10352cat confdefs.h >>conftest.$ac_ext
10353cat >>conftest.$ac_ext <<_ACEOF
10354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010355$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010356 typedef fpos_t ac__type_sizeof_;
10357static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10358static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010359#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010360#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010361int
10362main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010363{
Martin v. Löwis11437992002-04-12 09:54:03 +000010364
10365 FILE *f = fopen ("conftest.val", "w");
10366 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010368 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010370 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010371 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010372 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010373 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 }
10375 else
10376 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010377 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010378 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010379 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010380 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010382 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010383
10384 ;
10385 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010386}
Martin v. Löwis11437992002-04-12 09:54:03 +000010387_ACEOF
10388rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010389if { (ac_try="$ac_link"
10390case "(($ac_try" in
10391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10392 *) ac_try_echo=$ac_try;;
10393esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010395 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010399 { (case "(($ac_try" in
10400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10401 *) ac_try_echo=$ac_try;;
10402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 (exit $ac_status); }; }; then
10408 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010410 echo "$as_me: program exited with status $ac_status" >&5
10411echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010412sed 's/^/| /' conftest.$ac_ext >&5
10413
Martin v. Löwis11437992002-04-12 09:54:03 +000010414( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010415if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010416 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010417See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010418echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010419See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010421 else
10422 ac_cv_sizeof_fpos_t=0
10423 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425rm -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 +000010426fi
10427rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010428fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010429{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10430echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010431
10432
10433
Martin v. Löwis11437992002-04-12 09:54:03 +000010434cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010435#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010436_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010437
Michael W. Hudson54241132001-12-07 15:38:26 +000010438
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010439{ echo "$as_me:$LINENO: checking for size_t" >&5
10440echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10441if test "${ac_cv_type_size_t+set}" = set; then
10442 echo $ECHO_N "(cached) $ECHO_C" >&6
10443else
10444 cat >conftest.$ac_ext <<_ACEOF
10445/* confdefs.h. */
10446_ACEOF
10447cat confdefs.h >>conftest.$ac_ext
10448cat >>conftest.$ac_ext <<_ACEOF
10449/* end confdefs.h. */
10450$ac_includes_default
10451typedef size_t ac__type_new_;
10452int
10453main ()
10454{
10455if ((ac__type_new_ *) 0)
10456 return 0;
10457if (sizeof (ac__type_new_))
10458 return 0;
10459 ;
10460 return 0;
10461}
10462_ACEOF
10463rm -f conftest.$ac_objext
10464if { (ac_try="$ac_compile"
10465case "(($ac_try" in
10466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10467 *) ac_try_echo=$ac_try;;
10468esac
10469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10470 (eval "$ac_compile") 2>conftest.er1
10471 ac_status=$?
10472 grep -v '^ *+' conftest.er1 >conftest.err
10473 rm -f conftest.er1
10474 cat conftest.err >&5
10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476 (exit $ac_status); } && {
10477 test -z "$ac_c_werror_flag" ||
10478 test ! -s conftest.err
10479 } && test -s conftest.$ac_objext; then
10480 ac_cv_type_size_t=yes
10481else
10482 echo "$as_me: failed program was:" >&5
10483sed 's/^/| /' conftest.$ac_ext >&5
10484
10485 ac_cv_type_size_t=no
10486fi
10487
10488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10489fi
10490{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10491echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10492
Martin v. Löwiseba40652007-08-30 20:10:57 +000010493# The cast to long int works around a bug in the HP C Compiler
10494# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10495# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10496# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010497{ echo "$as_me:$LINENO: checking size of size_t" >&5
10498echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010500 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010501else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502 if test "$cross_compiling" = yes; then
10503 # Depending upon the size, compute the lo and hi bounds.
10504cat >conftest.$ac_ext <<_ACEOF
10505/* confdefs.h. */
10506_ACEOF
10507cat confdefs.h >>conftest.$ac_ext
10508cat >>conftest.$ac_ext <<_ACEOF
10509/* end confdefs.h. */
10510$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010511 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512int
10513main ()
10514{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010515static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516test_array [0] = 0
10517
10518 ;
10519 return 0;
10520}
10521_ACEOF
10522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010523if { (ac_try="$ac_compile"
10524case "(($ac_try" in
10525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10526 *) ac_try_echo=$ac_try;;
10527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530 ac_status=$?
10531 grep -v '^ *+' conftest.er1 >conftest.err
10532 rm -f conftest.er1
10533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010535 (exit $ac_status); } && {
10536 test -z "$ac_c_werror_flag" ||
10537 test ! -s conftest.err
10538 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_lo=0 ac_mid=0
10540 while :; do
10541 cat >conftest.$ac_ext <<_ACEOF
10542/* confdefs.h. */
10543_ACEOF
10544cat confdefs.h >>conftest.$ac_ext
10545cat >>conftest.$ac_ext <<_ACEOF
10546/* end confdefs.h. */
10547$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549int
10550main ()
10551{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553test_array [0] = 0
10554
10555 ;
10556 return 0;
10557}
10558_ACEOF
10559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010560if { (ac_try="$ac_compile"
10561case "(($ac_try" in
10562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10563 *) ac_try_echo=$ac_try;;
10564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567 ac_status=$?
10568 grep -v '^ *+' conftest.er1 >conftest.err
10569 rm -f conftest.er1
10570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572 (exit $ac_status); } && {
10573 test -z "$ac_c_werror_flag" ||
10574 test ! -s conftest.err
10575 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_hi=$ac_mid; break
10577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010578 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579sed 's/^/| /' conftest.$ac_ext >&5
10580
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581 ac_lo=`expr $ac_mid + 1`
10582 if test $ac_lo -le $ac_mid; then
10583 ac_lo= ac_hi=
10584 break
10585 fi
10586 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010588
10589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 done
10591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596/* confdefs.h. */
10597_ACEOF
10598cat confdefs.h >>conftest.$ac_ext
10599cat >>conftest.$ac_ext <<_ACEOF
10600/* end confdefs.h. */
10601$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010602 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603int
10604main ()
10605{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010606static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607test_array [0] = 0
10608
10609 ;
10610 return 0;
10611}
10612_ACEOF
10613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010614if { (ac_try="$ac_compile"
10615case "(($ac_try" in
10616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10617 *) ac_try_echo=$ac_try;;
10618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621 ac_status=$?
10622 grep -v '^ *+' conftest.er1 >conftest.err
10623 rm -f conftest.er1
10624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010626 (exit $ac_status); } && {
10627 test -z "$ac_c_werror_flag" ||
10628 test ! -s conftest.err
10629 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630 ac_hi=-1 ac_mid=-1
10631 while :; do
10632 cat >conftest.$ac_ext <<_ACEOF
10633/* confdefs.h. */
10634_ACEOF
10635cat confdefs.h >>conftest.$ac_ext
10636cat >>conftest.$ac_ext <<_ACEOF
10637/* end confdefs.h. */
10638$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010639 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640int
10641main ()
10642{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644test_array [0] = 0
10645
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651if { (ac_try="$ac_compile"
10652case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658 ac_status=$?
10659 grep -v '^ *+' conftest.er1 >conftest.err
10660 rm -f conftest.er1
10661 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663 (exit $ac_status); } && {
10664 test -z "$ac_c_werror_flag" ||
10665 test ! -s conftest.err
10666 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667 ac_lo=$ac_mid; break
10668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010669 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670sed 's/^/| /' conftest.$ac_ext >&5
10671
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 ac_hi=`expr '(' $ac_mid ')' - 1`
10673 if test $ac_mid -le $ac_hi; then
10674 ac_lo= ac_hi=
10675 break
10676 fi
10677 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010679
10680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681 done
10682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010683 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684sed 's/^/| /' conftest.$ac_ext >&5
10685
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688
10689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691
10692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693# Binary search between lo and hi bounds.
10694while test "x$ac_lo" != "x$ac_hi"; do
10695 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10696 cat >conftest.$ac_ext <<_ACEOF
10697/* confdefs.h. */
10698_ACEOF
10699cat confdefs.h >>conftest.$ac_ext
10700cat >>conftest.$ac_ext <<_ACEOF
10701/* end confdefs.h. */
10702$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704int
10705main ()
10706{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010707static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708test_array [0] = 0
10709
10710 ;
10711 return 0;
10712}
10713_ACEOF
10714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715if { (ac_try="$ac_compile"
10716case "(($ac_try" in
10717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10718 *) ac_try_echo=$ac_try;;
10719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010722 ac_status=$?
10723 grep -v '^ *+' conftest.er1 >conftest.err
10724 rm -f conftest.er1
10725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 (exit $ac_status); } && {
10728 test -z "$ac_c_werror_flag" ||
10729 test ! -s conftest.err
10730 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010731 ac_hi=$ac_mid
10732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734sed 's/^/| /' conftest.$ac_ext >&5
10735
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010738
10739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740done
10741case $ac_lo in
10742?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010743'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010744 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010746echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010748 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749 else
10750 ac_cv_sizeof_size_t=0
10751 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010752esac
10753else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754 cat >conftest.$ac_ext <<_ACEOF
10755/* confdefs.h. */
10756_ACEOF
10757cat confdefs.h >>conftest.$ac_ext
10758cat >>conftest.$ac_ext <<_ACEOF
10759/* end confdefs.h. */
10760$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010761 typedef size_t ac__type_sizeof_;
10762static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10763static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010764#include <stdio.h>
10765#include <stdlib.h>
10766int
10767main ()
10768{
10769
10770 FILE *f = fopen ("conftest.val", "w");
10771 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010773 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010774 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010775 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010776 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010778 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010779 }
10780 else
10781 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010783 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010784 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010785 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010786 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010788
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794if { (ac_try="$ac_link"
10795case "(($ac_try" in
10796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10797 *) ac_try_echo=$ac_try;;
10798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010800 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010801 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010804 { (case "(($ac_try" in
10805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10806 *) ac_try_echo=$ac_try;;
10807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010809 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010810 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010812 (exit $ac_status); }; }; then
10813 ac_cv_sizeof_size_t=`cat conftest.val`
10814else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010815 echo "$as_me: program exited with status $ac_status" >&5
10816echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010817sed 's/^/| /' conftest.$ac_ext >&5
10818
10819( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010820if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010821 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010823echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010824See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010826 else
10827 ac_cv_sizeof_size_t=0
10828 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830rm -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 +000010831fi
10832rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010833fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010834{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10835echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836
10837
10838
Martin v. Löwis18e16552006-02-15 17:27:45 +000010839cat >>confdefs.h <<_ACEOF
10840#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10841_ACEOF
10842
10843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010844{ echo "$as_me:$LINENO: checking for pid_t" >&5
10845echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10846if test "${ac_cv_type_pid_t+set}" = set; then
10847 echo $ECHO_N "(cached) $ECHO_C" >&6
10848else
10849 cat >conftest.$ac_ext <<_ACEOF
10850/* confdefs.h. */
10851_ACEOF
10852cat confdefs.h >>conftest.$ac_ext
10853cat >>conftest.$ac_ext <<_ACEOF
10854/* end confdefs.h. */
10855$ac_includes_default
10856typedef pid_t ac__type_new_;
10857int
10858main ()
10859{
10860if ((ac__type_new_ *) 0)
10861 return 0;
10862if (sizeof (ac__type_new_))
10863 return 0;
10864 ;
10865 return 0;
10866}
10867_ACEOF
10868rm -f conftest.$ac_objext
10869if { (ac_try="$ac_compile"
10870case "(($ac_try" in
10871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10872 *) ac_try_echo=$ac_try;;
10873esac
10874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10875 (eval "$ac_compile") 2>conftest.er1
10876 ac_status=$?
10877 grep -v '^ *+' conftest.er1 >conftest.err
10878 rm -f conftest.er1
10879 cat conftest.err >&5
10880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10881 (exit $ac_status); } && {
10882 test -z "$ac_c_werror_flag" ||
10883 test ! -s conftest.err
10884 } && test -s conftest.$ac_objext; then
10885 ac_cv_type_pid_t=yes
10886else
10887 echo "$as_me: failed program was:" >&5
10888sed 's/^/| /' conftest.$ac_ext >&5
10889
10890 ac_cv_type_pid_t=no
10891fi
10892
10893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10894fi
10895{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10896echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10897
Christian Heimes951cc0f2008-01-31 23:08:23 +000010898# The cast to long int works around a bug in the HP C Compiler
10899# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10900# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10901# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010902{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10903echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010904if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010905 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010906else
10907 if test "$cross_compiling" = yes; then
10908 # Depending upon the size, compute the lo and hi bounds.
10909cat >conftest.$ac_ext <<_ACEOF
10910/* confdefs.h. */
10911_ACEOF
10912cat confdefs.h >>conftest.$ac_ext
10913cat >>conftest.$ac_ext <<_ACEOF
10914/* end confdefs.h. */
10915$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010916 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010917int
10918main ()
10919{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010920static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010921test_array [0] = 0
10922
10923 ;
10924 return 0;
10925}
10926_ACEOF
10927rm -f conftest.$ac_objext
10928if { (ac_try="$ac_compile"
10929case "(($ac_try" in
10930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10931 *) ac_try_echo=$ac_try;;
10932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010934 (eval "$ac_compile") 2>conftest.er1
10935 ac_status=$?
10936 grep -v '^ *+' conftest.er1 >conftest.err
10937 rm -f conftest.er1
10938 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010940 (exit $ac_status); } && {
10941 test -z "$ac_c_werror_flag" ||
10942 test ! -s conftest.err
10943 } && test -s conftest.$ac_objext; then
10944 ac_lo=0 ac_mid=0
10945 while :; do
10946 cat >conftest.$ac_ext <<_ACEOF
10947/* confdefs.h. */
10948_ACEOF
10949cat confdefs.h >>conftest.$ac_ext
10950cat >>conftest.$ac_ext <<_ACEOF
10951/* end confdefs.h. */
10952$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954int
10955main ()
10956{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010958test_array [0] = 0
10959
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964rm -f conftest.$ac_objext
10965if { (ac_try="$ac_compile"
10966case "(($ac_try" in
10967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10968 *) ac_try_echo=$ac_try;;
10969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010971 (eval "$ac_compile") 2>conftest.er1
10972 ac_status=$?
10973 grep -v '^ *+' conftest.er1 >conftest.err
10974 rm -f conftest.er1
10975 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010977 (exit $ac_status); } && {
10978 test -z "$ac_c_werror_flag" ||
10979 test ! -s conftest.err
10980 } && test -s conftest.$ac_objext; then
10981 ac_hi=$ac_mid; break
10982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010983 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010984sed 's/^/| /' conftest.$ac_ext >&5
10985
10986 ac_lo=`expr $ac_mid + 1`
10987 if test $ac_lo -le $ac_mid; then
10988 ac_lo= ac_hi=
10989 break
10990 fi
10991 ac_mid=`expr 2 '*' $ac_mid + 1`
10992fi
10993
10994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10995 done
10996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998sed 's/^/| /' conftest.$ac_ext >&5
10999
11000 cat >conftest.$ac_ext <<_ACEOF
11001/* confdefs.h. */
11002_ACEOF
11003cat confdefs.h >>conftest.$ac_ext
11004cat >>conftest.$ac_ext <<_ACEOF
11005/* end confdefs.h. */
11006$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011007 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011008int
11009main ()
11010{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011011static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011012test_array [0] = 0
11013
11014 ;
11015 return 0;
11016}
11017_ACEOF
11018rm -f conftest.$ac_objext
11019if { (ac_try="$ac_compile"
11020case "(($ac_try" in
11021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11022 *) ac_try_echo=$ac_try;;
11023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011025 (eval "$ac_compile") 2>conftest.er1
11026 ac_status=$?
11027 grep -v '^ *+' conftest.er1 >conftest.err
11028 rm -f conftest.er1
11029 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011031 (exit $ac_status); } && {
11032 test -z "$ac_c_werror_flag" ||
11033 test ! -s conftest.err
11034 } && test -s conftest.$ac_objext; then
11035 ac_hi=-1 ac_mid=-1
11036 while :; do
11037 cat >conftest.$ac_ext <<_ACEOF
11038/* confdefs.h. */
11039_ACEOF
11040cat confdefs.h >>conftest.$ac_ext
11041cat >>conftest.$ac_ext <<_ACEOF
11042/* end confdefs.h. */
11043$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011044 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011045int
11046main ()
11047{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011049test_array [0] = 0
11050
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext
11056if { (ac_try="$ac_compile"
11057case "(($ac_try" in
11058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11059 *) ac_try_echo=$ac_try;;
11060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011062 (eval "$ac_compile") 2>conftest.er1
11063 ac_status=$?
11064 grep -v '^ *+' conftest.er1 >conftest.err
11065 rm -f conftest.er1
11066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011068 (exit $ac_status); } && {
11069 test -z "$ac_c_werror_flag" ||
11070 test ! -s conftest.err
11071 } && test -s conftest.$ac_objext; then
11072 ac_lo=$ac_mid; break
11073else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011074 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011075sed 's/^/| /' conftest.$ac_ext >&5
11076
11077 ac_hi=`expr '(' $ac_mid ')' - 1`
11078 if test $ac_mid -le $ac_hi; then
11079 ac_lo= ac_hi=
11080 break
11081 fi
11082 ac_mid=`expr 2 '*' $ac_mid`
11083fi
11084
11085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11086 done
11087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011088 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011089sed 's/^/| /' conftest.$ac_ext >&5
11090
11091 ac_lo= ac_hi=
11092fi
11093
11094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11095fi
11096
11097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11098# Binary search between lo and hi bounds.
11099while test "x$ac_lo" != "x$ac_hi"; do
11100 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11101 cat >conftest.$ac_ext <<_ACEOF
11102/* confdefs.h. */
11103_ACEOF
11104cat confdefs.h >>conftest.$ac_ext
11105cat >>conftest.$ac_ext <<_ACEOF
11106/* end confdefs.h. */
11107$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109int
11110main ()
11111{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011113test_array [0] = 0
11114
11115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext
11120if { (ac_try="$ac_compile"
11121case "(($ac_try" in
11122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11123 *) ac_try_echo=$ac_try;;
11124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011126 (eval "$ac_compile") 2>conftest.er1
11127 ac_status=$?
11128 grep -v '^ *+' conftest.er1 >conftest.err
11129 rm -f conftest.er1
11130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132 (exit $ac_status); } && {
11133 test -z "$ac_c_werror_flag" ||
11134 test ! -s conftest.err
11135 } && test -s conftest.$ac_objext; then
11136 ac_hi=$ac_mid
11137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011138 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011139sed 's/^/| /' conftest.$ac_ext >&5
11140
11141 ac_lo=`expr '(' $ac_mid ')' + 1`
11142fi
11143
11144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11145done
11146case $ac_lo in
11147?*) ac_cv_sizeof_pid_t=$ac_lo;;
11148'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011149 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011150See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011151echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011152See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011153 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011154 else
11155 ac_cv_sizeof_pid_t=0
11156 fi ;;
11157esac
11158else
11159 cat >conftest.$ac_ext <<_ACEOF
11160/* confdefs.h. */
11161_ACEOF
11162cat confdefs.h >>conftest.$ac_ext
11163cat >>conftest.$ac_ext <<_ACEOF
11164/* end confdefs.h. */
11165$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011166 typedef pid_t ac__type_sizeof_;
11167static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11168static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011169#include <stdio.h>
11170#include <stdlib.h>
11171int
11172main ()
11173{
11174
11175 FILE *f = fopen ("conftest.val", "w");
11176 if (! f)
11177 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011178 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011179 {
11180 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011181 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011182 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011183 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011184 }
11185 else
11186 {
11187 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011188 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011189 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011190 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011191 }
11192 return ferror (f) || fclose (f) != 0;
11193
11194 ;
11195 return 0;
11196}
11197_ACEOF
11198rm -f conftest$ac_exeext
11199if { (ac_try="$ac_link"
11200case "(($ac_try" in
11201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11202 *) ac_try_echo=$ac_try;;
11203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011205 (eval "$ac_link") 2>&5
11206 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011208 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11209 { (case "(($ac_try" in
11210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11211 *) ac_try_echo=$ac_try;;
11212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011214 (eval "$ac_try") 2>&5
11215 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011217 (exit $ac_status); }; }; then
11218 ac_cv_sizeof_pid_t=`cat conftest.val`
11219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011220 echo "$as_me: program exited with status $ac_status" >&5
11221echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011222sed 's/^/| /' conftest.$ac_ext >&5
11223
11224( exit $ac_status )
11225if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011226 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011227See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011228echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011229See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011230 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011231 else
11232 ac_cv_sizeof_pid_t=0
11233 fi
11234fi
11235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11236fi
11237rm -f conftest.val
11238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011239{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11240echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011241
11242
11243
11244cat >>confdefs.h <<_ACEOF
11245#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11246_ACEOF
11247
11248
Michael W. Hudson54241132001-12-07 15:38:26 +000011249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011250{ echo "$as_me:$LINENO: checking for long long support" >&5
11251echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011252have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* confdefs.h. */
11255_ACEOF
11256cat confdefs.h >>conftest.$ac_ext
11257cat >>conftest.$ac_ext <<_ACEOF
11258/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011263long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
11268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011269if { (ac_try="$ac_compile"
11270case "(($ac_try" in
11271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11272 *) ac_try_echo=$ac_try;;
11273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011277 grep -v '^ *+' conftest.er1 >conftest.err
11278 rm -f conftest.er1
11279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281 (exit $ac_status); } && {
11282 test -z "$ac_c_werror_flag" ||
11283 test ! -s conftest.err
11284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011285
11286
11287cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011288#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011289_ACEOF
11290
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011291 have_long_long=yes
11292
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011295sed 's/^/| /' conftest.$ac_ext >&5
11296
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299
11300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011301{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11302echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011303if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011304{ echo "$as_me:$LINENO: checking for long long" >&5
11305echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11306if test "${ac_cv_type_long_long+set}" = set; then
11307 echo $ECHO_N "(cached) $ECHO_C" >&6
11308else
11309 cat >conftest.$ac_ext <<_ACEOF
11310/* confdefs.h. */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h. */
11315$ac_includes_default
11316typedef long long ac__type_new_;
11317int
11318main ()
11319{
11320if ((ac__type_new_ *) 0)
11321 return 0;
11322if (sizeof (ac__type_new_))
11323 return 0;
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328rm -f conftest.$ac_objext
11329if { (ac_try="$ac_compile"
11330case "(($ac_try" in
11331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11332 *) ac_try_echo=$ac_try;;
11333esac
11334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11335 (eval "$ac_compile") 2>conftest.er1
11336 ac_status=$?
11337 grep -v '^ *+' conftest.er1 >conftest.err
11338 rm -f conftest.er1
11339 cat conftest.err >&5
11340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11341 (exit $ac_status); } && {
11342 test -z "$ac_c_werror_flag" ||
11343 test ! -s conftest.err
11344 } && test -s conftest.$ac_objext; then
11345 ac_cv_type_long_long=yes
11346else
11347 echo "$as_me: failed program was:" >&5
11348sed 's/^/| /' conftest.$ac_ext >&5
11349
11350 ac_cv_type_long_long=no
11351fi
11352
11353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11354fi
11355{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11356echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11357
Martin v. Löwiseba40652007-08-30 20:10:57 +000011358# The cast to long int works around a bug in the HP C Compiler
11359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11361# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011362{ echo "$as_me:$LINENO: checking size of long long" >&5
11363echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011364if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011366else
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 if test "$cross_compiling" = yes; then
11368 # Depending upon the size, compute the lo and hi bounds.
11369cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* confdefs.h. */
11371_ACEOF
11372cat confdefs.h >>conftest.$ac_ext
11373cat >>conftest.$ac_ext <<_ACEOF
11374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011375$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011376 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011377int
11378main ()
11379{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011381test_array [0] = 0
11382
11383 ;
11384 return 0;
11385}
11386_ACEOF
11387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011388if { (ac_try="$ac_compile"
11389case "(($ac_try" in
11390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11391 *) ac_try_echo=$ac_try;;
11392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011396 grep -v '^ *+' conftest.er1 >conftest.err
11397 rm -f conftest.er1
11398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400 (exit $ac_status); } && {
11401 test -z "$ac_c_werror_flag" ||
11402 test ! -s conftest.err
11403 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_lo=0 ac_mid=0
11405 while :; do
11406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* confdefs.h. */
11408_ACEOF
11409cat confdefs.h >>conftest.$ac_ext
11410cat >>conftest.$ac_ext <<_ACEOF
11411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011412$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011414int
11415main ()
11416{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011418test_array [0] = 0
11419
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425if { (ac_try="$ac_compile"
11426case "(($ac_try" in
11427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11428 *) ac_try_echo=$ac_try;;
11429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011433 grep -v '^ *+' conftest.er1 >conftest.err
11434 rm -f conftest.er1
11435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437 (exit $ac_status); } && {
11438 test -z "$ac_c_werror_flag" ||
11439 test ! -s conftest.err
11440 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_hi=$ac_mid; break
11442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011444sed 's/^/| /' conftest.$ac_ext >&5
11445
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 ac_lo=`expr $ac_mid + 1`
11447 if test $ac_lo -le $ac_mid; then
11448 ac_lo= ac_hi=
11449 break
11450 fi
11451 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011453
11454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 done
11456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011458sed 's/^/| /' conftest.$ac_ext >&5
11459
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* confdefs.h. */
11462_ACEOF
11463cat confdefs.h >>conftest.$ac_ext
11464cat >>conftest.$ac_ext <<_ACEOF
11465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011466$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011467 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011468int
11469main ()
11470{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011471static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011472test_array [0] = 0
11473
11474 ;
11475 return 0;
11476}
11477_ACEOF
11478rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479if { (ac_try="$ac_compile"
11480case "(($ac_try" in
11481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11482 *) ac_try_echo=$ac_try;;
11483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011487 grep -v '^ *+' conftest.er1 >conftest.err
11488 rm -f conftest.er1
11489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011491 (exit $ac_status); } && {
11492 test -z "$ac_c_werror_flag" ||
11493 test ! -s conftest.err
11494 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 ac_hi=-1 ac_mid=-1
11496 while :; do
11497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011498/* confdefs.h. */
11499_ACEOF
11500cat confdefs.h >>conftest.$ac_ext
11501cat >>conftest.$ac_ext <<_ACEOF
11502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011503$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011504 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011505int
11506main ()
11507{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011509test_array [0] = 0
11510
11511 ;
11512 return 0;
11513}
11514_ACEOF
11515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516if { (ac_try="$ac_compile"
11517case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011524 grep -v '^ *+' conftest.er1 >conftest.err
11525 rm -f conftest.er1
11526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528 (exit $ac_status); } && {
11529 test -z "$ac_c_werror_flag" ||
11530 test ! -s conftest.err
11531 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 ac_lo=$ac_mid; break
11533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011535sed 's/^/| /' conftest.$ac_ext >&5
11536
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537 ac_hi=`expr '(' $ac_mid ')' - 1`
11538 if test $ac_mid -le $ac_hi; then
11539 ac_lo= ac_hi=
11540 break
11541 fi
11542 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011544
11545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 done
11547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011549sed 's/^/| /' conftest.$ac_ext >&5
11550
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553
11554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556
11557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011558# Binary search between lo and hi bounds.
11559while test "x$ac_lo" != "x$ac_hi"; do
11560 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011567$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011569int
11570main ()
11571{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011572static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011573test_array [0] = 0
11574
11575 ;
11576 return 0;
11577}
11578_ACEOF
11579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011580if { (ac_try="$ac_compile"
11581case "(($ac_try" in
11582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11583 *) ac_try_echo=$ac_try;;
11584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011588 grep -v '^ *+' conftest.er1 >conftest.err
11589 rm -f conftest.er1
11590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 (exit $ac_status); } && {
11593 test -z "$ac_c_werror_flag" ||
11594 test ! -s conftest.err
11595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 ac_hi=$ac_mid
11597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011599sed 's/^/| /' conftest.$ac_ext >&5
11600
Martin v. Löwiseba40652007-08-30 20:10:57 +000011601 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011603
11604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011605done
11606case $ac_lo in
11607?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011610See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011611echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011612See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011613 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614 else
11615 ac_cv_sizeof_long_long=0
11616 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011617esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011618else
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011625$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011626 typedef long long ac__type_sizeof_;
11627static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11628static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011629#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011630#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011631int
11632main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011633{
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
11635 FILE *f = fopen ("conftest.val", "w");
11636 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011637 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011638 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011643 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 }
11645 else
11646 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011647 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011648 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011650 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011653
11654 ;
11655 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011656}
Martin v. Löwis11437992002-04-12 09:54:03 +000011657_ACEOF
11658rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011659if { (ac_try="$ac_link"
11660case "(($ac_try" in
11661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11662 *) ac_try_echo=$ac_try;;
11663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011665 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669 { (case "(($ac_try" in
11670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11671 *) ac_try_echo=$ac_try;;
11672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 (exit $ac_status); }; }; then
11678 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011680 echo "$as_me: program exited with status $ac_status" >&5
11681echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011682sed 's/^/| /' conftest.$ac_ext >&5
11683
Martin v. Löwis11437992002-04-12 09:54:03 +000011684( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011685if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011686 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011687See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011688echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011689See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011690 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691 else
11692 ac_cv_sizeof_long_long=0
11693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011695rm -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 +000011696fi
11697rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011698fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011699{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11700echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701
11702
11703
Martin v. Löwis11437992002-04-12 09:54:03 +000011704cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011705#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011706_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011707
Michael W. Hudson54241132001-12-07 15:38:26 +000011708
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011709fi
11710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011711{ echo "$as_me:$LINENO: checking for long double support" >&5
11712echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011713have_long_double=no
11714cat >conftest.$ac_ext <<_ACEOF
11715/* confdefs.h. */
11716_ACEOF
11717cat confdefs.h >>conftest.$ac_ext
11718cat >>conftest.$ac_ext <<_ACEOF
11719/* end confdefs.h. */
11720
11721int
11722main ()
11723{
11724long double x; x = (long double)0.;
11725 ;
11726 return 0;
11727}
11728_ACEOF
11729rm -f conftest.$ac_objext
11730if { (ac_try="$ac_compile"
11731case "(($ac_try" in
11732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11733 *) ac_try_echo=$ac_try;;
11734esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011736 (eval "$ac_compile") 2>conftest.er1
11737 ac_status=$?
11738 grep -v '^ *+' conftest.er1 >conftest.err
11739 rm -f conftest.er1
11740 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011742 (exit $ac_status); } && {
11743 test -z "$ac_c_werror_flag" ||
11744 test ! -s conftest.err
11745 } && test -s conftest.$ac_objext; then
11746
11747
11748cat >>confdefs.h <<\_ACEOF
11749#define HAVE_LONG_DOUBLE 1
11750_ACEOF
11751
11752 have_long_double=yes
11753
11754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011756sed 's/^/| /' conftest.$ac_ext >&5
11757
11758
11759fi
11760
11761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011762{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11763echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011764if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011765{ echo "$as_me:$LINENO: checking for long double" >&5
11766echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11767if test "${ac_cv_type_long_double+set}" = set; then
11768 echo $ECHO_N "(cached) $ECHO_C" >&6
11769else
11770 cat >conftest.$ac_ext <<_ACEOF
11771/* confdefs.h. */
11772_ACEOF
11773cat confdefs.h >>conftest.$ac_ext
11774cat >>conftest.$ac_ext <<_ACEOF
11775/* end confdefs.h. */
11776$ac_includes_default
11777typedef long double ac__type_new_;
11778int
11779main ()
11780{
11781if ((ac__type_new_ *) 0)
11782 return 0;
11783if (sizeof (ac__type_new_))
11784 return 0;
11785 ;
11786 return 0;
11787}
11788_ACEOF
11789rm -f conftest.$ac_objext
11790if { (ac_try="$ac_compile"
11791case "(($ac_try" in
11792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11793 *) ac_try_echo=$ac_try;;
11794esac
11795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11796 (eval "$ac_compile") 2>conftest.er1
11797 ac_status=$?
11798 grep -v '^ *+' conftest.er1 >conftest.err
11799 rm -f conftest.er1
11800 cat conftest.err >&5
11801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11802 (exit $ac_status); } && {
11803 test -z "$ac_c_werror_flag" ||
11804 test ! -s conftest.err
11805 } && test -s conftest.$ac_objext; then
11806 ac_cv_type_long_double=yes
11807else
11808 echo "$as_me: failed program was:" >&5
11809sed 's/^/| /' conftest.$ac_ext >&5
11810
11811 ac_cv_type_long_double=no
11812fi
11813
11814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11815fi
11816{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11817echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11818
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011819# The cast to long int works around a bug in the HP C Compiler
11820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11822# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011823{ echo "$as_me:$LINENO: checking size of long double" >&5
11824echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011825if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011826 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011827else
11828 if test "$cross_compiling" = yes; then
11829 # Depending upon the size, compute the lo and hi bounds.
11830cat >conftest.$ac_ext <<_ACEOF
11831/* confdefs.h. */
11832_ACEOF
11833cat confdefs.h >>conftest.$ac_ext
11834cat >>conftest.$ac_ext <<_ACEOF
11835/* end confdefs.h. */
11836$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011837 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011838int
11839main ()
11840{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011842test_array [0] = 0
11843
11844 ;
11845 return 0;
11846}
11847_ACEOF
11848rm -f conftest.$ac_objext
11849if { (ac_try="$ac_compile"
11850case "(($ac_try" in
11851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11852 *) ac_try_echo=$ac_try;;
11853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011855 (eval "$ac_compile") 2>conftest.er1
11856 ac_status=$?
11857 grep -v '^ *+' conftest.er1 >conftest.err
11858 rm -f conftest.er1
11859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011861 (exit $ac_status); } && {
11862 test -z "$ac_c_werror_flag" ||
11863 test ! -s conftest.err
11864 } && test -s conftest.$ac_objext; then
11865 ac_lo=0 ac_mid=0
11866 while :; do
11867 cat >conftest.$ac_ext <<_ACEOF
11868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
11873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875int
11876main ()
11877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011879test_array [0] = 0
11880
11881 ;
11882 return 0;
11883}
11884_ACEOF
11885rm -f conftest.$ac_objext
11886if { (ac_try="$ac_compile"
11887case "(($ac_try" in
11888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11889 *) ac_try_echo=$ac_try;;
11890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011892 (eval "$ac_compile") 2>conftest.er1
11893 ac_status=$?
11894 grep -v '^ *+' conftest.er1 >conftest.err
11895 rm -f conftest.er1
11896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011898 (exit $ac_status); } && {
11899 test -z "$ac_c_werror_flag" ||
11900 test ! -s conftest.err
11901 } && test -s conftest.$ac_objext; then
11902 ac_hi=$ac_mid; break
11903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011904 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011905sed 's/^/| /' conftest.$ac_ext >&5
11906
11907 ac_lo=`expr $ac_mid + 1`
11908 if test $ac_lo -le $ac_mid; then
11909 ac_lo= ac_hi=
11910 break
11911 fi
11912 ac_mid=`expr 2 '*' $ac_mid + 1`
11913fi
11914
11915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11916 done
11917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919sed 's/^/| /' conftest.$ac_ext >&5
11920
11921 cat >conftest.$ac_ext <<_ACEOF
11922/* confdefs.h. */
11923_ACEOF
11924cat confdefs.h >>conftest.$ac_ext
11925cat >>conftest.$ac_ext <<_ACEOF
11926/* end confdefs.h. */
11927$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011928 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011929int
11930main ()
11931{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011933test_array [0] = 0
11934
11935 ;
11936 return 0;
11937}
11938_ACEOF
11939rm -f conftest.$ac_objext
11940if { (ac_try="$ac_compile"
11941case "(($ac_try" in
11942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11943 *) ac_try_echo=$ac_try;;
11944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011946 (eval "$ac_compile") 2>conftest.er1
11947 ac_status=$?
11948 grep -v '^ *+' conftest.er1 >conftest.err
11949 rm -f conftest.er1
11950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011952 (exit $ac_status); } && {
11953 test -z "$ac_c_werror_flag" ||
11954 test ! -s conftest.err
11955 } && test -s conftest.$ac_objext; then
11956 ac_hi=-1 ac_mid=-1
11957 while :; do
11958 cat >conftest.$ac_ext <<_ACEOF
11959/* confdefs.h. */
11960_ACEOF
11961cat confdefs.h >>conftest.$ac_ext
11962cat >>conftest.$ac_ext <<_ACEOF
11963/* end confdefs.h. */
11964$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011965 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011966int
11967main ()
11968{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011970test_array [0] = 0
11971
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976rm -f conftest.$ac_objext
11977if { (ac_try="$ac_compile"
11978case "(($ac_try" in
11979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11980 *) ac_try_echo=$ac_try;;
11981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011983 (eval "$ac_compile") 2>conftest.er1
11984 ac_status=$?
11985 grep -v '^ *+' conftest.er1 >conftest.err
11986 rm -f conftest.er1
11987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011989 (exit $ac_status); } && {
11990 test -z "$ac_c_werror_flag" ||
11991 test ! -s conftest.err
11992 } && test -s conftest.$ac_objext; then
11993 ac_lo=$ac_mid; break
11994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011995 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011996sed 's/^/| /' conftest.$ac_ext >&5
11997
11998 ac_hi=`expr '(' $ac_mid ')' - 1`
11999 if test $ac_mid -le $ac_hi; then
12000 ac_lo= ac_hi=
12001 break
12002 fi
12003 ac_mid=`expr 2 '*' $ac_mid`
12004fi
12005
12006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12007 done
12008else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012009 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012010sed 's/^/| /' conftest.$ac_ext >&5
12011
12012 ac_lo= ac_hi=
12013fi
12014
12015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12016fi
12017
12018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019# Binary search between lo and hi bounds.
12020while test "x$ac_lo" != "x$ac_hi"; do
12021 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12022 cat >conftest.$ac_ext <<_ACEOF
12023/* confdefs.h. */
12024_ACEOF
12025cat confdefs.h >>conftest.$ac_ext
12026cat >>conftest.$ac_ext <<_ACEOF
12027/* end confdefs.h. */
12028$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030int
12031main ()
12032{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034test_array [0] = 0
12035
12036 ;
12037 return 0;
12038}
12039_ACEOF
12040rm -f conftest.$ac_objext
12041if { (ac_try="$ac_compile"
12042case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;;
12045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012047 (eval "$ac_compile") 2>conftest.er1
12048 ac_status=$?
12049 grep -v '^ *+' conftest.er1 >conftest.err
12050 rm -f conftest.er1
12051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053 (exit $ac_status); } && {
12054 test -z "$ac_c_werror_flag" ||
12055 test ! -s conftest.err
12056 } && test -s conftest.$ac_objext; then
12057 ac_hi=$ac_mid
12058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012059 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012060sed 's/^/| /' conftest.$ac_ext >&5
12061
12062 ac_lo=`expr '(' $ac_mid ')' + 1`
12063fi
12064
12065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12066done
12067case $ac_lo in
12068?*) ac_cv_sizeof_long_double=$ac_lo;;
12069'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012070 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012071See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012072echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012073See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012074 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012075 else
12076 ac_cv_sizeof_long_double=0
12077 fi ;;
12078esac
12079else
12080 cat >conftest.$ac_ext <<_ACEOF
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
12086$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012087 typedef long double ac__type_sizeof_;
12088static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12089static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012090#include <stdio.h>
12091#include <stdlib.h>
12092int
12093main ()
12094{
12095
12096 FILE *f = fopen ("conftest.val", "w");
12097 if (! f)
12098 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012099 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012100 {
12101 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012102 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012103 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012104 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012105 }
12106 else
12107 {
12108 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012109 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012110 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012111 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012112 }
12113 return ferror (f) || fclose (f) != 0;
12114
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest$ac_exeext
12120if { (ac_try="$ac_link"
12121case "(($ac_try" in
12122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12123 *) ac_try_echo=$ac_try;;
12124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012126 (eval "$ac_link") 2>&5
12127 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12130 { (case "(($ac_try" in
12131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12132 *) ac_try_echo=$ac_try;;
12133esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012135 (eval "$ac_try") 2>&5
12136 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012138 (exit $ac_status); }; }; then
12139 ac_cv_sizeof_long_double=`cat conftest.val`
12140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012141 echo "$as_me: program exited with status $ac_status" >&5
12142echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012143sed 's/^/| /' conftest.$ac_ext >&5
12144
12145( exit $ac_status )
12146if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012147 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012148See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012149echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012150See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012151 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012152 else
12153 ac_cv_sizeof_long_double=0
12154 fi
12155fi
12156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12157fi
12158rm -f conftest.val
12159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012160{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12161echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012162
12163
12164
12165cat >>confdefs.h <<_ACEOF
12166#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12167_ACEOF
12168
12169
12170fi
12171
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012172{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12173echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012174have_c99_bool=no
12175cat >conftest.$ac_ext <<_ACEOF
12176/* confdefs.h. */
12177_ACEOF
12178cat confdefs.h >>conftest.$ac_ext
12179cat >>conftest.$ac_ext <<_ACEOF
12180/* end confdefs.h. */
12181
12182int
12183main ()
12184{
12185_Bool x; x = (_Bool)0;
12186 ;
12187 return 0;
12188}
12189_ACEOF
12190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012191if { (ac_try="$ac_compile"
12192case "(($ac_try" in
12193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12194 *) ac_try_echo=$ac_try;;
12195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012198 ac_status=$?
12199 grep -v '^ *+' conftest.er1 >conftest.err
12200 rm -f conftest.er1
12201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203 (exit $ac_status); } && {
12204 test -z "$ac_c_werror_flag" ||
12205 test ! -s conftest.err
12206 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012207
12208
12209cat >>confdefs.h <<\_ACEOF
12210#define HAVE_C99_BOOL 1
12211_ACEOF
12212
12213 have_c99_bool=yes
12214
12215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012217sed 's/^/| /' conftest.$ac_ext >&5
12218
Martin v. Löwiseba40652007-08-30 20:10:57 +000012219
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221
12222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012223{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12224echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012225if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012226{ echo "$as_me:$LINENO: checking for _Bool" >&5
12227echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12228if test "${ac_cv_type__Bool+set}" = set; then
12229 echo $ECHO_N "(cached) $ECHO_C" >&6
12230else
12231 cat >conftest.$ac_ext <<_ACEOF
12232/* confdefs.h. */
12233_ACEOF
12234cat confdefs.h >>conftest.$ac_ext
12235cat >>conftest.$ac_ext <<_ACEOF
12236/* end confdefs.h. */
12237$ac_includes_default
12238typedef _Bool ac__type_new_;
12239int
12240main ()
12241{
12242if ((ac__type_new_ *) 0)
12243 return 0;
12244if (sizeof (ac__type_new_))
12245 return 0;
12246 ;
12247 return 0;
12248}
12249_ACEOF
12250rm -f conftest.$ac_objext
12251if { (ac_try="$ac_compile"
12252case "(($ac_try" in
12253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12254 *) ac_try_echo=$ac_try;;
12255esac
12256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12257 (eval "$ac_compile") 2>conftest.er1
12258 ac_status=$?
12259 grep -v '^ *+' conftest.er1 >conftest.err
12260 rm -f conftest.er1
12261 cat conftest.err >&5
12262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263 (exit $ac_status); } && {
12264 test -z "$ac_c_werror_flag" ||
12265 test ! -s conftest.err
12266 } && test -s conftest.$ac_objext; then
12267 ac_cv_type__Bool=yes
12268else
12269 echo "$as_me: failed program was:" >&5
12270sed 's/^/| /' conftest.$ac_ext >&5
12271
12272 ac_cv_type__Bool=no
12273fi
12274
12275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12276fi
12277{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12278echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12279
Martin v. Löwiseba40652007-08-30 20:10:57 +000012280# The cast to long int works around a bug in the HP C Compiler
12281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12283# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012284{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12285echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012287 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012288else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012289 if test "$cross_compiling" = yes; then
12290 # Depending upon the size, compute the lo and hi bounds.
12291cat >conftest.$ac_ext <<_ACEOF
12292/* confdefs.h. */
12293_ACEOF
12294cat confdefs.h >>conftest.$ac_ext
12295cat >>conftest.$ac_ext <<_ACEOF
12296/* end confdefs.h. */
12297$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012298 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299int
12300main ()
12301{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303test_array [0] = 0
12304
12305 ;
12306 return 0;
12307}
12308_ACEOF
12309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012310if { (ac_try="$ac_compile"
12311case "(($ac_try" in
12312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12313 *) ac_try_echo=$ac_try;;
12314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317 ac_status=$?
12318 grep -v '^ *+' conftest.er1 >conftest.err
12319 rm -f conftest.er1
12320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012322 (exit $ac_status); } && {
12323 test -z "$ac_c_werror_flag" ||
12324 test ! -s conftest.err
12325 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012326 ac_lo=0 ac_mid=0
12327 while :; do
12328 cat >conftest.$ac_ext <<_ACEOF
12329/* confdefs.h. */
12330_ACEOF
12331cat confdefs.h >>conftest.$ac_ext
12332cat >>conftest.$ac_ext <<_ACEOF
12333/* end confdefs.h. */
12334$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012336int
12337main ()
12338{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340test_array [0] = 0
12341
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347if { (ac_try="$ac_compile"
12348case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354 ac_status=$?
12355 grep -v '^ *+' conftest.er1 >conftest.err
12356 rm -f conftest.er1
12357 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359 (exit $ac_status); } && {
12360 test -z "$ac_c_werror_flag" ||
12361 test ! -s conftest.err
12362 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012363 ac_hi=$ac_mid; break
12364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012365 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012366sed 's/^/| /' conftest.$ac_ext >&5
12367
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 ac_lo=`expr $ac_mid + 1`
12369 if test $ac_lo -le $ac_mid; then
12370 ac_lo= ac_hi=
12371 break
12372 fi
12373 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375
12376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 done
12378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012383/* confdefs.h. */
12384_ACEOF
12385cat confdefs.h >>conftest.$ac_ext
12386cat >>conftest.$ac_ext <<_ACEOF
12387/* end confdefs.h. */
12388$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012389 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012390int
12391main ()
12392{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394test_array [0] = 0
12395
12396 ;
12397 return 0;
12398}
12399_ACEOF
12400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401if { (ac_try="$ac_compile"
12402case "(($ac_try" in
12403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12404 *) ac_try_echo=$ac_try;;
12405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012408 ac_status=$?
12409 grep -v '^ *+' conftest.er1 >conftest.err
12410 rm -f conftest.er1
12411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413 (exit $ac_status); } && {
12414 test -z "$ac_c_werror_flag" ||
12415 test ! -s conftest.err
12416 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012417 ac_hi=-1 ac_mid=-1
12418 while :; do
12419 cat >conftest.$ac_ext <<_ACEOF
12420/* confdefs.h. */
12421_ACEOF
12422cat confdefs.h >>conftest.$ac_ext
12423cat >>conftest.$ac_ext <<_ACEOF
12424/* end confdefs.h. */
12425$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012426 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427int
12428main ()
12429{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012431test_array [0] = 0
12432
12433 ;
12434 return 0;
12435}
12436_ACEOF
12437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438if { (ac_try="$ac_compile"
12439case "(($ac_try" in
12440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12441 *) ac_try_echo=$ac_try;;
12442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445 ac_status=$?
12446 grep -v '^ *+' conftest.er1 >conftest.err
12447 rm -f conftest.er1
12448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450 (exit $ac_status); } && {
12451 test -z "$ac_c_werror_flag" ||
12452 test ! -s conftest.err
12453 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012454 ac_lo=$ac_mid; break
12455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012456 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457sed 's/^/| /' conftest.$ac_ext >&5
12458
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459 ac_hi=`expr '(' $ac_mid ')' - 1`
12460 if test $ac_mid -le $ac_hi; then
12461 ac_lo= ac_hi=
12462 break
12463 fi
12464 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466
12467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012468 done
12469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012470 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012471sed 's/^/| /' conftest.$ac_ext >&5
12472
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012475
12476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012478
12479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012480# Binary search between lo and hi bounds.
12481while test "x$ac_lo" != "x$ac_hi"; do
12482 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12483 cat >conftest.$ac_ext <<_ACEOF
12484/* confdefs.h. */
12485_ACEOF
12486cat confdefs.h >>conftest.$ac_ext
12487cat >>conftest.$ac_ext <<_ACEOF
12488/* end confdefs.h. */
12489$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491int
12492main ()
12493{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012495test_array [0] = 0
12496
12497 ;
12498 return 0;
12499}
12500_ACEOF
12501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012502if { (ac_try="$ac_compile"
12503case "(($ac_try" in
12504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12505 *) ac_try_echo=$ac_try;;
12506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012509 ac_status=$?
12510 grep -v '^ *+' conftest.er1 >conftest.err
12511 rm -f conftest.er1
12512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 (exit $ac_status); } && {
12515 test -z "$ac_c_werror_flag" ||
12516 test ! -s conftest.err
12517 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012518 ac_hi=$ac_mid
12519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012520 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521sed 's/^/| /' conftest.$ac_ext >&5
12522
Martin v. Löwiseba40652007-08-30 20:10:57 +000012523 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525
12526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527done
12528case $ac_lo in
12529?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012530'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012532See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012533echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012535 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536 else
12537 ac_cv_sizeof__Bool=0
12538 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012539esac
12540else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012541 cat >conftest.$ac_ext <<_ACEOF
12542/* confdefs.h. */
12543_ACEOF
12544cat confdefs.h >>conftest.$ac_ext
12545cat >>conftest.$ac_ext <<_ACEOF
12546/* end confdefs.h. */
12547$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012548 typedef _Bool ac__type_sizeof_;
12549static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12550static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012551#include <stdio.h>
12552#include <stdlib.h>
12553int
12554main ()
12555{
12556
12557 FILE *f = fopen ("conftest.val", "w");
12558 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012560 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012561 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012563 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012565 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012566 }
12567 else
12568 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012571 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012572 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012573 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012575
12576 ;
12577 return 0;
12578}
12579_ACEOF
12580rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581if { (ac_try="$ac_link"
12582case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012587 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012588 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 { (case "(($ac_try" in
12592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12593 *) ac_try_echo=$ac_try;;
12594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012597 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012599 (exit $ac_status); }; }; then
12600 ac_cv_sizeof__Bool=`cat conftest.val`
12601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012602 echo "$as_me: program exited with status $ac_status" >&5
12603echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012604sed 's/^/| /' conftest.$ac_ext >&5
12605
12606( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012608 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012609See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012610echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012611See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012612 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613 else
12614 ac_cv_sizeof__Bool=0
12615 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617rm -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 +000012618fi
12619rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012620fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012621{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12622echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623
12624
12625
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012626cat >>confdefs.h <<_ACEOF
12627#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12628_ACEOF
12629
12630
12631fi
12632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012633{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12634echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012635if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012636 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012637else
12638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* confdefs.h. */
12640_ACEOF
12641cat confdefs.h >>conftest.$ac_ext
12642cat >>conftest.$ac_ext <<_ACEOF
12643/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012644#ifdef HAVE_STDINT_H
12645 #include <stdint.h>
12646 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012648typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012649int
12650main ()
12651{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012652if ((ac__type_new_ *) 0)
12653 return 0;
12654if (sizeof (ac__type_new_))
12655 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ;
12657 return 0;
12658}
12659_ACEOF
12660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661if { (ac_try="$ac_compile"
12662case "(($ac_try" in
12663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12664 *) ac_try_echo=$ac_try;;
12665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012669 grep -v '^ *+' conftest.er1 >conftest.err
12670 rm -f conftest.er1
12671 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673 (exit $ac_status); } && {
12674 test -z "$ac_c_werror_flag" ||
12675 test ! -s conftest.err
12676 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012677 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012680sed 's/^/| /' conftest.$ac_ext >&5
12681
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012682 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012684
12685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012686fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012687{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12688echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12689if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012690
12691cat >>confdefs.h <<_ACEOF
12692#define HAVE_UINTPTR_T 1
12693_ACEOF
12694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012695{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12696echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12697if test "${ac_cv_type_uintptr_t+set}" = set; then
12698 echo $ECHO_N "(cached) $ECHO_C" >&6
12699else
12700 cat >conftest.$ac_ext <<_ACEOF
12701/* confdefs.h. */
12702_ACEOF
12703cat confdefs.h >>conftest.$ac_ext
12704cat >>conftest.$ac_ext <<_ACEOF
12705/* end confdefs.h. */
12706$ac_includes_default
12707typedef uintptr_t ac__type_new_;
12708int
12709main ()
12710{
12711if ((ac__type_new_ *) 0)
12712 return 0;
12713if (sizeof (ac__type_new_))
12714 return 0;
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719rm -f conftest.$ac_objext
12720if { (ac_try="$ac_compile"
12721case "(($ac_try" in
12722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12723 *) ac_try_echo=$ac_try;;
12724esac
12725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12726 (eval "$ac_compile") 2>conftest.er1
12727 ac_status=$?
12728 grep -v '^ *+' conftest.er1 >conftest.err
12729 rm -f conftest.er1
12730 cat conftest.err >&5
12731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12732 (exit $ac_status); } && {
12733 test -z "$ac_c_werror_flag" ||
12734 test ! -s conftest.err
12735 } && test -s conftest.$ac_objext; then
12736 ac_cv_type_uintptr_t=yes
12737else
12738 echo "$as_me: failed program was:" >&5
12739sed 's/^/| /' conftest.$ac_ext >&5
12740
12741 ac_cv_type_uintptr_t=no
12742fi
12743
12744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12745fi
12746{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12747echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12748
Martin v. Löwiseba40652007-08-30 20:10:57 +000012749# The cast to long int works around a bug in the HP C Compiler
12750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12752# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012753{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12754echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012755if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012756 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012757else
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 if test "$cross_compiling" = yes; then
12759 # Depending upon the size, compute the lo and hi bounds.
12760cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* confdefs.h. */
12762_ACEOF
12763cat confdefs.h >>conftest.$ac_ext
12764cat >>conftest.$ac_ext <<_ACEOF
12765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012766$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012767 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012768int
12769main ()
12770{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012772test_array [0] = 0
12773
12774 ;
12775 return 0;
12776}
12777_ACEOF
12778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012779if { (ac_try="$ac_compile"
12780case "(($ac_try" in
12781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12782 *) ac_try_echo=$ac_try;;
12783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012787 grep -v '^ *+' conftest.er1 >conftest.err
12788 rm -f conftest.er1
12789 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012791 (exit $ac_status); } && {
12792 test -z "$ac_c_werror_flag" ||
12793 test ! -s conftest.err
12794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ac_lo=0 ac_mid=0
12796 while :; do
12797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012798/* confdefs.h. */
12799_ACEOF
12800cat confdefs.h >>conftest.$ac_ext
12801cat >>conftest.$ac_ext <<_ACEOF
12802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012803$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012805int
12806main ()
12807{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012809test_array [0] = 0
12810
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816if { (ac_try="$ac_compile"
12817case "(($ac_try" in
12818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12819 *) ac_try_echo=$ac_try;;
12820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012824 grep -v '^ *+' conftest.er1 >conftest.err
12825 rm -f conftest.er1
12826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828 (exit $ac_status); } && {
12829 test -z "$ac_c_werror_flag" ||
12830 test ! -s conftest.err
12831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ac_hi=$ac_mid; break
12833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012835sed 's/^/| /' conftest.$ac_ext >&5
12836
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837 ac_lo=`expr $ac_mid + 1`
12838 if test $ac_lo -le $ac_mid; then
12839 ac_lo= ac_hi=
12840 break
12841 fi
12842 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012844
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 done
12847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012852/* confdefs.h. */
12853_ACEOF
12854cat confdefs.h >>conftest.$ac_ext
12855cat >>conftest.$ac_ext <<_ACEOF
12856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012857$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012858 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012863test_array [0] = 0
12864
12865 ;
12866 return 0;
12867}
12868_ACEOF
12869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870if { (ac_try="$ac_compile"
12871case "(($ac_try" in
12872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12873 *) ac_try_echo=$ac_try;;
12874esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012878 grep -v '^ *+' conftest.er1 >conftest.err
12879 rm -f conftest.er1
12880 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012882 (exit $ac_status); } && {
12883 test -z "$ac_c_werror_flag" ||
12884 test ! -s conftest.err
12885 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 ac_hi=-1 ac_mid=-1
12887 while :; do
12888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012889/* confdefs.h. */
12890_ACEOF
12891cat confdefs.h >>conftest.$ac_ext
12892cat >>conftest.$ac_ext <<_ACEOF
12893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012894$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012895 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012896int
12897main ()
12898{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012899static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012900test_array [0] = 0
12901
12902 ;
12903 return 0;
12904}
12905_ACEOF
12906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907if { (ac_try="$ac_compile"
12908case "(($ac_try" in
12909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12910 *) ac_try_echo=$ac_try;;
12911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012915 grep -v '^ *+' conftest.er1 >conftest.err
12916 rm -f conftest.er1
12917 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012919 (exit $ac_status); } && {
12920 test -z "$ac_c_werror_flag" ||
12921 test ! -s conftest.err
12922 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 ac_lo=$ac_mid; break
12924else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012926sed 's/^/| /' conftest.$ac_ext >&5
12927
Martin v. Löwiseba40652007-08-30 20:10:57 +000012928 ac_hi=`expr '(' $ac_mid ')' - 1`
12929 if test $ac_mid -le $ac_hi; then
12930 ac_lo= ac_hi=
12931 break
12932 fi
12933 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012935
12936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 done
12938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012940sed 's/^/| /' conftest.$ac_ext >&5
12941
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944
12945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947
12948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012949# Binary search between lo and hi bounds.
12950while test "x$ac_lo" != "x$ac_hi"; do
12951 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012953/* confdefs.h. */
12954_ACEOF
12955cat confdefs.h >>conftest.$ac_ext
12956cat >>conftest.$ac_ext <<_ACEOF
12957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012958$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012960int
12961main ()
12962{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012963static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012964test_array [0] = 0
12965
12966 ;
12967 return 0;
12968}
12969_ACEOF
12970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012971if { (ac_try="$ac_compile"
12972case "(($ac_try" in
12973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12974 *) ac_try_echo=$ac_try;;
12975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012979 grep -v '^ *+' conftest.er1 >conftest.err
12980 rm -f conftest.er1
12981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 (exit $ac_status); } && {
12984 test -z "$ac_c_werror_flag" ||
12985 test ! -s conftest.err
12986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 ac_hi=$ac_mid
12988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012990sed 's/^/| /' conftest.$ac_ext >&5
12991
Martin v. Löwiseba40652007-08-30 20:10:57 +000012992 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012994
12995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012996done
12997case $ac_lo in
12998?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012999'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013000 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013001See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013002echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013003See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013004 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 else
13006 ac_cv_sizeof_uintptr_t=0
13007 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013008esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013009else
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013011/* confdefs.h. */
13012_ACEOF
13013cat confdefs.h >>conftest.$ac_ext
13014cat >>conftest.$ac_ext <<_ACEOF
13015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013016$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013017 typedef uintptr_t ac__type_sizeof_;
13018static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13019static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013020#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013021#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013022int
13023main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013024{
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
13026 FILE *f = fopen ("conftest.val", "w");
13027 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013031 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013032 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013034 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 }
13036 else
13037 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013038 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013039 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013041 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
13045 ;
13046 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013047}
Martin v. Löwis11437992002-04-12 09:54:03 +000013048_ACEOF
13049rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013050if { (ac_try="$ac_link"
13051case "(($ac_try" in
13052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13053 *) ac_try_echo=$ac_try;;
13054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060 { (case "(($ac_try" in
13061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13062 *) ac_try_echo=$ac_try;;
13063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013068 (exit $ac_status); }; }; then
13069 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013071 echo "$as_me: program exited with status $ac_status" >&5
13072echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013073sed 's/^/| /' conftest.$ac_ext >&5
13074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013076if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013077 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013078See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013079echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013080See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013081 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013082 else
13083 ac_cv_sizeof_uintptr_t=0
13084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086rm -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 +000013087fi
13088rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013090{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13091echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013092
13093
13094
Martin v. Löwis11437992002-04-12 09:54:03 +000013095cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013096#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013097_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013098
Michael W. Hudson54241132001-12-07 15:38:26 +000013099
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013100fi
13101
Martin v. Löwisebe26702006-10-02 14:55:51 +000013102
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013103{ echo "$as_me:$LINENO: checking for off_t" >&5
13104echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13105if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* confdefs.h. */
13110_ACEOF
13111cat confdefs.h >>conftest.$ac_ext
13112cat >>conftest.$ac_ext <<_ACEOF
13113/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013114
13115#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013116#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013117#endif
13118
13119
13120typedef off_t ac__type_new_;
13121int
13122main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013123{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013124if ((ac__type_new_ *) 0)
13125 return 0;
13126if (sizeof (ac__type_new_))
13127 return 0;
13128 ;
13129 return 0;
13130}
13131_ACEOF
13132rm -f conftest.$ac_objext
13133if { (ac_try="$ac_compile"
13134case "(($ac_try" in
13135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13136 *) ac_try_echo=$ac_try;;
13137esac
13138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13139 (eval "$ac_compile") 2>conftest.er1
13140 ac_status=$?
13141 grep -v '^ *+' conftest.er1 >conftest.err
13142 rm -f conftest.er1
13143 cat conftest.err >&5
13144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145 (exit $ac_status); } && {
13146 test -z "$ac_c_werror_flag" ||
13147 test ! -s conftest.err
13148 } && test -s conftest.$ac_objext; then
13149 ac_cv_type_off_t=yes
13150else
13151 echo "$as_me: failed program was:" >&5
13152sed 's/^/| /' conftest.$ac_ext >&5
13153
13154 ac_cv_type_off_t=no
13155fi
13156
13157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13158fi
13159{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13160echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13161
13162# The cast to long int works around a bug in the HP C Compiler
13163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13165# This bug is HP SR number 8606223364.
13166{ echo "$as_me:$LINENO: checking size of off_t" >&5
13167echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13168if test "${ac_cv_sizeof_off_t+set}" = set; then
13169 echo $ECHO_N "(cached) $ECHO_C" >&6
13170else
13171 if test "$cross_compiling" = yes; then
13172 # Depending upon the size, compute the lo and hi bounds.
13173cat >conftest.$ac_ext <<_ACEOF
13174/* confdefs.h. */
13175_ACEOF
13176cat confdefs.h >>conftest.$ac_ext
13177cat >>conftest.$ac_ext <<_ACEOF
13178/* end confdefs.h. */
13179
13180#ifdef HAVE_SYS_TYPES_H
13181#include <sys/types.h>
13182#endif
13183
13184
13185 typedef off_t ac__type_sizeof_;
13186int
13187main ()
13188{
13189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13190test_array [0] = 0
13191
13192 ;
13193 return 0;
13194}
13195_ACEOF
13196rm -f conftest.$ac_objext
13197if { (ac_try="$ac_compile"
13198case "(($ac_try" in
13199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13200 *) ac_try_echo=$ac_try;;
13201esac
13202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13203 (eval "$ac_compile") 2>conftest.er1
13204 ac_status=$?
13205 grep -v '^ *+' conftest.er1 >conftest.err
13206 rm -f conftest.er1
13207 cat conftest.err >&5
13208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); } && {
13210 test -z "$ac_c_werror_flag" ||
13211 test ! -s conftest.err
13212 } && test -s conftest.$ac_objext; then
13213 ac_lo=0 ac_mid=0
13214 while :; do
13215 cat >conftest.$ac_ext <<_ACEOF
13216/* confdefs.h. */
13217_ACEOF
13218cat confdefs.h >>conftest.$ac_ext
13219cat >>conftest.$ac_ext <<_ACEOF
13220/* end confdefs.h. */
13221
13222#ifdef HAVE_SYS_TYPES_H
13223#include <sys/types.h>
13224#endif
13225
13226
13227 typedef off_t ac__type_sizeof_;
13228int
13229main ()
13230{
13231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13232test_array [0] = 0
13233
13234 ;
13235 return 0;
13236}
13237_ACEOF
13238rm -f conftest.$ac_objext
13239if { (ac_try="$ac_compile"
13240case "(($ac_try" in
13241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13242 *) ac_try_echo=$ac_try;;
13243esac
13244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13245 (eval "$ac_compile") 2>conftest.er1
13246 ac_status=$?
13247 grep -v '^ *+' conftest.er1 >conftest.err
13248 rm -f conftest.er1
13249 cat conftest.err >&5
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } && {
13252 test -z "$ac_c_werror_flag" ||
13253 test ! -s conftest.err
13254 } && test -s conftest.$ac_objext; then
13255 ac_hi=$ac_mid; break
13256else
13257 echo "$as_me: failed program was:" >&5
13258sed 's/^/| /' conftest.$ac_ext >&5
13259
13260 ac_lo=`expr $ac_mid + 1`
13261 if test $ac_lo -le $ac_mid; then
13262 ac_lo= ac_hi=
13263 break
13264 fi
13265 ac_mid=`expr 2 '*' $ac_mid + 1`
13266fi
13267
13268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13269 done
13270else
13271 echo "$as_me: failed program was:" >&5
13272sed 's/^/| /' conftest.$ac_ext >&5
13273
13274 cat >conftest.$ac_ext <<_ACEOF
13275/* confdefs.h. */
13276_ACEOF
13277cat confdefs.h >>conftest.$ac_ext
13278cat >>conftest.$ac_ext <<_ACEOF
13279/* end confdefs.h. */
13280
13281#ifdef HAVE_SYS_TYPES_H
13282#include <sys/types.h>
13283#endif
13284
13285
13286 typedef off_t ac__type_sizeof_;
13287int
13288main ()
13289{
13290static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13291test_array [0] = 0
13292
13293 ;
13294 return 0;
13295}
13296_ACEOF
13297rm -f conftest.$ac_objext
13298if { (ac_try="$ac_compile"
13299case "(($ac_try" in
13300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13301 *) ac_try_echo=$ac_try;;
13302esac
13303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13304 (eval "$ac_compile") 2>conftest.er1
13305 ac_status=$?
13306 grep -v '^ *+' conftest.er1 >conftest.err
13307 rm -f conftest.er1
13308 cat conftest.err >&5
13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310 (exit $ac_status); } && {
13311 test -z "$ac_c_werror_flag" ||
13312 test ! -s conftest.err
13313 } && test -s conftest.$ac_objext; then
13314 ac_hi=-1 ac_mid=-1
13315 while :; do
13316 cat >conftest.$ac_ext <<_ACEOF
13317/* confdefs.h. */
13318_ACEOF
13319cat confdefs.h >>conftest.$ac_ext
13320cat >>conftest.$ac_ext <<_ACEOF
13321/* end confdefs.h. */
13322
13323#ifdef HAVE_SYS_TYPES_H
13324#include <sys/types.h>
13325#endif
13326
13327
13328 typedef off_t ac__type_sizeof_;
13329int
13330main ()
13331{
13332static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13333test_array [0] = 0
13334
13335 ;
13336 return 0;
13337}
13338_ACEOF
13339rm -f conftest.$ac_objext
13340if { (ac_try="$ac_compile"
13341case "(($ac_try" in
13342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13343 *) ac_try_echo=$ac_try;;
13344esac
13345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13346 (eval "$ac_compile") 2>conftest.er1
13347 ac_status=$?
13348 grep -v '^ *+' conftest.er1 >conftest.err
13349 rm -f conftest.er1
13350 cat conftest.err >&5
13351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13352 (exit $ac_status); } && {
13353 test -z "$ac_c_werror_flag" ||
13354 test ! -s conftest.err
13355 } && test -s conftest.$ac_objext; then
13356 ac_lo=$ac_mid; break
13357else
13358 echo "$as_me: failed program was:" >&5
13359sed 's/^/| /' conftest.$ac_ext >&5
13360
13361 ac_hi=`expr '(' $ac_mid ')' - 1`
13362 if test $ac_mid -le $ac_hi; then
13363 ac_lo= ac_hi=
13364 break
13365 fi
13366 ac_mid=`expr 2 '*' $ac_mid`
13367fi
13368
13369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13370 done
13371else
13372 echo "$as_me: failed program was:" >&5
13373sed 's/^/| /' conftest.$ac_ext >&5
13374
13375 ac_lo= ac_hi=
13376fi
13377
13378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13379fi
13380
13381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13382# Binary search between lo and hi bounds.
13383while test "x$ac_lo" != "x$ac_hi"; do
13384 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13385 cat >conftest.$ac_ext <<_ACEOF
13386/* confdefs.h. */
13387_ACEOF
13388cat confdefs.h >>conftest.$ac_ext
13389cat >>conftest.$ac_ext <<_ACEOF
13390/* end confdefs.h. */
13391
13392#ifdef HAVE_SYS_TYPES_H
13393#include <sys/types.h>
13394#endif
13395
13396
13397 typedef off_t ac__type_sizeof_;
13398int
13399main ()
13400{
13401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13402test_array [0] = 0
13403
13404 ;
13405 return 0;
13406}
13407_ACEOF
13408rm -f conftest.$ac_objext
13409if { (ac_try="$ac_compile"
13410case "(($ac_try" in
13411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13412 *) ac_try_echo=$ac_try;;
13413esac
13414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13415 (eval "$ac_compile") 2>conftest.er1
13416 ac_status=$?
13417 grep -v '^ *+' conftest.er1 >conftest.err
13418 rm -f conftest.er1
13419 cat conftest.err >&5
13420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13421 (exit $ac_status); } && {
13422 test -z "$ac_c_werror_flag" ||
13423 test ! -s conftest.err
13424 } && test -s conftest.$ac_objext; then
13425 ac_hi=$ac_mid
13426else
13427 echo "$as_me: failed program was:" >&5
13428sed 's/^/| /' conftest.$ac_ext >&5
13429
13430 ac_lo=`expr '(' $ac_mid ')' + 1`
13431fi
13432
13433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13434done
13435case $ac_lo in
13436?*) ac_cv_sizeof_off_t=$ac_lo;;
13437'') if test "$ac_cv_type_off_t" = yes; then
13438 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13439See \`config.log' for more details." >&5
13440echo "$as_me: error: cannot compute sizeof (off_t)
13441See \`config.log' for more details." >&2;}
13442 { (exit 77); exit 77; }; }
13443 else
13444 ac_cv_sizeof_off_t=0
13445 fi ;;
13446esac
13447else
13448 cat >conftest.$ac_ext <<_ACEOF
13449/* confdefs.h. */
13450_ACEOF
13451cat confdefs.h >>conftest.$ac_ext
13452cat >>conftest.$ac_ext <<_ACEOF
13453/* end confdefs.h. */
13454
13455#ifdef HAVE_SYS_TYPES_H
13456#include <sys/types.h>
13457#endif
13458
13459
13460 typedef off_t ac__type_sizeof_;
13461static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13462static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13463#include <stdio.h>
13464#include <stdlib.h>
13465int
13466main ()
13467{
13468
13469 FILE *f = fopen ("conftest.val", "w");
13470 if (! f)
13471 return 1;
13472 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13473 {
13474 long int i = longval ();
13475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13476 return 1;
13477 fprintf (f, "%ld\n", i);
13478 }
13479 else
13480 {
13481 unsigned long int i = ulongval ();
13482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13483 return 1;
13484 fprintf (f, "%lu\n", i);
13485 }
13486 return ferror (f) || fclose (f) != 0;
13487
13488 ;
13489 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013490}
Martin v. Löwis11437992002-04-12 09:54:03 +000013491_ACEOF
13492rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013493if { (ac_try="$ac_link"
13494case "(($ac_try" in
13495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13496 *) ac_try_echo=$ac_try;;
13497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013499 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503 { (case "(($ac_try" in
13504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13505 *) ac_try_echo=$ac_try;;
13506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013508 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013512 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013514 echo "$as_me: program exited with status $ac_status" >&5
13515echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013516sed 's/^/| /' conftest.$ac_ext >&5
13517
Martin v. Löwis11437992002-04-12 09:54:03 +000013518( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013519if test "$ac_cv_type_off_t" = yes; then
13520 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13521See \`config.log' for more details." >&5
13522echo "$as_me: error: cannot compute sizeof (off_t)
13523See \`config.log' for more details." >&2;}
13524 { (exit 77); exit 77; }; }
13525 else
13526 ac_cv_sizeof_off_t=0
13527 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529rm -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 +000013530fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013531rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013532fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013533{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13534echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013536
13537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013539#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013540_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013541
Michael W. Hudson54241132001-12-07 15:38:26 +000013542
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013543
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013544{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13545echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013546if test "$have_long_long" = yes
13547then
13548if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013549 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551cat >>confdefs.h <<\_ACEOF
13552#define HAVE_LARGEFILE_SUPPORT 1
13553_ACEOF
13554
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013555 { echo "$as_me:$LINENO: result: yes" >&5
13556echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013557else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013558 { echo "$as_me:$LINENO: result: no" >&5
13559echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013560fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013561else
13562 { echo "$as_me:$LINENO: result: no" >&5
13563echo "${ECHO_T}no" >&6; }
13564fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013565
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013566{ echo "$as_me:$LINENO: checking for time_t" >&5
13567echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13568if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013570else
Martin v. Löwis11437992002-04-12 09:54:03 +000013571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013572/* confdefs.h. */
13573_ACEOF
13574cat confdefs.h >>conftest.$ac_ext
13575cat >>conftest.$ac_ext <<_ACEOF
13576/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013577
13578#ifdef HAVE_SYS_TYPES_H
13579#include <sys/types.h>
13580#endif
13581#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013582#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013583#endif
13584
13585
13586typedef time_t ac__type_new_;
13587int
13588main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013589{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013590if ((ac__type_new_ *) 0)
13591 return 0;
13592if (sizeof (ac__type_new_))
13593 return 0;
13594 ;
13595 return 0;
13596}
13597_ACEOF
13598rm -f conftest.$ac_objext
13599if { (ac_try="$ac_compile"
13600case "(($ac_try" in
13601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13602 *) ac_try_echo=$ac_try;;
13603esac
13604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13605 (eval "$ac_compile") 2>conftest.er1
13606 ac_status=$?
13607 grep -v '^ *+' conftest.er1 >conftest.err
13608 rm -f conftest.er1
13609 cat conftest.err >&5
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); } && {
13612 test -z "$ac_c_werror_flag" ||
13613 test ! -s conftest.err
13614 } && test -s conftest.$ac_objext; then
13615 ac_cv_type_time_t=yes
13616else
13617 echo "$as_me: failed program was:" >&5
13618sed 's/^/| /' conftest.$ac_ext >&5
13619
13620 ac_cv_type_time_t=no
13621fi
13622
13623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13624fi
13625{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13626echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13627
13628# The cast to long int works around a bug in the HP C Compiler
13629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13631# This bug is HP SR number 8606223364.
13632{ echo "$as_me:$LINENO: checking size of time_t" >&5
13633echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13634if test "${ac_cv_sizeof_time_t+set}" = set; then
13635 echo $ECHO_N "(cached) $ECHO_C" >&6
13636else
13637 if test "$cross_compiling" = yes; then
13638 # Depending upon the size, compute the lo and hi bounds.
13639cat >conftest.$ac_ext <<_ACEOF
13640/* confdefs.h. */
13641_ACEOF
13642cat confdefs.h >>conftest.$ac_ext
13643cat >>conftest.$ac_ext <<_ACEOF
13644/* end confdefs.h. */
13645
13646#ifdef HAVE_SYS_TYPES_H
13647#include <sys/types.h>
13648#endif
13649#ifdef HAVE_TIME_H
13650#include <time.h>
13651#endif
13652
13653
13654 typedef time_t ac__type_sizeof_;
13655int
13656main ()
13657{
13658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13659test_array [0] = 0
13660
13661 ;
13662 return 0;
13663}
13664_ACEOF
13665rm -f conftest.$ac_objext
13666if { (ac_try="$ac_compile"
13667case "(($ac_try" in
13668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13669 *) ac_try_echo=$ac_try;;
13670esac
13671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13672 (eval "$ac_compile") 2>conftest.er1
13673 ac_status=$?
13674 grep -v '^ *+' conftest.er1 >conftest.err
13675 rm -f conftest.er1
13676 cat conftest.err >&5
13677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13678 (exit $ac_status); } && {
13679 test -z "$ac_c_werror_flag" ||
13680 test ! -s conftest.err
13681 } && test -s conftest.$ac_objext; then
13682 ac_lo=0 ac_mid=0
13683 while :; do
13684 cat >conftest.$ac_ext <<_ACEOF
13685/* confdefs.h. */
13686_ACEOF
13687cat confdefs.h >>conftest.$ac_ext
13688cat >>conftest.$ac_ext <<_ACEOF
13689/* end confdefs.h. */
13690
13691#ifdef HAVE_SYS_TYPES_H
13692#include <sys/types.h>
13693#endif
13694#ifdef HAVE_TIME_H
13695#include <time.h>
13696#endif
13697
13698
13699 typedef time_t ac__type_sizeof_;
13700int
13701main ()
13702{
13703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13704test_array [0] = 0
13705
13706 ;
13707 return 0;
13708}
13709_ACEOF
13710rm -f conftest.$ac_objext
13711if { (ac_try="$ac_compile"
13712case "(($ac_try" in
13713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13714 *) ac_try_echo=$ac_try;;
13715esac
13716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13717 (eval "$ac_compile") 2>conftest.er1
13718 ac_status=$?
13719 grep -v '^ *+' conftest.er1 >conftest.err
13720 rm -f conftest.er1
13721 cat conftest.err >&5
13722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13723 (exit $ac_status); } && {
13724 test -z "$ac_c_werror_flag" ||
13725 test ! -s conftest.err
13726 } && test -s conftest.$ac_objext; then
13727 ac_hi=$ac_mid; break
13728else
13729 echo "$as_me: failed program was:" >&5
13730sed 's/^/| /' conftest.$ac_ext >&5
13731
13732 ac_lo=`expr $ac_mid + 1`
13733 if test $ac_lo -le $ac_mid; then
13734 ac_lo= ac_hi=
13735 break
13736 fi
13737 ac_mid=`expr 2 '*' $ac_mid + 1`
13738fi
13739
13740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13741 done
13742else
13743 echo "$as_me: failed program was:" >&5
13744sed 's/^/| /' conftest.$ac_ext >&5
13745
13746 cat >conftest.$ac_ext <<_ACEOF
13747/* confdefs.h. */
13748_ACEOF
13749cat confdefs.h >>conftest.$ac_ext
13750cat >>conftest.$ac_ext <<_ACEOF
13751/* end confdefs.h. */
13752
13753#ifdef HAVE_SYS_TYPES_H
13754#include <sys/types.h>
13755#endif
13756#ifdef HAVE_TIME_H
13757#include <time.h>
13758#endif
13759
13760
13761 typedef time_t ac__type_sizeof_;
13762int
13763main ()
13764{
13765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13766test_array [0] = 0
13767
13768 ;
13769 return 0;
13770}
13771_ACEOF
13772rm -f conftest.$ac_objext
13773if { (ac_try="$ac_compile"
13774case "(($ac_try" in
13775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13776 *) ac_try_echo=$ac_try;;
13777esac
13778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13779 (eval "$ac_compile") 2>conftest.er1
13780 ac_status=$?
13781 grep -v '^ *+' conftest.er1 >conftest.err
13782 rm -f conftest.er1
13783 cat conftest.err >&5
13784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785 (exit $ac_status); } && {
13786 test -z "$ac_c_werror_flag" ||
13787 test ! -s conftest.err
13788 } && test -s conftest.$ac_objext; then
13789 ac_hi=-1 ac_mid=-1
13790 while :; do
13791 cat >conftest.$ac_ext <<_ACEOF
13792/* confdefs.h. */
13793_ACEOF
13794cat confdefs.h >>conftest.$ac_ext
13795cat >>conftest.$ac_ext <<_ACEOF
13796/* end confdefs.h. */
13797
13798#ifdef HAVE_SYS_TYPES_H
13799#include <sys/types.h>
13800#endif
13801#ifdef HAVE_TIME_H
13802#include <time.h>
13803#endif
13804
13805
13806 typedef time_t ac__type_sizeof_;
13807int
13808main ()
13809{
13810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13811test_array [0] = 0
13812
13813 ;
13814 return 0;
13815}
13816_ACEOF
13817rm -f conftest.$ac_objext
13818if { (ac_try="$ac_compile"
13819case "(($ac_try" in
13820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13821 *) ac_try_echo=$ac_try;;
13822esac
13823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13824 (eval "$ac_compile") 2>conftest.er1
13825 ac_status=$?
13826 grep -v '^ *+' conftest.er1 >conftest.err
13827 rm -f conftest.er1
13828 cat conftest.err >&5
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); } && {
13831 test -z "$ac_c_werror_flag" ||
13832 test ! -s conftest.err
13833 } && test -s conftest.$ac_objext; then
13834 ac_lo=$ac_mid; break
13835else
13836 echo "$as_me: failed program was:" >&5
13837sed 's/^/| /' conftest.$ac_ext >&5
13838
13839 ac_hi=`expr '(' $ac_mid ')' - 1`
13840 if test $ac_mid -le $ac_hi; then
13841 ac_lo= ac_hi=
13842 break
13843 fi
13844 ac_mid=`expr 2 '*' $ac_mid`
13845fi
13846
13847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13848 done
13849else
13850 echo "$as_me: failed program was:" >&5
13851sed 's/^/| /' conftest.$ac_ext >&5
13852
13853 ac_lo= ac_hi=
13854fi
13855
13856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13857fi
13858
13859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13860# Binary search between lo and hi bounds.
13861while test "x$ac_lo" != "x$ac_hi"; do
13862 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13863 cat >conftest.$ac_ext <<_ACEOF
13864/* confdefs.h. */
13865_ACEOF
13866cat confdefs.h >>conftest.$ac_ext
13867cat >>conftest.$ac_ext <<_ACEOF
13868/* end confdefs.h. */
13869
13870#ifdef HAVE_SYS_TYPES_H
13871#include <sys/types.h>
13872#endif
13873#ifdef HAVE_TIME_H
13874#include <time.h>
13875#endif
13876
13877
13878 typedef time_t ac__type_sizeof_;
13879int
13880main ()
13881{
13882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13883test_array [0] = 0
13884
13885 ;
13886 return 0;
13887}
13888_ACEOF
13889rm -f conftest.$ac_objext
13890if { (ac_try="$ac_compile"
13891case "(($ac_try" in
13892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13893 *) ac_try_echo=$ac_try;;
13894esac
13895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13896 (eval "$ac_compile") 2>conftest.er1
13897 ac_status=$?
13898 grep -v '^ *+' conftest.er1 >conftest.err
13899 rm -f conftest.er1
13900 cat conftest.err >&5
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); } && {
13903 test -z "$ac_c_werror_flag" ||
13904 test ! -s conftest.err
13905 } && test -s conftest.$ac_objext; then
13906 ac_hi=$ac_mid
13907else
13908 echo "$as_me: failed program was:" >&5
13909sed 's/^/| /' conftest.$ac_ext >&5
13910
13911 ac_lo=`expr '(' $ac_mid ')' + 1`
13912fi
13913
13914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915done
13916case $ac_lo in
13917?*) ac_cv_sizeof_time_t=$ac_lo;;
13918'') if test "$ac_cv_type_time_t" = yes; then
13919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13920See \`config.log' for more details." >&5
13921echo "$as_me: error: cannot compute sizeof (time_t)
13922See \`config.log' for more details." >&2;}
13923 { (exit 77); exit 77; }; }
13924 else
13925 ac_cv_sizeof_time_t=0
13926 fi ;;
13927esac
13928else
13929 cat >conftest.$ac_ext <<_ACEOF
13930/* confdefs.h. */
13931_ACEOF
13932cat confdefs.h >>conftest.$ac_ext
13933cat >>conftest.$ac_ext <<_ACEOF
13934/* end confdefs.h. */
13935
13936#ifdef HAVE_SYS_TYPES_H
13937#include <sys/types.h>
13938#endif
13939#ifdef HAVE_TIME_H
13940#include <time.h>
13941#endif
13942
13943
13944 typedef time_t ac__type_sizeof_;
13945static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13946static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13947#include <stdio.h>
13948#include <stdlib.h>
13949int
13950main ()
13951{
13952
13953 FILE *f = fopen ("conftest.val", "w");
13954 if (! f)
13955 return 1;
13956 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13957 {
13958 long int i = longval ();
13959 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13960 return 1;
13961 fprintf (f, "%ld\n", i);
13962 }
13963 else
13964 {
13965 unsigned long int i = ulongval ();
13966 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13967 return 1;
13968 fprintf (f, "%lu\n", i);
13969 }
13970 return ferror (f) || fclose (f) != 0;
13971
13972 ;
13973 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013974}
Martin v. Löwis11437992002-04-12 09:54:03 +000013975_ACEOF
13976rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013977if { (ac_try="$ac_link"
13978case "(($ac_try" in
13979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13980 *) ac_try_echo=$ac_try;;
13981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013983 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987 { (case "(($ac_try" in
13988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13989 *) ac_try_echo=$ac_try;;
13990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013996 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013998 echo "$as_me: program exited with status $ac_status" >&5
13999echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014000sed 's/^/| /' conftest.$ac_ext >&5
14001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014003if test "$ac_cv_type_time_t" = yes; then
14004 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
14005See \`config.log' for more details." >&5
14006echo "$as_me: error: cannot compute sizeof (time_t)
14007See \`config.log' for more details." >&2;}
14008 { (exit 77); exit 77; }; }
14009 else
14010 ac_cv_sizeof_time_t=0
14011 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014013rm -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 +000014014fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014015rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014016fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014017{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14018echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014020
14021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014023#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014024_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014025
Michael W. Hudson54241132001-12-07 15:38:26 +000014026
14027
Trent Mick635f6fb2000-08-23 21:33:05 +000014028# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014029ac_save_cc="$CC"
14030if test "$ac_cv_kpthread" = "yes"
14031then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014032elif test "$ac_cv_kthread" = "yes"
14033then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014034elif test "$ac_cv_pthread" = "yes"
14035then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014036fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014037{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14038echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014039have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014041/* confdefs.h. */
14042_ACEOF
14043cat confdefs.h >>conftest.$ac_ext
14044cat >>conftest.$ac_ext <<_ACEOF
14045/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014046#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014047int
14048main ()
14049{
Guido van Rossum12580492000-09-24 16:47:19 +000014050pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ;
14052 return 0;
14053}
14054_ACEOF
14055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056if { (ac_try="$ac_compile"
14057case "(($ac_try" in
14058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14059 *) ac_try_echo=$ac_try;;
14060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014064 grep -v '^ *+' conftest.er1 >conftest.err
14065 rm -f conftest.er1
14066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068 (exit $ac_status); } && {
14069 test -z "$ac_c_werror_flag" ||
14070 test ! -s conftest.err
14071 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014072 have_pthread_t=yes
14073else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014075sed 's/^/| /' conftest.$ac_ext >&5
14076
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077
Trent Mick635f6fb2000-08-23 21:33:05 +000014078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079
14080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014081{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14082echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014083if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014084 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14085echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14086if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014087 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014088else
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014090/* confdefs.h. */
14091_ACEOF
14092cat confdefs.h >>conftest.$ac_ext
14093cat >>conftest.$ac_ext <<_ACEOF
14094/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014095
14096#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014097#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014098#endif
14099
14100
14101typedef pthread_t ac__type_new_;
14102int
14103main ()
14104{
14105if ((ac__type_new_ *) 0)
14106 return 0;
14107if (sizeof (ac__type_new_))
14108 return 0;
14109 ;
14110 return 0;
14111}
14112_ACEOF
14113rm -f conftest.$ac_objext
14114if { (ac_try="$ac_compile"
14115case "(($ac_try" in
14116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14117 *) ac_try_echo=$ac_try;;
14118esac
14119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14120 (eval "$ac_compile") 2>conftest.er1
14121 ac_status=$?
14122 grep -v '^ *+' conftest.er1 >conftest.err
14123 rm -f conftest.er1
14124 cat conftest.err >&5
14125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14126 (exit $ac_status); } && {
14127 test -z "$ac_c_werror_flag" ||
14128 test ! -s conftest.err
14129 } && test -s conftest.$ac_objext; then
14130 ac_cv_type_pthread_t=yes
14131else
14132 echo "$as_me: failed program was:" >&5
14133sed 's/^/| /' conftest.$ac_ext >&5
14134
14135 ac_cv_type_pthread_t=no
14136fi
14137
14138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14139fi
14140{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14141echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14142
14143# The cast to long int works around a bug in the HP C Compiler
14144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14146# This bug is HP SR number 8606223364.
14147{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14148echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14149if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14150 echo $ECHO_N "(cached) $ECHO_C" >&6
14151else
14152 if test "$cross_compiling" = yes; then
14153 # Depending upon the size, compute the lo and hi bounds.
14154cat >conftest.$ac_ext <<_ACEOF
14155/* confdefs.h. */
14156_ACEOF
14157cat confdefs.h >>conftest.$ac_ext
14158cat >>conftest.$ac_ext <<_ACEOF
14159/* end confdefs.h. */
14160
14161#ifdef HAVE_PTHREAD_H
14162#include <pthread.h>
14163#endif
14164
14165
14166 typedef pthread_t ac__type_sizeof_;
14167int
14168main ()
14169{
14170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14171test_array [0] = 0
14172
14173 ;
14174 return 0;
14175}
14176_ACEOF
14177rm -f conftest.$ac_objext
14178if { (ac_try="$ac_compile"
14179case "(($ac_try" in
14180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14181 *) ac_try_echo=$ac_try;;
14182esac
14183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14184 (eval "$ac_compile") 2>conftest.er1
14185 ac_status=$?
14186 grep -v '^ *+' conftest.er1 >conftest.err
14187 rm -f conftest.er1
14188 cat conftest.err >&5
14189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14190 (exit $ac_status); } && {
14191 test -z "$ac_c_werror_flag" ||
14192 test ! -s conftest.err
14193 } && test -s conftest.$ac_objext; then
14194 ac_lo=0 ac_mid=0
14195 while :; do
14196 cat >conftest.$ac_ext <<_ACEOF
14197/* confdefs.h. */
14198_ACEOF
14199cat confdefs.h >>conftest.$ac_ext
14200cat >>conftest.$ac_ext <<_ACEOF
14201/* end confdefs.h. */
14202
14203#ifdef HAVE_PTHREAD_H
14204#include <pthread.h>
14205#endif
14206
14207
14208 typedef pthread_t ac__type_sizeof_;
14209int
14210main ()
14211{
14212static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14213test_array [0] = 0
14214
14215 ;
14216 return 0;
14217}
14218_ACEOF
14219rm -f conftest.$ac_objext
14220if { (ac_try="$ac_compile"
14221case "(($ac_try" in
14222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14223 *) ac_try_echo=$ac_try;;
14224esac
14225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14226 (eval "$ac_compile") 2>conftest.er1
14227 ac_status=$?
14228 grep -v '^ *+' conftest.er1 >conftest.err
14229 rm -f conftest.er1
14230 cat conftest.err >&5
14231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232 (exit $ac_status); } && {
14233 test -z "$ac_c_werror_flag" ||
14234 test ! -s conftest.err
14235 } && test -s conftest.$ac_objext; then
14236 ac_hi=$ac_mid; break
14237else
14238 echo "$as_me: failed program was:" >&5
14239sed 's/^/| /' conftest.$ac_ext >&5
14240
14241 ac_lo=`expr $ac_mid + 1`
14242 if test $ac_lo -le $ac_mid; then
14243 ac_lo= ac_hi=
14244 break
14245 fi
14246 ac_mid=`expr 2 '*' $ac_mid + 1`
14247fi
14248
14249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14250 done
14251else
14252 echo "$as_me: failed program was:" >&5
14253sed 's/^/| /' conftest.$ac_ext >&5
14254
14255 cat >conftest.$ac_ext <<_ACEOF
14256/* confdefs.h. */
14257_ACEOF
14258cat confdefs.h >>conftest.$ac_ext
14259cat >>conftest.$ac_ext <<_ACEOF
14260/* end confdefs.h. */
14261
14262#ifdef HAVE_PTHREAD_H
14263#include <pthread.h>
14264#endif
14265
14266
14267 typedef pthread_t ac__type_sizeof_;
14268int
14269main ()
14270{
14271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14272test_array [0] = 0
14273
14274 ;
14275 return 0;
14276}
14277_ACEOF
14278rm -f conftest.$ac_objext
14279if { (ac_try="$ac_compile"
14280case "(($ac_try" in
14281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14282 *) ac_try_echo=$ac_try;;
14283esac
14284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14285 (eval "$ac_compile") 2>conftest.er1
14286 ac_status=$?
14287 grep -v '^ *+' conftest.er1 >conftest.err
14288 rm -f conftest.er1
14289 cat conftest.err >&5
14290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291 (exit $ac_status); } && {
14292 test -z "$ac_c_werror_flag" ||
14293 test ! -s conftest.err
14294 } && test -s conftest.$ac_objext; then
14295 ac_hi=-1 ac_mid=-1
14296 while :; do
14297 cat >conftest.$ac_ext <<_ACEOF
14298/* confdefs.h. */
14299_ACEOF
14300cat confdefs.h >>conftest.$ac_ext
14301cat >>conftest.$ac_ext <<_ACEOF
14302/* end confdefs.h. */
14303
14304#ifdef HAVE_PTHREAD_H
14305#include <pthread.h>
14306#endif
14307
14308
14309 typedef pthread_t ac__type_sizeof_;
14310int
14311main ()
14312{
14313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14314test_array [0] = 0
14315
14316 ;
14317 return 0;
14318}
14319_ACEOF
14320rm -f conftest.$ac_objext
14321if { (ac_try="$ac_compile"
14322case "(($ac_try" in
14323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14324 *) ac_try_echo=$ac_try;;
14325esac
14326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14327 (eval "$ac_compile") 2>conftest.er1
14328 ac_status=$?
14329 grep -v '^ *+' conftest.er1 >conftest.err
14330 rm -f conftest.er1
14331 cat conftest.err >&5
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); } && {
14334 test -z "$ac_c_werror_flag" ||
14335 test ! -s conftest.err
14336 } && test -s conftest.$ac_objext; then
14337 ac_lo=$ac_mid; break
14338else
14339 echo "$as_me: failed program was:" >&5
14340sed 's/^/| /' conftest.$ac_ext >&5
14341
14342 ac_hi=`expr '(' $ac_mid ')' - 1`
14343 if test $ac_mid -le $ac_hi; then
14344 ac_lo= ac_hi=
14345 break
14346 fi
14347 ac_mid=`expr 2 '*' $ac_mid`
14348fi
14349
14350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14351 done
14352else
14353 echo "$as_me: failed program was:" >&5
14354sed 's/^/| /' conftest.$ac_ext >&5
14355
14356 ac_lo= ac_hi=
14357fi
14358
14359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14360fi
14361
14362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14363# Binary search between lo and hi bounds.
14364while test "x$ac_lo" != "x$ac_hi"; do
14365 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14366 cat >conftest.$ac_ext <<_ACEOF
14367/* confdefs.h. */
14368_ACEOF
14369cat confdefs.h >>conftest.$ac_ext
14370cat >>conftest.$ac_ext <<_ACEOF
14371/* end confdefs.h. */
14372
14373#ifdef HAVE_PTHREAD_H
14374#include <pthread.h>
14375#endif
14376
14377
14378 typedef pthread_t ac__type_sizeof_;
14379int
14380main ()
14381{
14382static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14383test_array [0] = 0
14384
14385 ;
14386 return 0;
14387}
14388_ACEOF
14389rm -f conftest.$ac_objext
14390if { (ac_try="$ac_compile"
14391case "(($ac_try" in
14392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14393 *) ac_try_echo=$ac_try;;
14394esac
14395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14396 (eval "$ac_compile") 2>conftest.er1
14397 ac_status=$?
14398 grep -v '^ *+' conftest.er1 >conftest.err
14399 rm -f conftest.er1
14400 cat conftest.err >&5
14401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402 (exit $ac_status); } && {
14403 test -z "$ac_c_werror_flag" ||
14404 test ! -s conftest.err
14405 } && test -s conftest.$ac_objext; then
14406 ac_hi=$ac_mid
14407else
14408 echo "$as_me: failed program was:" >&5
14409sed 's/^/| /' conftest.$ac_ext >&5
14410
14411 ac_lo=`expr '(' $ac_mid ')' + 1`
14412fi
14413
14414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14415done
14416case $ac_lo in
14417?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14418'') if test "$ac_cv_type_pthread_t" = yes; then
14419 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14420See \`config.log' for more details." >&5
14421echo "$as_me: error: cannot compute sizeof (pthread_t)
14422See \`config.log' for more details." >&2;}
14423 { (exit 77); exit 77; }; }
14424 else
14425 ac_cv_sizeof_pthread_t=0
14426 fi ;;
14427esac
14428else
14429 cat >conftest.$ac_ext <<_ACEOF
14430/* confdefs.h. */
14431_ACEOF
14432cat confdefs.h >>conftest.$ac_ext
14433cat >>conftest.$ac_ext <<_ACEOF
14434/* end confdefs.h. */
14435
14436#ifdef HAVE_PTHREAD_H
14437#include <pthread.h>
14438#endif
14439
14440
14441 typedef pthread_t ac__type_sizeof_;
14442static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14443static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14444#include <stdio.h>
14445#include <stdlib.h>
14446int
14447main ()
14448{
14449
14450 FILE *f = fopen ("conftest.val", "w");
14451 if (! f)
14452 return 1;
14453 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14454 {
14455 long int i = longval ();
14456 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14457 return 1;
14458 fprintf (f, "%ld\n", i);
14459 }
14460 else
14461 {
14462 unsigned long int i = ulongval ();
14463 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14464 return 1;
14465 fprintf (f, "%lu\n", i);
14466 }
14467 return ferror (f) || fclose (f) != 0;
14468
14469 ;
14470 return 0;
14471}
Martin v. Löwis11437992002-04-12 09:54:03 +000014472_ACEOF
14473rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014474if { (ac_try="$ac_link"
14475case "(($ac_try" in
14476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14477 *) ac_try_echo=$ac_try;;
14478esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014481 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014484 { (case "(($ac_try" in
14485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14486 *) ac_try_echo=$ac_try;;
14487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014493 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014495 echo "$as_me: program exited with status $ac_status" >&5
14496echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014497sed 's/^/| /' conftest.$ac_ext >&5
14498
Martin v. Löwis11437992002-04-12 09:54:03 +000014499( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014500if test "$ac_cv_type_pthread_t" = yes; then
14501 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14502See \`config.log' for more details." >&5
14503echo "$as_me: error: cannot compute sizeof (pthread_t)
14504See \`config.log' for more details." >&2;}
14505 { (exit 77); exit 77; }; }
14506 else
14507 ac_cv_sizeof_pthread_t=0
14508 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510rm -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 +000014511fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014512rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014513fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014514{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014515echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014517
14518
Martin v. Löwis11437992002-04-12 09:54:03 +000014519cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014520#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014521_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014522
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014523
Trent Mick635f6fb2000-08-23 21:33:05 +000014524fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014525CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014527{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14528echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014529# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014530if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531 enableval=$enable_toolbox_glue;
14532fi
Jack Jansene578a632001-08-15 01:27:14 +000014533
14534
14535if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014536then
Jack Jansene578a632001-08-15 01:27:14 +000014537 case $ac_sys_system/$ac_sys_release in
14538 Darwin/*)
14539 enable_toolbox_glue="yes";;
14540 *)
14541 enable_toolbox_glue="no";;
14542 esac
14543fi
14544case "$enable_toolbox_glue" in
14545yes)
Jack Jansene578a632001-08-15 01:27:14 +000014546 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014547 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
14549cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014550#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014551_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014552
14553 ;;
14554*)
Jack Jansene578a632001-08-15 01:27:14 +000014555 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014556 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014557 ;;
14558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014559{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14560echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014561
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014562
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014563
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014564case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014565 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014566 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14567 ;;
14568 Darwin/*)
14569 OTHER_LIBTOOL_OPT=""
14570 ;;
14571esac
14572
14573
Ronald Oussoren25967582009-09-06 10:00:26 +000014574ARCH_RUN_32BIT=""
14575
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014576case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014577 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014578 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14579 if test "${enable_universalsdk}"; then
14580 :
14581 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014582 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014583 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014584 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014585 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014586 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014587 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014588 if test ${gcc_version} '<' 4.0
14589 then
14590 LIBTOOL_CRUFT="-lcc_dynamic"
14591 else
14592 LIBTOOL_CRUFT=""
14593 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014594 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014595 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014596else
14597 cat >conftest.$ac_ext <<_ACEOF
14598/* confdefs.h. */
14599_ACEOF
14600cat confdefs.h >>conftest.$ac_ext
14601cat >>conftest.$ac_ext <<_ACEOF
14602/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014603
Ronald Oussoren25967582009-09-06 10:00:26 +000014604 #include <unistd.h>
14605 int main(int argc, char*argv[])
14606 {
14607 if (sizeof(long) == 4) {
14608 return 0;
14609 } else {
14610 return 1;
14611 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014612 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014613
Ronald Oussoren25967582009-09-06 10:00:26 +000014614_ACEOF
14615rm -f conftest$ac_exeext
14616if { (ac_try="$ac_link"
14617case "(($ac_try" in
14618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14619 *) ac_try_echo=$ac_try;;
14620esac
14621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14622 (eval "$ac_link") 2>&5
14623 ac_status=$?
14624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14626 { (case "(($ac_try" in
14627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14628 *) ac_try_echo=$ac_try;;
14629esac
14630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14631 (eval "$ac_try") 2>&5
14632 ac_status=$?
14633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14634 (exit $ac_status); }; }; then
14635 ac_osx_32bit=yes
14636else
14637 echo "$as_me: program exited with status $ac_status" >&5
14638echo "$as_me: failed program was:" >&5
14639sed 's/^/| /' conftest.$ac_ext >&5
14640
14641( exit $ac_status )
14642ac_osx_32bit=no
14643fi
14644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14645fi
14646
14647
14648
14649 if test "${ac_osx_32bit}" = "yes"; then
14650 case `arch` in
14651 i386)
14652 MACOSX_DEFAULT_ARCH="i386"
14653 ;;
14654 ppc)
14655 MACOSX_DEFAULT_ARCH="ppc"
14656 ;;
14657 *)
14658 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14659echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14660 { (exit 1); exit 1; }; }
14661 ;;
14662 esac
14663 else
14664 case `arch` in
14665 i386)
14666 MACOSX_DEFAULT_ARCH="x86_64"
14667 ;;
14668 ppc)
14669 MACOSX_DEFAULT_ARCH="ppc64"
14670 ;;
14671 *)
14672 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14673echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14674 { (exit 1); exit 1; }; }
14675 ;;
14676 esac
14677
14678 #ARCH_RUN_32BIT="true"
14679 fi
14680
14681 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014682 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014683 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014684esac
14685
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014686{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14687echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014688if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014689then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014690 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014692 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014693
Martin v. Löwis11437992002-04-12 09:54:03 +000014694cat >>confdefs.h <<\_ACEOF
14695#define WITH_NEXT_FRAMEWORK 1
14696_ACEOF
14697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014698 { echo "$as_me:$LINENO: result: yes" >&5
14699echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014700 if test $enable_shared = "yes"
14701 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014702 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14703echo "$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 +000014704 { (exit 1); exit 1; }; }
14705 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014707 { echo "$as_me:$LINENO: result: no" >&5
14708echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014709fi
14710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014711{ echo "$as_me:$LINENO: checking for dyld" >&5
14712echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014713case $ac_sys_system/$ac_sys_release in
14714 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014715
Martin v. Löwis11437992002-04-12 09:54:03 +000014716cat >>confdefs.h <<\_ACEOF
14717#define WITH_DYLD 1
14718_ACEOF
14719
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014720 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14721echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014722 ;;
14723 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014724 { echo "$as_me:$LINENO: result: no" >&5
14725echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014726 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014727esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014728
Guido van Rossum0a516c91994-09-12 10:58:40 +000014729# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014730
Michael W. Hudson54241132001-12-07 15:38:26 +000014731
14732
14733
14734
Guido van Rossum0a516c91994-09-12 10:58:40 +000014735# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014736# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014737{ echo "$as_me:$LINENO: checking SO" >&5
14738echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014739if test -z "$SO"
14740then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014741 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014742 hp*|HP*)
14743 case `uname -m` in
14744 ia64) SO=.so;;
14745 *) SO=.sl;;
14746 esac
14747 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014748 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014749 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014750 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014751else
14752 # this might also be a termcap variable, see #610332
14753 echo
14754 echo '====================================================================='
14755 echo '+ +'
14756 echo '+ WARNING: You have set SO in your environment. +'
14757 echo '+ Do you really mean to change the extension for shared libraries? +'
14758 echo '+ Continuing in 10 seconds to let you to ponder. +'
14759 echo '+ +'
14760 echo '====================================================================='
14761 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014762fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014763{ echo "$as_me:$LINENO: result: $SO" >&5
14764echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014765
Ronald Oussoren79f90492009-01-02 10:44:46 +000014766
Neal Norwitz58e28882006-05-19 07:00:58 +000014767cat >>confdefs.h <<_ACEOF
14768#define SHLIB_EXT "$SO"
14769_ACEOF
14770
Guido van Rossum0a516c91994-09-12 10:58:40 +000014771# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014772# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014773# (Shared libraries in this instance are shared modules to be loaded into
14774# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014775{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14776echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014777if test -z "$LDSHARED"
14778then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014779 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014780 AIX*)
14781 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014782 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014783 ;;
14784 BeOS*)
14785 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014786 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014787 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014788 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014789 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014791 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014792 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014793 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014794 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014795 hp*|HP*)
14796 if test "$GCC" = "yes"
14797 then LDSHARED='$(CC) -shared'
14798 else LDSHARED='ld -b';
14799 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014800 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014801 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014802 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14803 if test "$enable_framework" ; then
14804 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014805 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14806 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014807 else
14808 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014809 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014810 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014811 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +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 Jansene578a632001-08-15 01:27:14 +000014817 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014818 # No framework, use the Python app as bundle-loader
14819 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014820 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014821 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014822 Darwin/*)
14823 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14824 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014825
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014826 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014827 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014828 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014829 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014830 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014831 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14832 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014833 else
14834 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14835 if test "$enable_framework" ; then
14836 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014837 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14838 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014839 else
14840 # No framework, use the Python app as bundle-loader
14841 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14842 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14843 fi
14844 fi
14845 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014846 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014847 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014848 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014849 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014850 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014851 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014852 else
14853 LDSHARED="ld -Bshareable ${LDFLAGS}"
14854 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014855 OpenBSD*)
14856 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14857 then
14858 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14859 else
14860 case `uname -r` in
14861 [01].* | 2.[0-7] | 2.[0-7].*)
14862 LDSHARED="ld -Bshareable ${LDFLAGS}"
14863 ;;
14864 *)
14865 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14866 ;;
14867 esac
14868 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014869 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014870 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014871 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014872 then LDSHARED='$(CC) -shared'
14873 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014874 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014875 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014876 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014877 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014878 *) LDSHARED="ld";;
14879 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014880fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014881{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14882echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014883BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014884# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014885# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014886{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14887echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014888if test -z "$CCSHARED"
14889then
Guido van Rossum07397971997-04-29 21:49:50 +000014890 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014891 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014892 then CCSHARED="-fPIC";
14893 elif test `uname -p` = sparc;
14894 then CCSHARED="-xcode=pic32";
14895 else CCSHARED="-Kpic";
14896 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014897 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014898 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014899 else CCSHARED="+z";
14900 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014901 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014902 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014903 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014904 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014905 if test "$GCC" = "yes"
14906 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014907 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014908 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014909 SCO_SV*)
14910 if test "$GCC" = "yes"
14911 then CCSHARED="-fPIC"
14912 else CCSHARED="-Kpic -belf"
14913 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014914 IRIX*/6*) case $CC in
14915 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014916 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014917 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014918 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014919 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014921{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14922echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014923# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014924# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014925{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14926echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014927if test -z "$LINKFORSHARED"
14928then
Guido van Rossum07397971997-04-29 21:49:50 +000014929 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014930 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014931 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014932 LINKFORSHARED="-Wl,-E -Wl,+s";;
14933# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014934 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014935 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014936 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014938 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14939 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014940 # not used by the core itself but which needs to be in the core so
14941 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014942 # -prebind is no longer used, because it actually seems to give a
14943 # slowdown in stead of a speedup, maybe due to the large number of
14944 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014945
14946 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014947 if test "$enable_framework"
14948 then
Jack Jansenda49e192005-01-07 13:08:22 +000014949 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014950 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014951 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014952 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014953 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014954 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014955 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014956 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14957 then
14958 LINKFORSHARED="-Wl,--export-dynamic"
14959 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014960 SunOS/5*) case $CC in
14961 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014962 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014963 then
14964 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014965 fi;;
14966 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014967 CYGWIN*)
14968 if test $enable_shared = "no"
14969 then
14970 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14971 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014972 QNX*)
14973 # -Wl,-E causes the symbols to be added to the dynamic
14974 # symbol table so that they can be found when a module
14975 # is loaded. -N 2048K causes the stack size to be set
14976 # to 2048 kilobytes so that the stack doesn't overflow
14977 # when running test_compile.py.
14978 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014979 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014980fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014981{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14982echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014983
Michael W. Hudson54241132001-12-07 15:38:26 +000014984
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014986{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14987echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014988if test ! "$LIBRARY" = "$LDLIBRARY"
14989then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014990 case $ac_sys_system in
14991 CYGWIN*)
14992 # Cygwin needs CCSHARED when building extension DLLs
14993 # but not when building the interpreter DLL.
14994 CFLAGSFORSHARED='';;
14995 *)
14996 CFLAGSFORSHARED='$(CCSHARED)'
14997 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014999{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15000echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015001
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015002# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15003# library (with --enable-shared).
15004# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015005# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15006# if it is not required, since it creates a dependency of the shared library
15007# to LIBS. This, in turn, means that applications linking the shared libpython
15008# don't need to link LIBS explicitly. The default should be only changed
15009# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015010
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15012echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015013case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015015 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015017{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15018echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015019
15020
Guido van Rossum627b2d71993-12-24 10:39:16 +000015021# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015023{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15024echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015025if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015029LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015031/* confdefs.h. */
15032_ACEOF
15033cat confdefs.h >>conftest.$ac_ext
15034cat >>conftest.$ac_ext <<_ACEOF
15035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037/* Override any GCC internal prototype to avoid an error.
15038 Use char because int might match the return type of a GCC
15039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015040#ifdef __cplusplus
15041extern "C"
15042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015043char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015044int
15045main ()
15046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 ;
15049 return 0;
15050}
15051_ACEOF
15052rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015053if { (ac_try="$ac_link"
15054case "(($ac_try" in
15055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15056 *) ac_try_echo=$ac_try;;
15057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015061 grep -v '^ *+' conftest.er1 >conftest.err
15062 rm -f conftest.er1
15063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065 (exit $ac_status); } && {
15066 test -z "$ac_c_werror_flag" ||
15067 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015068 } && test -s conftest$ac_exeext &&
15069 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015073sed 's/^/| /' conftest.$ac_ext >&5
15074
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077
15078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015080LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015081fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015082{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15083echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15084if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 cat >>confdefs.h <<_ACEOF
15086#define HAVE_LIBDL 1
15087_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015088
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015089 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015090
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015091fi
15092 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015094{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15095echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015096if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015097 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015098else
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015100LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015102/* confdefs.h. */
15103_ACEOF
15104cat confdefs.h >>conftest.$ac_ext
15105cat >>conftest.$ac_ext <<_ACEOF
15106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015107
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108/* Override any GCC internal prototype to avoid an error.
15109 Use char because int might match the return type of a GCC
15110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015111#ifdef __cplusplus
15112extern "C"
15113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015114char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015115int
15116main ()
15117{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 ;
15120 return 0;
15121}
15122_ACEOF
15123rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015124if { (ac_try="$ac_link"
15125case "(($ac_try" in
15126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15127 *) ac_try_echo=$ac_try;;
15128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015132 grep -v '^ *+' conftest.er1 >conftest.err
15133 rm -f conftest.er1
15134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136 (exit $ac_status); } && {
15137 test -z "$ac_c_werror_flag" ||
15138 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015139 } && test -s conftest$ac_exeext &&
15140 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015144sed 's/^/| /' conftest.$ac_ext >&5
15145
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148
15149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015151LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015152fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015153{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15154echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15155if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 cat >>confdefs.h <<_ACEOF
15157#define HAVE_LIBDLD 1
15158_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015160 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015162fi
15163 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015164
Ronald Oussoren79f90492009-01-02 10:44:46 +000015165# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015166if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015167 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15168echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015169if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015170 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015171else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015172 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015174/* confdefs.h. */
15175_ACEOF
15176cat confdefs.h >>conftest.$ac_ext
15177cat >>conftest.$ac_ext <<_ACEOF
15178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015179
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180/* Override any GCC internal prototype to avoid an error.
15181 Use char because int might match the return type of a GCC
15182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015183#ifdef __cplusplus
15184extern "C"
15185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015186char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015187int
15188main ()
15189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 ;
15192 return 0;
15193}
15194_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015195for ac_lib in '' pthread rt posix4; do
15196 if test -z "$ac_lib"; then
15197 ac_res="none required"
15198 else
15199 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015200 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201 fi
15202 rm -f conftest.$ac_objext conftest$ac_exeext
15203if { (ac_try="$ac_link"
15204case "(($ac_try" in
15205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15206 *) ac_try_echo=$ac_try;;
15207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015210 ac_status=$?
15211 grep -v '^ *+' conftest.er1 >conftest.err
15212 rm -f conftest.er1
15213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 (exit $ac_status); } && {
15216 test -z "$ac_c_werror_flag" ||
15217 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015218 } && test -s conftest$ac_exeext &&
15219 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225
Brett Cannon19fab762007-06-02 03:02:29 +000015226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227
15228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15229 conftest$ac_exeext
15230 if test "${ac_cv_search_sem_init+set}" = set; then
15231 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233done
15234if test "${ac_cv_search_sem_init+set}" = set; then
15235 :
15236else
15237 ac_cv_search_sem_init=no
15238fi
15239rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015240LIBS=$ac_func_search_save_LIBS
15241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015242{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15243echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015244ac_res=$ac_cv_search_sem_init
15245if test "$ac_res" != no; then
15246 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015247
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015248fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015249 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015250 # posix4 on Solaris 2.6
15251 # pthread (first!) on Linux
15252fi
15253
Martin v. Löwis19d17342003-06-14 21:03:05 +000015254# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015255{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15256echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015257if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015258 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015259else
15260 ac_check_lib_save_LIBS=$LIBS
15261LIBS="-lintl $LIBS"
15262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015263/* confdefs.h. */
15264_ACEOF
15265cat confdefs.h >>conftest.$ac_ext
15266cat >>conftest.$ac_ext <<_ACEOF
15267/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015268
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269/* Override any GCC internal prototype to avoid an error.
15270 Use char because int might match the return type of a GCC
15271 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015272#ifdef __cplusplus
15273extern "C"
15274#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015275char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015276int
15277main ()
15278{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015280 ;
15281 return 0;
15282}
15283_ACEOF
15284rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015285if { (ac_try="$ac_link"
15286case "(($ac_try" in
15287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15288 *) ac_try_echo=$ac_try;;
15289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015293 grep -v '^ *+' conftest.er1 >conftest.err
15294 rm -f conftest.er1
15295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297 (exit $ac_status); } && {
15298 test -z "$ac_c_werror_flag" ||
15299 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015300 } && test -s conftest$ac_exeext &&
15301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015302 ac_cv_lib_intl_textdomain=yes
15303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015305sed 's/^/| /' conftest.$ac_ext >&5
15306
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309
15310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015312LIBS=$ac_check_lib_save_LIBS
15313fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15315echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15316if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015317
15318cat >>confdefs.h <<\_ACEOF
15319#define WITH_LIBINTL 1
15320_ACEOF
15321
15322fi
15323
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015324
15325# checks for system dependent C++ extensions support
15326case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015327 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15328echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015330/* confdefs.h. */
15331_ACEOF
15332cat confdefs.h >>conftest.$ac_ext
15333cat >>conftest.$ac_ext <<_ACEOF
15334/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015335#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015336int
15337main ()
15338{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015339loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ;
15341 return 0;
15342}
15343_ACEOF
15344rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345if { (ac_try="$ac_link"
15346case "(($ac_try" in
15347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15348 *) ac_try_echo=$ac_try;;
15349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015353 grep -v '^ *+' conftest.er1 >conftest.err
15354 rm -f conftest.er1
15355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357 (exit $ac_status); } && {
15358 test -z "$ac_c_werror_flag" ||
15359 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015360 } && test -s conftest$ac_exeext &&
15361 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015362
Martin v. Löwis11437992002-04-12 09:54:03 +000015363cat >>confdefs.h <<\_ACEOF
15364#define AIX_GENUINE_CPLUSPLUS 1
15365_ACEOF
15366
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367 { echo "$as_me:$LINENO: result: yes" >&5
15368echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015369else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015371sed 's/^/| /' conftest.$ac_ext >&5
15372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015373 { echo "$as_me:$LINENO: result: no" >&5
15374echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376
15377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015378 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015379 *) ;;
15380esac
15381
Guido van Rossum70c7f481998-03-26 18:44:10 +000015382# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015383# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015384{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15385echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015386if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015388else
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015390LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015392/* confdefs.h. */
15393_ACEOF
15394cat confdefs.h >>conftest.$ac_ext
15395cat >>conftest.$ac_ext <<_ACEOF
15396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015397
Martin v. Löwiseba40652007-08-30 20:10:57 +000015398/* Override any GCC internal prototype to avoid an error.
15399 Use char because int might match the return type of a GCC
15400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015401#ifdef __cplusplus
15402extern "C"
15403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015404char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015405int
15406main ()
15407{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 ;
15410 return 0;
15411}
15412_ACEOF
15413rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414if { (ac_try="$ac_link"
15415case "(($ac_try" in
15416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15417 *) ac_try_echo=$ac_try;;
15418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015422 grep -v '^ *+' conftest.er1 >conftest.err
15423 rm -f conftest.er1
15424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426 (exit $ac_status); } && {
15427 test -z "$ac_c_werror_flag" ||
15428 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015429 } && test -s conftest$ac_exeext &&
15430 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015434sed 's/^/| /' conftest.$ac_ext >&5
15435
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015438
15439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015443{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15444echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15445if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015446 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015447fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015448 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015449{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15450echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015451if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015453else
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015455LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015457/* confdefs.h. */
15458_ACEOF
15459cat confdefs.h >>conftest.$ac_ext
15460cat >>conftest.$ac_ext <<_ACEOF
15461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015462
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463/* Override any GCC internal prototype to avoid an error.
15464 Use char because int might match the return type of a GCC
15465 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015466#ifdef __cplusplus
15467extern "C"
15468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015469char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015470int
15471main ()
15472{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 ;
15475 return 0;
15476}
15477_ACEOF
15478rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015479if { (ac_try="$ac_link"
15480case "(($ac_try" in
15481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15482 *) ac_try_echo=$ac_try;;
15483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015487 grep -v '^ *+' conftest.er1 >conftest.err
15488 rm -f conftest.er1
15489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491 (exit $ac_status); } && {
15492 test -z "$ac_c_werror_flag" ||
15493 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015494 } && test -s conftest$ac_exeext &&
15495 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015499sed 's/^/| /' conftest.$ac_ext >&5
15500
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503
15504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015506LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015507fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015508{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15509echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15510if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015511 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015512fi
15513 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015514
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015515case "$ac_sys_system" in
15516BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015517{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15518echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015519if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015520 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015521else
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015523LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015525/* confdefs.h. */
15526_ACEOF
15527cat confdefs.h >>conftest.$ac_ext
15528cat >>conftest.$ac_ext <<_ACEOF
15529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531/* Override any GCC internal prototype to avoid an error.
15532 Use char because int might match the return type of a GCC
15533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015534#ifdef __cplusplus
15535extern "C"
15536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015537char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015538int
15539main ()
15540{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 ;
15543 return 0;
15544}
15545_ACEOF
15546rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547if { (ac_try="$ac_link"
15548case "(($ac_try" in
15549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15550 *) ac_try_echo=$ac_try;;
15551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015555 grep -v '^ *+' conftest.er1 >conftest.err
15556 rm -f conftest.er1
15557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559 (exit $ac_status); } && {
15560 test -z "$ac_c_werror_flag" ||
15561 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015562 } && test -s conftest$ac_exeext &&
15563 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015567sed 's/^/| /' conftest.$ac_ext >&5
15568
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571
15572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015574LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015575fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015576{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15577echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15578if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015579 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015580fi
15581 # BeOS
15582;;
15583esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015584
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015585{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15586echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015587
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015589if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015591{ echo "$as_me:$LINENO: result: $withval" >&5
15592echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015593LIBS="$withval $LIBS"
15594
15595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015596 { echo "$as_me:$LINENO: result: no" >&5
15597echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598fi
15599
Guido van Rossum7f43da71994-08-01 12:15:30 +000015600
Benjamin Peterson2c196742009-12-31 03:17:18 +000015601# Check for use of the system expat library
15602{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15603echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15604
15605# Check whether --with-system_expat was given.
15606if test "${with_system_expat+set}" = set; then
15607 withval=$with_system_expat;
15608fi
15609
15610
15611{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15612echo "${ECHO_T}$with_system_expat" >&6; }
15613
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015614# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015615{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15616echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015617
Martin v. Löwiseba40652007-08-30 20:10:57 +000015618# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015619if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620 withval=$with_system_ffi;
15621fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015622
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015623
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015624if test "$with_system_ffi" = "yes"; then
15625 if test -n "$ac_tool_prefix"; then
15626 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15627set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15628{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15630if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15631 echo $ECHO_N "(cached) $ECHO_C" >&6
15632else
15633 case $PKG_CONFIG in
15634 [\\/]* | ?:[\\/]*)
15635 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15636 ;;
15637 *)
15638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15639for as_dir in $PATH
15640do
15641 IFS=$as_save_IFS
15642 test -z "$as_dir" && as_dir=.
15643 for ac_exec_ext in '' $ac_executable_extensions; do
15644 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15645 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15646 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15647 break 2
15648 fi
15649done
15650done
15651IFS=$as_save_IFS
15652
15653 ;;
15654esac
15655fi
15656PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15657if test -n "$PKG_CONFIG"; then
15658 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15659echo "${ECHO_T}$PKG_CONFIG" >&6; }
15660else
15661 { echo "$as_me:$LINENO: result: no" >&5
15662echo "${ECHO_T}no" >&6; }
15663fi
15664
15665
15666fi
15667if test -z "$ac_cv_path_PKG_CONFIG"; then
15668 ac_pt_PKG_CONFIG=$PKG_CONFIG
15669 # Extract the first word of "pkg-config", so it can be a program name with args.
15670set dummy pkg-config; ac_word=$2
15671{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15672echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15673if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15674 echo $ECHO_N "(cached) $ECHO_C" >&6
15675else
15676 case $ac_pt_PKG_CONFIG in
15677 [\\/]* | ?:[\\/]*)
15678 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15679 ;;
15680 *)
15681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15682for as_dir in $PATH
15683do
15684 IFS=$as_save_IFS
15685 test -z "$as_dir" && as_dir=.
15686 for ac_exec_ext in '' $ac_executable_extensions; do
15687 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15688 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15689 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15690 break 2
15691 fi
15692done
15693done
15694IFS=$as_save_IFS
15695
15696 ;;
15697esac
15698fi
15699ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15700if test -n "$ac_pt_PKG_CONFIG"; then
15701 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15702echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15703else
15704 { echo "$as_me:$LINENO: result: no" >&5
15705echo "${ECHO_T}no" >&6; }
15706fi
15707
15708 if test "x$ac_pt_PKG_CONFIG" = x; then
15709 PKG_CONFIG=""
15710 else
15711 case $cross_compiling:$ac_tool_warned in
15712yes:)
15713{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15714whose name does not start with the host triplet. If you think this
15715configuration is useful to you, please write to autoconf@gnu.org." >&5
15716echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15717whose name does not start with the host triplet. If you think this
15718configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15719ac_tool_warned=yes ;;
15720esac
15721 PKG_CONFIG=$ac_pt_PKG_CONFIG
15722 fi
15723else
15724 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15725fi
15726
15727 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15728else
15729 LIBFFI_INCLUDEDIR=""
15730fi
15731
15732
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015733{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15734echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015735
Benjamin Peterson867475c2009-04-29 20:36:25 +000015736# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015737{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15738echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015739
15740# Check whether --with-dbmliborder was given.
15741if test "${with_dbmliborder+set}" = set; then
15742 withval=$with_dbmliborder;
15743if test x$with_dbmliborder = xyes
15744then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015745{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15746echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015747 { (exit 1); exit 1; }; }
15748else
15749 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15750 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15751 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015752 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15753echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015754 { (exit 1); exit 1; }; }
15755 fi
15756 done
15757fi
15758fi
15759
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015760{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15761echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015762
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015763# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015764
15765
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015766{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15767echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015768
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015770if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 withval=$with_signal_module;
15772fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015773
15774
15775if test -z "$with_signal_module"
15776then with_signal_module="yes"
15777fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015778{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15779echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015780
15781if test "${with_signal_module}" = "yes"; then
15782 USE_SIGNAL_MODULE=""
15783 SIGNAL_OBJS=""
15784else
15785 USE_SIGNAL_MODULE="#"
15786 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15787fi
15788
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015789# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015790
Barry Warsawc0d24d82000-06-29 16:12:00 +000015791USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015792
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015793{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15794echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
Guido van Rossumec2f0731997-01-22 20:54:01 +000015796
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015798if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015800{ echo "$as_me:$LINENO: result: $withval" >&5
15801echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015802LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015803if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015804 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015805fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015807 { echo "$as_me:$LINENO: result: no" >&5
15808echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809fi
15810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
15812# Templates for things AC_DEFINEd more than once.
15813# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015814
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817
15818
15819
15820
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015821{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15822echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015823
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015825if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826 withval=$with_threads;
15827fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015828
15829
Barry Warsawc0d24d82000-06-29 16:12:00 +000015830# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015831
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015833if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834 withval=$with_thread; with_threads=$with_thread
15835fi
15836
Barry Warsawc0d24d82000-06-29 16:12:00 +000015837
15838if test -z "$with_threads"
15839then with_threads="yes"
15840fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015841{ echo "$as_me:$LINENO: result: $with_threads" >&5
15842echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015843
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015844
Barry Warsawc0d24d82000-06-29 16:12:00 +000015845if test "$with_threads" = "no"
15846then
15847 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015848elif test "$ac_cv_pthread_is_default" = yes
15849then
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015851#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015852_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015853
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015854 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015856#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015857_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015858
15859 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015861elif test "$ac_cv_kpthread" = "yes"
15862then
15863 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015864 if test "$ac_cv_cxx_thread" = "yes"; then
15865 CXX="$CXX -Kpthread"
15866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015868#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015870
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015871 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015872 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015873elif test "$ac_cv_kthread" = "yes"
15874then
15875 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015876 if test "$ac_cv_cxx_thread" = "yes"; then
15877 CXX="$CXX -Kthread"
15878 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015879 cat >>confdefs.h <<\_ACEOF
15880#define WITH_THREAD 1
15881_ACEOF
15882
15883 posix_threads=yes
15884 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015885elif test "$ac_cv_pthread" = "yes"
15886then
15887 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015888 if test "$ac_cv_cxx_thread" = "yes"; then
15889 CXX="$CXX -pthread"
15890 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015891 cat >>confdefs.h <<\_ACEOF
15892#define WITH_THREAD 1
15893_ACEOF
15894
15895 posix_threads=yes
15896 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015897else
15898 if test ! -z "$with_threads" -a -d "$with_threads"
15899 then LDFLAGS="$LDFLAGS -L$with_threads"
15900 fi
15901 if test ! -z "$withval" -a -d "$withval"
15902 then LDFLAGS="$LDFLAGS -L$withval"
15903 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015904
15905 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015906 # define _POSIX_THREADS in unistd.h. Some apparently don't
15907 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015908 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15909echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015911/* confdefs.h. */
15912_ACEOF
15913cat confdefs.h >>conftest.$ac_ext
15914cat >>conftest.$ac_ext <<_ACEOF
15915/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015916
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015917#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015918#ifdef _POSIX_THREADS
15919yes
15920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
15922_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015924 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015925 unistd_defines_pthreads=yes
15926else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015927 unistd_defines_pthreads=no
15928fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000015929rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015931 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15932echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015933
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015935#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015936_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015937
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015939 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15940echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015941if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015944{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15945echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015946else
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015948{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15949echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015951/* confdefs.h. */
15952_ACEOF
15953cat confdefs.h >>conftest.$ac_ext
15954cat >>conftest.$ac_ext <<_ACEOF
15955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015956$ac_includes_default
15957#include <cthreads.h>
15958_ACEOF
15959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960if { (ac_try="$ac_compile"
15961case "(($ac_try" in
15962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15963 *) ac_try_echo=$ac_try;;
15964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 grep -v '^ *+' conftest.er1 >conftest.err
15969 rm -f conftest.er1
15970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972 (exit $ac_status); } && {
15973 test -z "$ac_c_werror_flag" ||
15974 test ! -s conftest.err
15975 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 ac_header_compiler=yes
15977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015979sed 's/^/| /' conftest.$ac_ext >&5
15980
Martin v. Löwiseba40652007-08-30 20:10:57 +000015981 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015983
15984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015985{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15986echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
15988# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015989{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15990echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015992/* confdefs.h. */
15993_ACEOF
15994cat confdefs.h >>conftest.$ac_ext
15995cat >>conftest.$ac_ext <<_ACEOF
15996/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015997#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015998_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015999if { (ac_try="$ac_cpp conftest.$ac_ext"
16000case "(($ac_try" in
16001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16002 *) ac_try_echo=$ac_try;;
16003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016005 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016007 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 rm -f conftest.er1
16009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016011 (exit $ac_status); } >/dev/null && {
16012 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16013 test ! -s conftest.err
16014 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 ac_header_preproc=yes
16016else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016018sed 's/^/| /' conftest.$ac_ext >&5
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016024{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16025echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
16027# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016028case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16029 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016030 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16031echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16032 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16033echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016034 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016035 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016036 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016037 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16038echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16039 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16040echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16041 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16042echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16043 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16044echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16045 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16046echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16047 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16048echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016049 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016050## -------------------------------------- ##
16051## Report this to http://bugs.python.org/ ##
16052## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016053_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016055 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016057{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16058echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016059if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016061else
16062 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016063fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016064{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16065echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016066
16067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016068if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016070#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016071_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016072
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016074#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016075_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016076
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
16078cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016079#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016080_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016081
16082 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016083 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016084else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016085
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016087 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16088echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016089if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016090 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016091fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016092{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16093echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016094else
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016096{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16097echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016099/* confdefs.h. */
16100_ACEOF
16101cat confdefs.h >>conftest.$ac_ext
16102cat >>conftest.$ac_ext <<_ACEOF
16103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016104$ac_includes_default
16105#include <mach/cthreads.h>
16106_ACEOF
16107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016108if { (ac_try="$ac_compile"
16109case "(($ac_try" in
16110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16111 *) ac_try_echo=$ac_try;;
16112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016116 grep -v '^ *+' conftest.er1 >conftest.err
16117 rm -f conftest.er1
16118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016120 (exit $ac_status); } && {
16121 test -z "$ac_c_werror_flag" ||
16122 test ! -s conftest.err
16123 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 ac_header_compiler=yes
16125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016127sed 's/^/| /' conftest.$ac_ext >&5
16128
Martin v. Löwiseba40652007-08-30 20:10:57 +000016129 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016131
16132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016133{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16134echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016135
16136# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016137{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16138echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016139cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016140/* confdefs.h. */
16141_ACEOF
16142cat confdefs.h >>conftest.$ac_ext
16143cat >>conftest.$ac_ext <<_ACEOF
16144/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016145#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016146_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016147if { (ac_try="$ac_cpp conftest.$ac_ext"
16148case "(($ac_try" in
16149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16150 *) ac_try_echo=$ac_try;;
16151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016153 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016154 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016155 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016156 rm -f conftest.er1
16157 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159 (exit $ac_status); } >/dev/null && {
16160 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16161 test ! -s conftest.err
16162 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ac_header_preproc=yes
16164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016166sed 's/^/| /' conftest.$ac_ext >&5
16167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016172{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16173echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016174
16175# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016176case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16177 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016178 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16179echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16180 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16181echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016182 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016183 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016184 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016185 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16186echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16187 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16188echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16189 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16190echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16191 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16192echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16193 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16194echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16195 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16196echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016197 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016198## -------------------------------------- ##
16199## Report this to http://bugs.python.org/ ##
16200## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016201_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016203 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016205{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16206echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016207if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016209else
16210 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016211fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016212{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16213echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016214
16215fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016216if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016218#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016219_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016220
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016222#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016223_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016224
Martin v. Löwis11437992002-04-12 09:54:03 +000016225
16226cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016227#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016228_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016229
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016230 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016231else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016233 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16234echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016235
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016237if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016238 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16239echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016240 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016241#define WITH_THREAD 1
16242_ACEOF
16243
16244
16245cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016246#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016248
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016249 LIBS="-lpth $LIBS"
16250 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016252 { echo "$as_me:$LINENO: result: no" >&5
16253echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016254
16255 # Just looking for pthread_create in libpthread is not enough:
16256 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16257 # So we really have to include pthread.h, and then link.
16258 _libs=$LIBS
16259 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016260 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16261echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016263/* confdefs.h. */
16264_ACEOF
16265cat confdefs.h >>conftest.$ac_ext
16266cat >>conftest.$ac_ext <<_ACEOF
16267/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016268#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016269
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016270void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016271int
16272main ()
16273{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016274
16275pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 ;
16277 return 0;
16278}
16279_ACEOF
16280rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281if { (ac_try="$ac_link"
16282case "(($ac_try" in
16283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16284 *) ac_try_echo=$ac_try;;
16285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016289 grep -v '^ *+' conftest.er1 >conftest.err
16290 rm -f conftest.er1
16291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293 (exit $ac_status); } && {
16294 test -z "$ac_c_werror_flag" ||
16295 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016296 } && test -s conftest$ac_exeext &&
16297 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016298
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016299 { echo "$as_me:$LINENO: result: yes" >&5
16300echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016303_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016304
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016305 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016306 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016309sed 's/^/| /' conftest.$ac_ext >&5
16310
Martin v. Löwis11437992002-04-12 09:54:03 +000016311
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016312 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016313 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16314echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016315if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016317else
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016319/* confdefs.h. */
16320_ACEOF
16321cat confdefs.h >>conftest.$ac_ext
16322cat >>conftest.$ac_ext <<_ACEOF
16323/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016324/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16325 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16326#define pthread_detach innocuous_pthread_detach
16327
Guido van Rossumad678af1998-10-02 14:42:15 +000016328/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016329 which can conflict with char pthread_detach (); below.
16330 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016331 <limits.h> exists even on freestanding compilers. */
16332
16333#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016334# include <limits.h>
16335#else
16336# include <assert.h>
16337#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016338
16339#undef pthread_detach
16340
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341/* Override any GCC internal prototype to avoid an error.
16342 Use char because int might match the return type of a GCC
16343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016344#ifdef __cplusplus
16345extern "C"
16346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016347char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016348/* The GNU C library defines this for functions which it implements
16349 to always fail with ENOSYS. Some functions are actually named
16350 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016352choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016353#endif
16354
Skip Montanaro6dead952003-09-25 14:50:04 +000016355int
16356main ()
16357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016358return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 ;
16360 return 0;
16361}
16362_ACEOF
16363rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364if { (ac_try="$ac_link"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016372 grep -v '^ *+' conftest.er1 >conftest.err
16373 rm -f conftest.er1
16374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376 (exit $ac_status); } && {
16377 test -z "$ac_c_werror_flag" ||
16378 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016379 } && test -s conftest$ac_exeext &&
16380 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016384sed 's/^/| /' conftest.$ac_ext >&5
16385
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388
16389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016390 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016391fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016392{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16393echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16394if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016395 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016396#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016397_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016398
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016399 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016400 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016401else
Guido van Rossumad678af1998-10-02 14:42:15 +000016402
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016403 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016404 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16405echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016406if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016407 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016408fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016409{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16410echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016411else
16412 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016413{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16414echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016416/* confdefs.h. */
16417_ACEOF
16418cat confdefs.h >>conftest.$ac_ext
16419cat >>conftest.$ac_ext <<_ACEOF
16420/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016421$ac_includes_default
16422#include <atheos/threads.h>
16423_ACEOF
16424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425if { (ac_try="$ac_compile"
16426case "(($ac_try" in
16427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16428 *) ac_try_echo=$ac_try;;
16429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016433 grep -v '^ *+' conftest.er1 >conftest.err
16434 rm -f conftest.er1
16435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016437 (exit $ac_status); } && {
16438 test -z "$ac_c_werror_flag" ||
16439 test ! -s conftest.err
16440 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016441 ac_header_compiler=yes
16442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016444sed 's/^/| /' conftest.$ac_ext >&5
16445
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016448
16449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016450{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16451echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016452
16453# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016454{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16455echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016457/* confdefs.h. */
16458_ACEOF
16459cat confdefs.h >>conftest.$ac_ext
16460cat >>conftest.$ac_ext <<_ACEOF
16461/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016462#include <atheos/threads.h>
16463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016464if { (ac_try="$ac_cpp conftest.$ac_ext"
16465case "(($ac_try" in
16466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16467 *) ac_try_echo=$ac_try;;
16468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016470 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016471 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016472 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016473 rm -f conftest.er1
16474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476 (exit $ac_status); } >/dev/null && {
16477 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16478 test ! -s conftest.err
16479 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016480 ac_header_preproc=yes
16481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016483sed 's/^/| /' conftest.$ac_ext >&5
16484
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016485 ac_header_preproc=no
16486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016487
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016488rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016489{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16490echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016491
16492# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016493case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16494 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016495 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16496echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16497 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16498echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016499 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016500 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016501 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016502 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16503echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16504 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16505echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16506 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16507echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16508 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16509echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16510 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16511echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16512 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16513echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016514 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016515## -------------------------------------- ##
16516## Report this to http://bugs.python.org/ ##
16517## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016518_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016520 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016521esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016522{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16523echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016524if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016526else
16527 ac_cv_header_atheos_threads_h=$ac_header_preproc
16528fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016529{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16530echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016531
16532fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016533if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016534 cat >>confdefs.h <<\_ACEOF
16535#define WITH_THREAD 1
16536_ACEOF
16537
16538
16539cat >>confdefs.h <<\_ACEOF
16540#define ATHEOS_THREADS 1
16541_ACEOF
16542
16543 THREADOBJ="Python/thread.o"
16544else
16545
Martin v. Löwis11437992002-04-12 09:54:03 +000016546 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016547 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16548echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016549if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016550 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016551fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016552{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16553echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016554else
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16557echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016559/* confdefs.h. */
16560_ACEOF
16561cat confdefs.h >>conftest.$ac_ext
16562cat >>conftest.$ac_ext <<_ACEOF
16563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016564$ac_includes_default
16565#include <kernel/OS.h>
16566_ACEOF
16567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016568if { (ac_try="$ac_compile"
16569case "(($ac_try" in
16570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16571 *) ac_try_echo=$ac_try;;
16572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016576 grep -v '^ *+' conftest.er1 >conftest.err
16577 rm -f conftest.er1
16578 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580 (exit $ac_status); } && {
16581 test -z "$ac_c_werror_flag" ||
16582 test ! -s conftest.err
16583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 ac_header_compiler=yes
16585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016587sed 's/^/| /' conftest.$ac_ext >&5
16588
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016591
16592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016593{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16594echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016595
16596# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016597{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16598echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016600/* confdefs.h. */
16601_ACEOF
16602cat confdefs.h >>conftest.$ac_ext
16603cat >>conftest.$ac_ext <<_ACEOF
16604/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016605#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016606_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607if { (ac_try="$ac_cpp conftest.$ac_ext"
16608case "(($ac_try" in
16609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16610 *) ac_try_echo=$ac_try;;
16611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016613 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016615 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016616 rm -f conftest.er1
16617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016619 (exit $ac_status); } >/dev/null && {
16620 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16621 test ! -s conftest.err
16622 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016623 ac_header_preproc=yes
16624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016626sed 's/^/| /' conftest.$ac_ext >&5
16627
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016630
Martin v. Löwis11437992002-04-12 09:54:03 +000016631rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016632{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16633echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016634
Martin v. Löwis11437992002-04-12 09:54:03 +000016635# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016636case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16637 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016638 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16639echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16640 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16641echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016642 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016643 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016644 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016645 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16646echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16647 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16648echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16649 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16650echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16651 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16652echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16653 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16654echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16655 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16656echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016658## -------------------------------------- ##
16659## Report this to http://bugs.python.org/ ##
16660## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016661_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016662 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016663 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016665{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16666echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016667if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016668 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016669else
16670 ac_cv_header_kernel_OS_h=$ac_header_preproc
16671fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016672{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16673echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016674
16675fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016676if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 cat >>confdefs.h <<\_ACEOF
16678#define WITH_THREAD 1
16679_ACEOF
16680
16681
16682cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016683#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016684_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016685
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016686 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016687else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016688
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016689 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16690echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016691if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016692 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016693else
Martin v. Löwis11437992002-04-12 09:54:03 +000016694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016695LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016697/* confdefs.h. */
16698_ACEOF
16699cat confdefs.h >>conftest.$ac_ext
16700cat >>conftest.$ac_ext <<_ACEOF
16701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016702
Martin v. Löwiseba40652007-08-30 20:10:57 +000016703/* Override any GCC internal prototype to avoid an error.
16704 Use char because int might match the return type of a GCC
16705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016706#ifdef __cplusplus
16707extern "C"
16708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016709char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016710int
16711main ()
16712{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016713return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 ;
16715 return 0;
16716}
16717_ACEOF
16718rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016719if { (ac_try="$ac_link"
16720case "(($ac_try" in
16721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16722 *) ac_try_echo=$ac_try;;
16723esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016727 grep -v '^ *+' conftest.er1 >conftest.err
16728 rm -f conftest.er1
16729 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731 (exit $ac_status); } && {
16732 test -z "$ac_c_werror_flag" ||
16733 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016734 } && test -s conftest$ac_exeext &&
16735 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016739sed 's/^/| /' conftest.$ac_ext >&5
16740
Martin v. Löwiseba40652007-08-30 20:10:57 +000016741 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743
16744rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016745 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016746LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016747fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016748{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16749echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16750if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016752#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016753_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016755 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016756 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016757 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016758else
Greg Steinadf63d62000-07-05 10:38:09 +000016759
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016760 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16761echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016762if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016763 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016764else
Martin v. Löwis11437992002-04-12 09:54:03 +000016765 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016766LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016768/* confdefs.h. */
16769_ACEOF
16770cat confdefs.h >>conftest.$ac_ext
16771cat >>conftest.$ac_ext <<_ACEOF
16772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016773
Martin v. Löwiseba40652007-08-30 20:10:57 +000016774/* Override any GCC internal prototype to avoid an error.
16775 Use char because int might match the return type of a GCC
16776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016777#ifdef __cplusplus
16778extern "C"
16779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016780char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016781int
16782main ()
16783{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 ;
16786 return 0;
16787}
16788_ACEOF
16789rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790if { (ac_try="$ac_link"
16791case "(($ac_try" in
16792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16793 *) ac_try_echo=$ac_try;;
16794esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016798 grep -v '^ *+' conftest.er1 >conftest.err
16799 rm -f conftest.er1
16800 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016802 (exit $ac_status); } && {
16803 test -z "$ac_c_werror_flag" ||
16804 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016805 } && test -s conftest$ac_exeext &&
16806 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016807 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016808else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016810sed 's/^/| /' conftest.$ac_ext >&5
16811
Martin v. Löwiseba40652007-08-30 20:10:57 +000016812 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814
16815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016817LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016818fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016819{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16820echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16821if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016823#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016824_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016825
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016826 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016827 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016828 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016829else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016831 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16832echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016833if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016835else
Martin v. Löwis11437992002-04-12 09:54:03 +000016836 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016837LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016838cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016839/* confdefs.h. */
16840_ACEOF
16841cat confdefs.h >>conftest.$ac_ext
16842cat >>conftest.$ac_ext <<_ACEOF
16843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
Martin v. Löwiseba40652007-08-30 20:10:57 +000016845/* Override any GCC internal prototype to avoid an error.
16846 Use char because int might match the return type of a GCC
16847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016848#ifdef __cplusplus
16849extern "C"
16850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016851char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016852int
16853main ()
16854{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ;
16857 return 0;
16858}
16859_ACEOF
16860rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016861if { (ac_try="$ac_link"
16862case "(($ac_try" in
16863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16864 *) ac_try_echo=$ac_try;;
16865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016867 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016869 grep -v '^ *+' conftest.er1 >conftest.err
16870 rm -f conftest.er1
16871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873 (exit $ac_status); } && {
16874 test -z "$ac_c_werror_flag" ||
16875 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016876 } && test -s conftest$ac_exeext &&
16877 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016881sed 's/^/| /' conftest.$ac_ext >&5
16882
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016885
16886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016890{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16891echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16892if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016894#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016895_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016896
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016897 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016898 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016899 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016900else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016901
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016902 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16903echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016904if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016906else
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016908LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016910/* confdefs.h. */
16911_ACEOF
16912cat confdefs.h >>conftest.$ac_ext
16913cat >>conftest.$ac_ext <<_ACEOF
16914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916/* Override any GCC internal prototype to avoid an error.
16917 Use char because int might match the return type of a GCC
16918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016919#ifdef __cplusplus
16920extern "C"
16921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016922char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016923int
16924main ()
16925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 ;
16928 return 0;
16929}
16930_ACEOF
16931rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016932if { (ac_try="$ac_link"
16933case "(($ac_try" in
16934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16935 *) ac_try_echo=$ac_try;;
16936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016940 grep -v '^ *+' conftest.er1 >conftest.err
16941 rm -f conftest.er1
16942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016944 (exit $ac_status); } && {
16945 test -z "$ac_c_werror_flag" ||
16946 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016947 } && test -s conftest$ac_exeext &&
16948 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016952sed 's/^/| /' conftest.$ac_ext >&5
16953
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016956
16957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016959LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016960fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016961{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16962echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16963if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016965#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016966_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016967
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016968 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016969 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016970 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016971else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016972
Martin v. Löwis130fb172001-07-19 11:00:41 +000016973 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016974fi
16975
Guido van Rossum627b2d71993-12-24 10:39:16 +000016976
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016977fi
16978
Guido van Rossum0be3e491997-05-22 20:33:33 +000016979fi
16980
Guido van Rossum49545951997-12-02 19:28:29 +000016981fi
16982
Guido van Rossumb93a8621998-05-07 13:27:32 +000016983fi
16984
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016985
Michael W. Hudson54241132001-12-07 15:38:26 +000016986fi
16987
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016988
16989fi
16990
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016992
16993rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016995fi
16996
Martin v. Löwis11437992002-04-12 09:54:03 +000016997fi
16998
16999
17000fi
17001
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017002
Michael W. Hudson54241132001-12-07 15:38:26 +000017003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017004 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17005echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017006if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017008else
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017010LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017012/* confdefs.h. */
17013_ACEOF
17014cat confdefs.h >>conftest.$ac_ext
17015cat >>conftest.$ac_ext <<_ACEOF
17016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017017
Martin v. Löwiseba40652007-08-30 20:10:57 +000017018/* Override any GCC internal prototype to avoid an error.
17019 Use char because int might match the return type of a GCC
17020 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017021#ifdef __cplusplus
17022extern "C"
17023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017024char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017025int
17026main ()
17027{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017028return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 ;
17030 return 0;
17031}
17032_ACEOF
17033rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017034if { (ac_try="$ac_link"
17035case "(($ac_try" in
17036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17037 *) ac_try_echo=$ac_try;;
17038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017042 grep -v '^ *+' conftest.er1 >conftest.err
17043 rm -f conftest.er1
17044 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046 (exit $ac_status); } && {
17047 test -z "$ac_c_werror_flag" ||
17048 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017049 } && test -s conftest$ac_exeext &&
17050 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017051 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017054sed 's/^/| /' conftest.$ac_ext >&5
17055
Martin v. Löwiseba40652007-08-30 20:10:57 +000017056 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017058
17059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017061LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017063{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17064echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17065if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017067#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017068_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017069
Martin v. Löwis130fb172001-07-19 11:00:41 +000017070 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017071 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017072 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017073fi
17074
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017075
Neal Norwitza978ab02002-11-02 16:58:05 +000017076 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017077 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17078echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017079if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017081else
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017083LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017085/* confdefs.h. */
17086_ACEOF
17087cat confdefs.h >>conftest.$ac_ext
17088cat >>conftest.$ac_ext <<_ACEOF
17089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017090
Martin v. Löwiseba40652007-08-30 20:10:57 +000017091/* Override any GCC internal prototype to avoid an error.
17092 Use char because int might match the return type of a GCC
17093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017094#ifdef __cplusplus
17095extern "C"
17096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017097char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017098int
17099main ()
17100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 ;
17103 return 0;
17104}
17105_ACEOF
17106rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017107if { (ac_try="$ac_link"
17108case "(($ac_try" in
17109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17110 *) ac_try_echo=$ac_try;;
17111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017115 grep -v '^ *+' conftest.er1 >conftest.err
17116 rm -f conftest.er1
17117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017119 (exit $ac_status); } && {
17120 test -z "$ac_c_werror_flag" ||
17121 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017122 } && test -s conftest$ac_exeext &&
17123 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017127sed 's/^/| /' conftest.$ac_ext >&5
17128
Martin v. Löwiseba40652007-08-30 20:10:57 +000017129 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131
17132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017134LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017136{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17137echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17138if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017140#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017141_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017142
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017143 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017144 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017145 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017146fi
17147
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017148 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017149
Martin v. Löwis130fb172001-07-19 11:00:41 +000017150 if test "$USE_THREAD_MODULE" != "#"
17151 then
17152 # If the above checks didn't disable threads, (at least) OSF1
17153 # needs this '-threads' argument during linking.
17154 case $ac_sys_system in
17155 OSF1) LDLAST=-threads;;
17156 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017157 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017159
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017160if test "$posix_threads" = "yes"; then
17161 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017162
17163cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017164#define _POSIX_THREADS 1
17165_ACEOF
17166
17167 fi
17168
17169 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17170 case $ac_sys_system/$ac_sys_release in
17171 SunOS/5.6)
17172cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017173#define HAVE_PTHREAD_DESTRUCTOR 1
17174_ACEOF
17175
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017176 ;;
17177 SunOS/5.8)
17178cat >>confdefs.h <<\_ACEOF
17179#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17180_ACEOF
17181
17182 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017183 AIX/5)
17184cat >>confdefs.h <<\_ACEOF
17185#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17186_ACEOF
17187
17188 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017189 esac
17190
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017191 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17192echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017193 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017195else
17196 if test "$cross_compiling" = yes; then
17197 ac_cv_pthread_system_supported=no
17198else
17199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017200/* confdefs.h. */
17201_ACEOF
17202cat confdefs.h >>conftest.$ac_ext
17203cat >>conftest.$ac_ext <<_ACEOF
17204/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017205#include <pthread.h>
17206 void *foo(void *parm) {
17207 return NULL;
17208 }
17209 main() {
17210 pthread_attr_t attr;
17211 pthread_t id;
17212 if (pthread_attr_init(&attr)) exit(-1);
17213 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17214 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17215 exit(0);
17216 }
17217_ACEOF
17218rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219if { (ac_try="$ac_link"
17220case "(($ac_try" in
17221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17222 *) ac_try_echo=$ac_try;;
17223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017226 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017228 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229 { (case "(($ac_try" in
17230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17231 *) ac_try_echo=$ac_try;;
17232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017234 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017235 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017237 (exit $ac_status); }; }; then
17238 ac_cv_pthread_system_supported=yes
17239else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017240 echo "$as_me: program exited with status $ac_status" >&5
17241echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017242sed 's/^/| /' conftest.$ac_ext >&5
17243
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017244( exit $ac_status )
17245ac_cv_pthread_system_supported=no
17246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017247rm -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 +000017248fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017249
Martin v. Löwiseba40652007-08-30 20:10:57 +000017250
17251
Guido van Rossum627b2d71993-12-24 10:39:16 +000017252fi
17253
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017254 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17255echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017256 if test "$ac_cv_pthread_system_supported" = "yes"; then
17257
17258cat >>confdefs.h <<\_ACEOF
17259#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17260_ACEOF
17261
17262 fi
17263
17264for ac_func in pthread_sigmask
17265do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17267{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017269if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017271else
17272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017273/* confdefs.h. */
17274_ACEOF
17275cat confdefs.h >>conftest.$ac_ext
17276cat >>conftest.$ac_ext <<_ACEOF
17277/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017278/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17280#define $ac_func innocuous_$ac_func
17281
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017282/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017283 which can conflict with char $ac_func (); below.
17284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017285 <limits.h> exists even on freestanding compilers. */
17286
17287#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017288# include <limits.h>
17289#else
17290# include <assert.h>
17291#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017292
17293#undef $ac_func
17294
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295/* Override any GCC internal prototype to avoid an error.
17296 Use char because int might match the return type of a GCC
17297 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017298#ifdef __cplusplus
17299extern "C"
17300#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017301char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017302/* The GNU C library defines this for functions which it implements
17303 to always fail with ENOSYS. Some functions are actually named
17304 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017305#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017306choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017307#endif
17308
Skip Montanaro6dead952003-09-25 14:50:04 +000017309int
17310main ()
17311{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017312return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017313 ;
17314 return 0;
17315}
17316_ACEOF
17317rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017318if { (ac_try="$ac_link"
17319case "(($ac_try" in
17320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17321 *) ac_try_echo=$ac_try;;
17322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017324 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017326 grep -v '^ *+' conftest.er1 >conftest.err
17327 rm -f conftest.er1
17328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017330 (exit $ac_status); } && {
17331 test -z "$ac_c_werror_flag" ||
17332 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017333 } && test -s conftest$ac_exeext &&
17334 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017335 eval "$as_ac_var=yes"
17336else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017338sed 's/^/| /' conftest.$ac_ext >&5
17339
Martin v. Löwiseba40652007-08-30 20:10:57 +000017340 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017342
17343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017346ac_res=`eval echo '${'$as_ac_var'}'`
17347 { echo "$as_me:$LINENO: result: $ac_res" >&5
17348echo "${ECHO_T}$ac_res" >&6; }
17349if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017350 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017351#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017352_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017353 case $ac_sys_system in
17354 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017355
Jason Tishlerfac083d2003-07-22 15:20:49 +000017356cat >>confdefs.h <<\_ACEOF
17357#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17358_ACEOF
17359
17360 ;;
17361 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017362fi
17363done
17364
17365fi
17366
17367
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017368# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017369
17370
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017371{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17372echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017373# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017374if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017375 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017376 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017377 { echo "$as_me:$LINENO: result: no" >&5
17378echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017379 ipv6=no
17380 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017381 *) { echo "$as_me:$LINENO: result: yes" >&5
17382echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017383 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017384#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017385_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017386
17387 ipv6=yes
17388 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017390else
Martin v. Löwis11437992002-04-12 09:54:03 +000017391
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017393 { echo "$as_me:$LINENO: result: no" >&5
17394echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017395 ipv6=no
17396
17397else
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017399/* confdefs.h. */
17400_ACEOF
17401cat confdefs.h >>conftest.$ac_ext
17402cat >>conftest.$ac_ext <<_ACEOF
17403/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017404 /* AF_INET6 available check */
17405#include <sys/types.h>
17406#include <sys/socket.h>
17407main()
17408{
17409 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17410 exit(1);
17411 else
17412 exit(0);
17413}
17414
Martin v. Löwis11437992002-04-12 09:54:03 +000017415_ACEOF
17416rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017417if { (ac_try="$ac_link"
17418case "(($ac_try" in
17419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17420 *) ac_try_echo=$ac_try;;
17421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017427 { (case "(($ac_try" in
17428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17429 *) ac_try_echo=$ac_try;;
17430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017432 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017435 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017436 { echo "$as_me:$LINENO: result: yes" >&5
17437echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017438 ipv6=yes
17439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017440 echo "$as_me: program exited with status $ac_status" >&5
17441echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017442sed 's/^/| /' conftest.$ac_ext >&5
17443
Martin v. Löwis11437992002-04-12 09:54:03 +000017444( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017445{ echo "$as_me:$LINENO: result: no" >&5
17446echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017447 ipv6=no
17448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017449rm -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 +000017450fi
17451
Martin v. Löwiseba40652007-08-30 20:10:57 +000017452
17453
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017454if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017455 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17456echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017458/* confdefs.h. */
17459_ACEOF
17460cat confdefs.h >>conftest.$ac_ext
17461cat >>conftest.$ac_ext <<_ACEOF
17462/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017463#include <sys/types.h>
17464#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017465int
17466main ()
17467{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017468struct sockaddr_in6 x;
17469x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 ;
17471 return 0;
17472}
17473_ACEOF
17474rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475if { (ac_try="$ac_compile"
17476case "(($ac_try" in
17477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17478 *) ac_try_echo=$ac_try;;
17479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017483 grep -v '^ *+' conftest.er1 >conftest.err
17484 rm -f conftest.er1
17485 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017487 (exit $ac_status); } && {
17488 test -z "$ac_c_werror_flag" ||
17489 test ! -s conftest.err
17490 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017491 { echo "$as_me:$LINENO: result: yes" >&5
17492echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017493 ipv6=yes
17494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017496sed 's/^/| /' conftest.$ac_ext >&5
17497
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017498 { echo "$as_me:$LINENO: result: no" >&5
17499echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017500 ipv6=no
17501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502
17503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017504fi
17505
17506if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017507 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017508#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017509_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017510
17511fi
17512
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513fi
17514
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017515
17516ipv6type=unknown
17517ipv6lib=none
17518ipv6trylibc=no
17519
17520if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017521 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17522echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017523 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17524 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017525 case $i in
17526 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017528/* confdefs.h. */
17529_ACEOF
17530cat confdefs.h >>conftest.$ac_ext
17531cat >>conftest.$ac_ext <<_ACEOF
17532/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017533
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017534#include <netinet/in.h>
17535#ifdef IPV6_INRIA_VERSION
17536yes
17537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017538_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017540 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017541 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017542fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017543rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017544
17545 ;;
17546 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017548/* confdefs.h. */
17549_ACEOF
17550cat confdefs.h >>conftest.$ac_ext
17551cat >>conftest.$ac_ext <<_ACEOF
17552/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017553
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017554#include <netinet/in.h>
17555#ifdef __KAME__
17556yes
17557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017558_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017560 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017561 ipv6type=$i;
17562 ipv6lib=inet6
17563 ipv6libdir=/usr/local/v6/lib
17564 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017565fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017566rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017567
17568 ;;
17569 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017571/* confdefs.h. */
17572_ACEOF
17573cat confdefs.h >>conftest.$ac_ext
17574cat >>conftest.$ac_ext <<_ACEOF
17575/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017576
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017577#include <features.h>
17578#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17579yes
17580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017581_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017583 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017584 ipv6type=$i;
17585 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017586fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017587rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017588
17589 ;;
17590 linux-inet6)
17591 if test -d /usr/inet6; then
17592 ipv6type=$i
17593 ipv6lib=inet6
17594 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017595 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017596 fi
17597 ;;
17598 solaris)
17599 if test -f /etc/netconfig; then
17600 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17601 ipv6type=$i
17602 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017603 fi
17604 fi
17605 ;;
17606 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017608/* confdefs.h. */
17609_ACEOF
17610cat confdefs.h >>conftest.$ac_ext
17611cat >>conftest.$ac_ext <<_ACEOF
17612/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017613
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017614#include <sys/param.h>
17615#ifdef _TOSHIBA_INET6
17616yes
17617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017618_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017620 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017621 ipv6type=$i;
17622 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017623 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017624fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017625rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017626
17627 ;;
17628 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017630/* confdefs.h. */
17631_ACEOF
17632cat confdefs.h >>conftest.$ac_ext
17633cat >>conftest.$ac_ext <<_ACEOF
17634/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017636#include </usr/local/v6/include/sys/v6config.h>
17637#ifdef __V6D__
17638yes
17639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017640_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017642 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017643 ipv6type=$i;
17644 ipv6lib=v6;
17645 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017646 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017647fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017648rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017649
17650 ;;
17651 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017653/* confdefs.h. */
17654_ACEOF
17655cat confdefs.h >>conftest.$ac_ext
17656cat >>conftest.$ac_ext <<_ACEOF
17657/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017658
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017659#include <sys/param.h>
17660#ifdef _ZETA_MINAMI_INET6
17661yes
17662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017663_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017665 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017666 ipv6type=$i;
17667 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017668 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017669fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000017670rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017671
17672 ;;
17673 esac
17674 if test "$ipv6type" != "unknown"; then
17675 break
17676 fi
17677 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017678 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17679echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017680fi
17681
17682if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17683 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17684 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17685 echo "using lib$ipv6lib"
17686 else
17687 if test $ipv6trylibc = "yes"; then
17688 echo "using libc"
17689 else
17690 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17691 echo "You need to fetch lib$ipv6lib.a from appropriate"
17692 echo 'ipv6 kit and compile beforehand.'
17693 exit 1
17694 fi
17695 fi
17696fi
17697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017698{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17699echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017700cat >conftest.$ac_ext <<_ACEOF
17701/* confdefs.h. */
17702_ACEOF
17703cat confdefs.h >>conftest.$ac_ext
17704cat >>conftest.$ac_ext <<_ACEOF
17705/* end confdefs.h. */
17706#include <Carbon/Carbon.h>
17707int
17708main ()
17709{
17710FSIORefNum fRef = 0
17711 ;
17712 return 0;
17713}
17714_ACEOF
17715rm -f conftest.$ac_objext
17716if { (ac_try="$ac_compile"
17717case "(($ac_try" in
17718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17719 *) ac_try_echo=$ac_try;;
17720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017722 (eval "$ac_compile") 2>conftest.er1
17723 ac_status=$?
17724 grep -v '^ *+' conftest.er1 >conftest.err
17725 rm -f conftest.er1
17726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017728 (exit $ac_status); } && {
17729 test -z "$ac_c_werror_flag" ||
17730 test ! -s conftest.err
17731 } && test -s conftest.$ac_objext; then
17732
17733cat >>confdefs.h <<\_ACEOF
17734#define HAVE_OSX105_SDK 1
17735_ACEOF
17736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017737 { echo "$as_me:$LINENO: result: yes" >&5
17738echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017740 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017741sed 's/^/| /' conftest.$ac_ext >&5
17742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017743 { echo "$as_me:$LINENO: result: no" >&5
17744echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017745
17746fi
17747
17748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17749
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017750# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017751{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17752echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017753
Martin v. Löwiseba40652007-08-30 20:10:57 +000017754# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017755if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017756 withval=$with_doc_strings;
17757fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017758
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017759
17760if test -z "$with_doc_strings"
17761then with_doc_strings="yes"
17762fi
17763if test "$with_doc_strings" != "no"
17764then
17765
17766cat >>confdefs.h <<\_ACEOF
17767#define WITH_DOC_STRINGS 1
17768_ACEOF
17769
17770fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017771{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17772echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017773
Neil Schemenauera35c6882001-02-27 04:45:05 +000017774# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017775{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17776echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017777
Martin v. Löwiseba40652007-08-30 20:10:57 +000017778# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017779if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017780 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017781if test "$withval" != no
17782then
17783
17784cat >>confdefs.h <<\_ACEOF
17785#define WITH_TSC 1
17786_ACEOF
17787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017788 { echo "$as_me:$LINENO: result: yes" >&5
17789echo "${ECHO_T}yes" >&6; }
17790else { echo "$as_me:$LINENO: result: no" >&5
17791echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017792fi
17793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017794 { echo "$as_me:$LINENO: result: no" >&5
17795echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017796fi
17797
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017798
17799# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017800{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17801echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017802
Martin v. Löwiseba40652007-08-30 20:10:57 +000017803# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017804if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017805 withval=$with_pymalloc;
17806fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017807
Neil Schemenauera35c6882001-02-27 04:45:05 +000017808
Neil Schemenauer16c22972002-03-22 15:34:49 +000017809if test -z "$with_pymalloc"
17810then with_pymalloc="yes"
17811fi
17812if test "$with_pymalloc" != "no"
17813then
Martin v. Löwis11437992002-04-12 09:54:03 +000017814
17815cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017816#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017817_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017818
17819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017820{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17821echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017822
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017823# Check for Valgrind support
17824{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17825echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17826
17827# Check whether --with-valgrind was given.
17828if test "${with_valgrind+set}" = set; then
17829 withval=$with_valgrind;
17830else
17831 with_valgrind=no
17832fi
17833
17834{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17835echo "${ECHO_T}$with_valgrind" >&6; }
17836if test "$with_valgrind" != no; then
17837 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17838 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17839echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17840if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17841 echo $ECHO_N "(cached) $ECHO_C" >&6
17842fi
17843{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17844echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17845else
17846 # Is the header compilable?
17847{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17848echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17849cat >conftest.$ac_ext <<_ACEOF
17850/* confdefs.h. */
17851_ACEOF
17852cat confdefs.h >>conftest.$ac_ext
17853cat >>conftest.$ac_ext <<_ACEOF
17854/* end confdefs.h. */
17855$ac_includes_default
17856#include <valgrind/valgrind.h>
17857_ACEOF
17858rm -f conftest.$ac_objext
17859if { (ac_try="$ac_compile"
17860case "(($ac_try" in
17861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17862 *) ac_try_echo=$ac_try;;
17863esac
17864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17865 (eval "$ac_compile") 2>conftest.er1
17866 ac_status=$?
17867 grep -v '^ *+' conftest.er1 >conftest.err
17868 rm -f conftest.er1
17869 cat conftest.err >&5
17870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17871 (exit $ac_status); } && {
17872 test -z "$ac_c_werror_flag" ||
17873 test ! -s conftest.err
17874 } && test -s conftest.$ac_objext; then
17875 ac_header_compiler=yes
17876else
17877 echo "$as_me: failed program was:" >&5
17878sed 's/^/| /' conftest.$ac_ext >&5
17879
17880 ac_header_compiler=no
17881fi
17882
17883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17884{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17885echo "${ECHO_T}$ac_header_compiler" >&6; }
17886
17887# Is the header present?
17888{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17889echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17890cat >conftest.$ac_ext <<_ACEOF
17891/* confdefs.h. */
17892_ACEOF
17893cat confdefs.h >>conftest.$ac_ext
17894cat >>conftest.$ac_ext <<_ACEOF
17895/* end confdefs.h. */
17896#include <valgrind/valgrind.h>
17897_ACEOF
17898if { (ac_try="$ac_cpp conftest.$ac_ext"
17899case "(($ac_try" in
17900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17901 *) ac_try_echo=$ac_try;;
17902esac
17903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17904 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17905 ac_status=$?
17906 grep -v '^ *+' conftest.er1 >conftest.err
17907 rm -f conftest.er1
17908 cat conftest.err >&5
17909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17910 (exit $ac_status); } >/dev/null && {
17911 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17912 test ! -s conftest.err
17913 }; then
17914 ac_header_preproc=yes
17915else
17916 echo "$as_me: failed program was:" >&5
17917sed 's/^/| /' conftest.$ac_ext >&5
17918
17919 ac_header_preproc=no
17920fi
17921
17922rm -f conftest.err conftest.$ac_ext
17923{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17924echo "${ECHO_T}$ac_header_preproc" >&6; }
17925
17926# So? What about this header?
17927case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17928 yes:no: )
17929 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17930echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17931 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17932echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17933 ac_header_preproc=yes
17934 ;;
17935 no:yes:* )
17936 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17937echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17938 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17939echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17940 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17941echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17942 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17943echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17944 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17945echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17946 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17947echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17948 ( cat <<\_ASBOX
17949## -------------------------------------- ##
17950## Report this to http://bugs.python.org/ ##
17951## -------------------------------------- ##
17952_ASBOX
17953 ) | sed "s/^/$as_me: WARNING: /" >&2
17954 ;;
17955esac
17956{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17957echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17958if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17959 echo $ECHO_N "(cached) $ECHO_C" >&6
17960else
17961 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17962fi
17963{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17964echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17965
17966fi
17967if test $ac_cv_header_valgrind_valgrind_h = yes; then
17968
17969cat >>confdefs.h <<\_ACEOF
17970#define WITH_VALGRIND 1
17971_ACEOF
17972
17973else
17974 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17975echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17976 { (exit 1); exit 1; }; }
17977
17978fi
17979
17980
17981fi
17982
Barry Warsawef82cd72000-06-30 16:21:01 +000017983# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017984{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17985echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017986
Martin v. Löwiseba40652007-08-30 20:10:57 +000017987# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017988if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017989 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017990if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017991then
17992
17993cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017994#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017995_ACEOF
17996
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017997 { echo "$as_me:$LINENO: result: yes" >&5
17998echo "${ECHO_T}yes" >&6; }
17999else { echo "$as_me:$LINENO: result: no" >&5
18000echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018001fi
18002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018003 { echo "$as_me:$LINENO: result: no" >&5
18004echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018005fi
18006
Barry Warsawef82cd72000-06-30 16:21:01 +000018007
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018008# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018009
Guido van Rossum98935bf2001-09-05 19:13:16 +000018010DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018011
Guido van Rossume97ee181999-12-20 21:27:22 +000018012# the dlopen() function means we might want to use dynload_shlib.o. some
18013# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018014
Thomas Wouters3a584202000-08-05 23:28:51 +000018015for ac_func in dlopen
18016do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018017as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18018{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18019echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018022else
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018024/* confdefs.h. */
18025_ACEOF
18026cat confdefs.h >>conftest.$ac_ext
18027cat >>conftest.$ac_ext <<_ACEOF
18028/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018029/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18030 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18031#define $ac_func innocuous_$ac_func
18032
Guido van Rossume97ee181999-12-20 21:27:22 +000018033/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018034 which can conflict with char $ac_func (); below.
18035 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018036 <limits.h> exists even on freestanding compilers. */
18037
18038#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018039# include <limits.h>
18040#else
18041# include <assert.h>
18042#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018043
18044#undef $ac_func
18045
Martin v. Löwiseba40652007-08-30 20:10:57 +000018046/* Override any GCC internal prototype to avoid an error.
18047 Use char because int might match the return type of a GCC
18048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018049#ifdef __cplusplus
18050extern "C"
18051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018052char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018053/* The GNU C library defines this for functions which it implements
18054 to always fail with ENOSYS. Some functions are actually named
18055 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018056#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018057choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018058#endif
18059
Skip Montanaro6dead952003-09-25 14:50:04 +000018060int
18061main ()
18062{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018063return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018064 ;
18065 return 0;
18066}
18067_ACEOF
18068rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018069if { (ac_try="$ac_link"
18070case "(($ac_try" in
18071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18072 *) ac_try_echo=$ac_try;;
18073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018077 grep -v '^ *+' conftest.er1 >conftest.err
18078 rm -f conftest.er1
18079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018081 (exit $ac_status); } && {
18082 test -z "$ac_c_werror_flag" ||
18083 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018084 } && test -s conftest$ac_exeext &&
18085 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018086 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018089sed 's/^/| /' conftest.$ac_ext >&5
18090
Martin v. Löwiseba40652007-08-30 20:10:57 +000018091 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093
18094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018095 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018096fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018097ac_res=`eval echo '${'$as_ac_var'}'`
18098 { echo "$as_me:$LINENO: result: $ac_res" >&5
18099echo "${ECHO_T}$ac_res" >&6; }
18100if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018102#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018103_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018104
Guido van Rossume97ee181999-12-20 21:27:22 +000018105fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018106done
Guido van Rossume97ee181999-12-20 21:27:22 +000018107
Michael W. Hudson54241132001-12-07 15:38:26 +000018108
Guido van Rossume97ee181999-12-20 21:27:22 +000018109# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18110# loading of modules.
18111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018112{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18113echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018114if test -z "$DYNLOADFILE"
18115then
18116 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018117 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18118 if test "$ac_cv_func_dlopen" = yes
18119 then DYNLOADFILE="dynload_shlib.o"
18120 else DYNLOADFILE="dynload_aix.o"
18121 fi
18122 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018123 BeOS*) DYNLOADFILE="dynload_beos.o";;
18124 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018125 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18126 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018127 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018128 *)
18129 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18130 # out any dynamic loading
18131 if test "$ac_cv_func_dlopen" = yes
18132 then DYNLOADFILE="dynload_shlib.o"
18133 else DYNLOADFILE="dynload_stub.o"
18134 fi
18135 ;;
18136 esac
18137fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018138{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18139echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018140if test "$DYNLOADFILE" != "dynload_stub.o"
18141then
Martin v. Löwis11437992002-04-12 09:54:03 +000018142
18143cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018144#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018145_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018146
18147fi
18148
Neil Schemenauer4e425612001-06-19 15:44:15 +000018149# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18150
Michael W. Hudson54241132001-12-07 15:38:26 +000018151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018152{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18153echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018154if test -z "$MACHDEP_OBJS"
18155then
Jack Jansene578a632001-08-15 01:27:14 +000018156 MACHDEP_OBJS=$extra_machdep_objs
18157else
18158 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018160{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18161echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018162
Guido van Rossum627b2d71993-12-24 10:39:16 +000018163# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000018235
Martin v. Löwisc3001752005-01-23 09:27:24 +000018236
18237
Neal Norwitz05a45592006-03-20 06:30:08 +000018238
18239
Martin v. Löwis382abef2007-02-19 10:55:19 +000018240
18241
Christian Heimes36281872007-11-30 21:11:28 +000018242
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018243
18244
Jesse Noller355b1262009-04-02 00:03:28 +000018245
18246
18247
18248
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018262
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018263for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18264 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018265 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018266 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018267 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018268 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018269 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018270 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18271 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018272 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018273 setlocale setregid setreuid setresuid setresgid \
18274 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018275 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018276 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018277 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018278do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18280{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018282if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018284else
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018286/* confdefs.h. */
18287_ACEOF
18288cat confdefs.h >>conftest.$ac_ext
18289cat >>conftest.$ac_ext <<_ACEOF
18290/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018291/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18293#define $ac_func innocuous_$ac_func
18294
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018295/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018296 which can conflict with char $ac_func (); below.
18297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018298 <limits.h> exists even on freestanding compilers. */
18299
18300#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018301# include <limits.h>
18302#else
18303# include <assert.h>
18304#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018305
18306#undef $ac_func
18307
Martin v. Löwiseba40652007-08-30 20:10:57 +000018308/* Override any GCC internal prototype to avoid an error.
18309 Use char because int might match the return type of a GCC
18310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018311#ifdef __cplusplus
18312extern "C"
18313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018314char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018315/* The GNU C library defines this for functions which it implements
18316 to always fail with ENOSYS. Some functions are actually named
18317 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018318#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018319choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018320#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018321
Skip Montanaro6dead952003-09-25 14:50:04 +000018322int
18323main ()
18324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018325return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018326 ;
18327 return 0;
18328}
18329_ACEOF
18330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018331if { (ac_try="$ac_link"
18332case "(($ac_try" in
18333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18334 *) ac_try_echo=$ac_try;;
18335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018339 grep -v '^ *+' conftest.er1 >conftest.err
18340 rm -f conftest.er1
18341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343 (exit $ac_status); } && {
18344 test -z "$ac_c_werror_flag" ||
18345 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018346 } && test -s conftest$ac_exeext &&
18347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018351sed 's/^/| /' conftest.$ac_ext >&5
18352
Martin v. Löwiseba40652007-08-30 20:10:57 +000018353 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018355
18356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018357 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018358fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018359ac_res=`eval echo '${'$as_ac_var'}'`
18360 { echo "$as_me:$LINENO: result: $ac_res" >&5
18361echo "${ECHO_T}$ac_res" >&6; }
18362if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018363 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018365_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018367fi
18368done
18369
Michael W. Hudson54241132001-12-07 15:38:26 +000018370
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018371# For some functions, having a definition is not sufficient, since
18372# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018373{ echo "$as_me:$LINENO: checking for chroot" >&5
18374echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018376/* confdefs.h. */
18377_ACEOF
18378cat confdefs.h >>conftest.$ac_ext
18379cat >>conftest.$ac_ext <<_ACEOF
18380/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018381#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018382int
18383main ()
18384{
18385void *x=chroot
18386 ;
18387 return 0;
18388}
18389_ACEOF
18390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018391if { (ac_try="$ac_compile"
18392case "(($ac_try" in
18393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18394 *) ac_try_echo=$ac_try;;
18395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018399 grep -v '^ *+' conftest.er1 >conftest.err
18400 rm -f conftest.er1
18401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018403 (exit $ac_status); } && {
18404 test -z "$ac_c_werror_flag" ||
18405 test ! -s conftest.err
18406 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018407
18408cat >>confdefs.h <<\_ACEOF
18409#define HAVE_CHROOT 1
18410_ACEOF
18411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018412 { echo "$as_me:$LINENO: result: yes" >&5
18413echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018416sed 's/^/| /' conftest.$ac_ext >&5
18417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018418 { echo "$as_me:$LINENO: result: no" >&5
18419echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018420
18421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018422
18423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018424{ echo "$as_me:$LINENO: checking for link" >&5
18425echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018427/* confdefs.h. */
18428_ACEOF
18429cat confdefs.h >>conftest.$ac_ext
18430cat >>conftest.$ac_ext <<_ACEOF
18431/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018432#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018433int
18434main ()
18435{
18436void *x=link
18437 ;
18438 return 0;
18439}
18440_ACEOF
18441rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018442if { (ac_try="$ac_compile"
18443case "(($ac_try" in
18444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18445 *) ac_try_echo=$ac_try;;
18446esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018450 grep -v '^ *+' conftest.er1 >conftest.err
18451 rm -f conftest.er1
18452 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018454 (exit $ac_status); } && {
18455 test -z "$ac_c_werror_flag" ||
18456 test ! -s conftest.err
18457 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018458
18459cat >>confdefs.h <<\_ACEOF
18460#define HAVE_LINK 1
18461_ACEOF
18462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018463 { echo "$as_me:$LINENO: result: yes" >&5
18464echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018467sed 's/^/| /' conftest.$ac_ext >&5
18468
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018469 { echo "$as_me:$LINENO: result: no" >&5
18470echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018471
18472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018473
18474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018475{ echo "$as_me:$LINENO: checking for symlink" >&5
18476echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018478/* confdefs.h. */
18479_ACEOF
18480cat confdefs.h >>conftest.$ac_ext
18481cat >>conftest.$ac_ext <<_ACEOF
18482/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018483#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018484int
18485main ()
18486{
18487void *x=symlink
18488 ;
18489 return 0;
18490}
18491_ACEOF
18492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018493if { (ac_try="$ac_compile"
18494case "(($ac_try" in
18495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18496 *) ac_try_echo=$ac_try;;
18497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018501 grep -v '^ *+' conftest.er1 >conftest.err
18502 rm -f conftest.er1
18503 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018505 (exit $ac_status); } && {
18506 test -z "$ac_c_werror_flag" ||
18507 test ! -s conftest.err
18508 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018509
18510cat >>confdefs.h <<\_ACEOF
18511#define HAVE_SYMLINK 1
18512_ACEOF
18513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018514 { echo "$as_me:$LINENO: result: yes" >&5
18515echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018518sed 's/^/| /' conftest.$ac_ext >&5
18519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018520 { echo "$as_me:$LINENO: result: no" >&5
18521echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018522
18523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018524
18525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018526{ echo "$as_me:$LINENO: checking for fchdir" >&5
18527echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018529/* confdefs.h. */
18530_ACEOF
18531cat confdefs.h >>conftest.$ac_ext
18532cat >>conftest.$ac_ext <<_ACEOF
18533/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018534#include <unistd.h>
18535int
18536main ()
18537{
18538void *x=fchdir
18539 ;
18540 return 0;
18541}
18542_ACEOF
18543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018544if { (ac_try="$ac_compile"
18545case "(($ac_try" in
18546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18547 *) ac_try_echo=$ac_try;;
18548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018552 grep -v '^ *+' conftest.er1 >conftest.err
18553 rm -f conftest.er1
18554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018556 (exit $ac_status); } && {
18557 test -z "$ac_c_werror_flag" ||
18558 test ! -s conftest.err
18559 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018560
18561cat >>confdefs.h <<\_ACEOF
18562#define HAVE_FCHDIR 1
18563_ACEOF
18564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018565 { echo "$as_me:$LINENO: result: yes" >&5
18566echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018569sed 's/^/| /' conftest.$ac_ext >&5
18570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018571 { echo "$as_me:$LINENO: result: no" >&5
18572echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018573
18574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018575
18576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018577{ echo "$as_me:$LINENO: checking for fsync" >&5
18578echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018579cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018580/* confdefs.h. */
18581_ACEOF
18582cat confdefs.h >>conftest.$ac_ext
18583cat >>conftest.$ac_ext <<_ACEOF
18584/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018585#include <unistd.h>
18586int
18587main ()
18588{
18589void *x=fsync
18590 ;
18591 return 0;
18592}
18593_ACEOF
18594rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018595if { (ac_try="$ac_compile"
18596case "(($ac_try" in
18597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18598 *) ac_try_echo=$ac_try;;
18599esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018603 grep -v '^ *+' conftest.er1 >conftest.err
18604 rm -f conftest.er1
18605 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018607 (exit $ac_status); } && {
18608 test -z "$ac_c_werror_flag" ||
18609 test ! -s conftest.err
18610 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018611
18612cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018613#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018614_ACEOF
18615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018616 { echo "$as_me:$LINENO: result: yes" >&5
18617echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018618else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018620sed 's/^/| /' conftest.$ac_ext >&5
18621
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018622 { echo "$as_me:$LINENO: result: no" >&5
18623echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018624
18625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626
18627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018628{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18629echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018631/* confdefs.h. */
18632_ACEOF
18633cat confdefs.h >>conftest.$ac_ext
18634cat >>conftest.$ac_ext <<_ACEOF
18635/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018636#include <unistd.h>
18637int
18638main ()
18639{
18640void *x=fdatasync
18641 ;
18642 return 0;
18643}
18644_ACEOF
18645rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018646if { (ac_try="$ac_compile"
18647case "(($ac_try" in
18648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18649 *) ac_try_echo=$ac_try;;
18650esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018654 grep -v '^ *+' conftest.er1 >conftest.err
18655 rm -f conftest.er1
18656 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018658 (exit $ac_status); } && {
18659 test -z "$ac_c_werror_flag" ||
18660 test ! -s conftest.err
18661 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018662
18663cat >>confdefs.h <<\_ACEOF
18664#define HAVE_FDATASYNC 1
18665_ACEOF
18666
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018667 { echo "$as_me:$LINENO: result: yes" >&5
18668echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018669else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018671sed 's/^/| /' conftest.$ac_ext >&5
18672
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018673 { echo "$as_me:$LINENO: result: no" >&5
18674echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018675
18676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018677
18678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018679{ echo "$as_me:$LINENO: checking for epoll" >&5
18680echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018681cat >conftest.$ac_ext <<_ACEOF
18682/* confdefs.h. */
18683_ACEOF
18684cat confdefs.h >>conftest.$ac_ext
18685cat >>conftest.$ac_ext <<_ACEOF
18686/* end confdefs.h. */
18687#include <sys/epoll.h>
18688int
18689main ()
18690{
18691void *x=epoll_create
18692 ;
18693 return 0;
18694}
18695_ACEOF
18696rm -f conftest.$ac_objext
18697if { (ac_try="$ac_compile"
18698case "(($ac_try" in
18699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18700 *) ac_try_echo=$ac_try;;
18701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018703 (eval "$ac_compile") 2>conftest.er1
18704 ac_status=$?
18705 grep -v '^ *+' conftest.er1 >conftest.err
18706 rm -f conftest.er1
18707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018709 (exit $ac_status); } && {
18710 test -z "$ac_c_werror_flag" ||
18711 test ! -s conftest.err
18712 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018713
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018714cat >>confdefs.h <<\_ACEOF
18715#define HAVE_EPOLL 1
18716_ACEOF
18717
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018718 { echo "$as_me:$LINENO: result: yes" >&5
18719echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018720else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018721 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018722sed 's/^/| /' conftest.$ac_ext >&5
18723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018724 { echo "$as_me:$LINENO: result: no" >&5
18725echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018726
18727fi
18728
18729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018730{ echo "$as_me:$LINENO: checking for kqueue" >&5
18731echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018732cat >conftest.$ac_ext <<_ACEOF
18733/* confdefs.h. */
18734_ACEOF
18735cat confdefs.h >>conftest.$ac_ext
18736cat >>conftest.$ac_ext <<_ACEOF
18737/* end confdefs.h. */
18738
18739#include <sys/types.h>
18740#include <sys/event.h>
18741
18742int
18743main ()
18744{
18745int x=kqueue()
18746 ;
18747 return 0;
18748}
18749_ACEOF
18750rm -f conftest.$ac_objext
18751if { (ac_try="$ac_compile"
18752case "(($ac_try" in
18753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18754 *) ac_try_echo=$ac_try;;
18755esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018757 (eval "$ac_compile") 2>conftest.er1
18758 ac_status=$?
18759 grep -v '^ *+' conftest.er1 >conftest.err
18760 rm -f conftest.er1
18761 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018763 (exit $ac_status); } && {
18764 test -z "$ac_c_werror_flag" ||
18765 test ! -s conftest.err
18766 } && test -s conftest.$ac_objext; then
18767
18768cat >>confdefs.h <<\_ACEOF
18769#define HAVE_KQUEUE 1
18770_ACEOF
18771
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018772 { echo "$as_me:$LINENO: result: yes" >&5
18773echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018774else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018775 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018776sed 's/^/| /' conftest.$ac_ext >&5
18777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018778 { echo "$as_me:$LINENO: result: no" >&5
18779echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018780
18781fi
18782
18783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018784# On some systems (eg. FreeBSD 5), we would find a definition of the
18785# functions ctermid_r, setgroups in the library, but no prototype
18786# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18787# address to avoid compiler warnings and potential miscompilations
18788# because of the missing prototypes.
18789
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018790{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18791echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018793/* confdefs.h. */
18794_ACEOF
18795cat confdefs.h >>conftest.$ac_ext
18796cat >>conftest.$ac_ext <<_ACEOF
18797/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018798
18799#include "confdefs.h"
18800#include <stdio.h>
18801
Martin v. Löwisd5843682002-11-21 20:41:28 +000018802int
18803main ()
18804{
18805void* p = ctermid_r
18806 ;
18807 return 0;
18808}
18809_ACEOF
18810rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018811if { (ac_try="$ac_compile"
18812case "(($ac_try" in
18813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18814 *) ac_try_echo=$ac_try;;
18815esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018819 grep -v '^ *+' conftest.er1 >conftest.err
18820 rm -f conftest.er1
18821 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823 (exit $ac_status); } && {
18824 test -z "$ac_c_werror_flag" ||
18825 test ! -s conftest.err
18826 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018827
18828cat >>confdefs.h <<\_ACEOF
18829#define HAVE_CTERMID_R 1
18830_ACEOF
18831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018832 { echo "$as_me:$LINENO: result: yes" >&5
18833echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018834else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018836sed 's/^/| /' conftest.$ac_ext >&5
18837
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018838 { echo "$as_me:$LINENO: result: no" >&5
18839echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018840
18841fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018842
Martin v. Löwiseba40652007-08-30 20:10:57 +000018843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018845{ echo "$as_me:$LINENO: checking for flock" >&5
18846echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018848/* confdefs.h. */
18849_ACEOF
18850cat confdefs.h >>conftest.$ac_ext
18851cat >>conftest.$ac_ext <<_ACEOF
18852/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018853
18854#include "confdefs.h"
18855#include <sys/file.h>
18856
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018857int
18858main ()
18859{
18860void* p = flock
18861 ;
18862 return 0;
18863}
18864_ACEOF
18865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018866if { (ac_try="$ac_compile"
18867case "(($ac_try" in
18868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18869 *) ac_try_echo=$ac_try;;
18870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018874 grep -v '^ *+' conftest.er1 >conftest.err
18875 rm -f conftest.er1
18876 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018878 (exit $ac_status); } && {
18879 test -z "$ac_c_werror_flag" ||
18880 test ! -s conftest.err
18881 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018882
18883cat >>confdefs.h <<\_ACEOF
18884#define HAVE_FLOCK 1
18885_ACEOF
18886
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018887 { echo "$as_me:$LINENO: result: yes" >&5
18888echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018891sed 's/^/| /' conftest.$ac_ext >&5
18892
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018893 { echo "$as_me:$LINENO: result: no" >&5
18894echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018895
18896fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018897
Martin v. Löwiseba40652007-08-30 20:10:57 +000018898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018900{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18901echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018903/* confdefs.h. */
18904_ACEOF
18905cat confdefs.h >>conftest.$ac_ext
18906cat >>conftest.$ac_ext <<_ACEOF
18907/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018908
18909#include "confdefs.h"
18910#include <unistd.h>
18911
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018912int
18913main ()
18914{
18915void* p = getpagesize
18916 ;
18917 return 0;
18918}
18919_ACEOF
18920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921if { (ac_try="$ac_compile"
18922case "(($ac_try" in
18923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18924 *) ac_try_echo=$ac_try;;
18925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018929 grep -v '^ *+' conftest.er1 >conftest.err
18930 rm -f conftest.er1
18931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018933 (exit $ac_status); } && {
18934 test -z "$ac_c_werror_flag" ||
18935 test ! -s conftest.err
18936 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018937
18938cat >>confdefs.h <<\_ACEOF
18939#define HAVE_GETPAGESIZE 1
18940_ACEOF
18941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018942 { echo "$as_me:$LINENO: result: yes" >&5
18943echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018946sed 's/^/| /' conftest.$ac_ext >&5
18947
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018948 { echo "$as_me:$LINENO: result: no" >&5
18949echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018950
18951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952
18953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018954
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018955for ac_prog in true
18956do
18957 # Extract the first word of "$ac_prog", so it can be a program name with args.
18958set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018959{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018961if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018962 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018963else
18964 if test -n "$TRUE"; then
18965 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18966else
18967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18968for as_dir in $PATH
18969do
18970 IFS=$as_save_IFS
18971 test -z "$as_dir" && as_dir=.
18972 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018973 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 +000018974 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018975 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018976 break 2
18977 fi
18978done
18979done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018980IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018981
18982fi
18983fi
18984TRUE=$ac_cv_prog_TRUE
18985if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018986 { echo "$as_me:$LINENO: result: $TRUE" >&5
18987echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018989 { echo "$as_me:$LINENO: result: no" >&5
18990echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018991fi
18992
Martin v. Löwiseba40652007-08-30 20:10:57 +000018993
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018994 test -n "$TRUE" && break
18995done
18996test -n "$TRUE" || TRUE="/bin/true"
18997
18998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018999{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19000echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019001if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019003else
19004 ac_check_lib_save_LIBS=$LIBS
19005LIBS="-lc $LIBS"
19006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019007/* confdefs.h. */
19008_ACEOF
19009cat confdefs.h >>conftest.$ac_ext
19010cat >>conftest.$ac_ext <<_ACEOF
19011/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019012
Martin v. Löwiseba40652007-08-30 20:10:57 +000019013/* Override any GCC internal prototype to avoid an error.
19014 Use char because int might match the return type of a GCC
19015 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019016#ifdef __cplusplus
19017extern "C"
19018#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019019char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019020int
19021main ()
19022{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019024 ;
19025 return 0;
19026}
19027_ACEOF
19028rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019029if { (ac_try="$ac_link"
19030case "(($ac_try" in
19031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19032 *) ac_try_echo=$ac_try;;
19033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019035 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019037 grep -v '^ *+' conftest.er1 >conftest.err
19038 rm -f conftest.er1
19039 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041 (exit $ac_status); } && {
19042 test -z "$ac_c_werror_flag" ||
19043 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019044 } && test -s conftest$ac_exeext &&
19045 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019046 ac_cv_lib_c_inet_aton=yes
19047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019049sed 's/^/| /' conftest.$ac_ext >&5
19050
Martin v. Löwiseba40652007-08-30 20:10:57 +000019051 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019053
19054rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019056LIBS=$ac_check_lib_save_LIBS
19057fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019058{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19059echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19060if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019061 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019062else
19063
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019064{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19065echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019066if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019067 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019068else
19069 ac_check_lib_save_LIBS=$LIBS
19070LIBS="-lresolv $LIBS"
19071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019072/* confdefs.h. */
19073_ACEOF
19074cat confdefs.h >>conftest.$ac_ext
19075cat >>conftest.$ac_ext <<_ACEOF
19076/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019077
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078/* Override any GCC internal prototype to avoid an error.
19079 Use char because int might match the return type of a GCC
19080 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019081#ifdef __cplusplus
19082extern "C"
19083#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019084char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019085int
19086main ()
19087{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019088return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019089 ;
19090 return 0;
19091}
19092_ACEOF
19093rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019094if { (ac_try="$ac_link"
19095case "(($ac_try" in
19096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19097 *) ac_try_echo=$ac_try;;
19098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019102 grep -v '^ *+' conftest.er1 >conftest.err
19103 rm -f conftest.er1
19104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106 (exit $ac_status); } && {
19107 test -z "$ac_c_werror_flag" ||
19108 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019109 } && test -s conftest$ac_exeext &&
19110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019111 ac_cv_lib_resolv_inet_aton=yes
19112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019114sed 's/^/| /' conftest.$ac_ext >&5
19115
Martin v. Löwiseba40652007-08-30 20:10:57 +000019116 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118
19119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019121LIBS=$ac_check_lib_save_LIBS
19122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019123{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19124echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19125if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019126 cat >>confdefs.h <<_ACEOF
19127#define HAVE_LIBRESOLV 1
19128_ACEOF
19129
19130 LIBS="-lresolv $LIBS"
19131
19132fi
19133
19134
19135fi
19136
19137
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019138# On Tru64, chflags seems to be present, but calling it will
19139# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019140{ echo "$as_me:$LINENO: checking for chflags" >&5
19141echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019142if test "${ac_cv_have_chflags+set}" = set; then
19143 echo $ECHO_N "(cached) $ECHO_C" >&6
19144else
19145 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019146 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019147else
19148 cat >conftest.$ac_ext <<_ACEOF
19149/* confdefs.h. */
19150_ACEOF
19151cat confdefs.h >>conftest.$ac_ext
19152cat >>conftest.$ac_ext <<_ACEOF
19153/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019154[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019155#include <sys/stat.h>
19156#include <unistd.h>
19157int main(int argc, char*argv[])
19158{
19159 if(chflags(argv[0], 0) != 0)
19160 return 1;
19161 return 0;
19162}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019163]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019164_ACEOF
19165rm -f conftest$ac_exeext
19166if { (ac_try="$ac_link"
19167case "(($ac_try" in
19168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19169 *) ac_try_echo=$ac_try;;
19170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019172 (eval "$ac_link") 2>&5
19173 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19176 { (case "(($ac_try" in
19177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19178 *) ac_try_echo=$ac_try;;
19179esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019181 (eval "$ac_try") 2>&5
19182 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019184 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019185 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019186else
19187 echo "$as_me: program exited with status $ac_status" >&5
19188echo "$as_me: failed program was:" >&5
19189sed 's/^/| /' conftest.$ac_ext >&5
19190
19191( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019192ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019193fi
19194rm -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 +000019195fi
19196
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019197
19198
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019199fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019200{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19201echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019202if test "$ac_cv_have_chflags" = cross ; then
19203 { echo "$as_me:$LINENO: checking for chflags" >&5
19204echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19205if test "${ac_cv_func_chflags+set}" = set; then
19206 echo $ECHO_N "(cached) $ECHO_C" >&6
19207else
19208 cat >conftest.$ac_ext <<_ACEOF
19209/* confdefs.h. */
19210_ACEOF
19211cat confdefs.h >>conftest.$ac_ext
19212cat >>conftest.$ac_ext <<_ACEOF
19213/* end confdefs.h. */
19214/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19216#define chflags innocuous_chflags
19217
19218/* System header to define __stub macros and hopefully few prototypes,
19219 which can conflict with char chflags (); below.
19220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19221 <limits.h> exists even on freestanding compilers. */
19222
19223#ifdef __STDC__
19224# include <limits.h>
19225#else
19226# include <assert.h>
19227#endif
19228
19229#undef chflags
19230
19231/* Override any GCC internal prototype to avoid an error.
19232 Use char because int might match the return type of a GCC
19233 builtin and then its argument prototype would still apply. */
19234#ifdef __cplusplus
19235extern "C"
19236#endif
19237char chflags ();
19238/* The GNU C library defines this for functions which it implements
19239 to always fail with ENOSYS. Some functions are actually named
19240 something starting with __ and the normal name is an alias. */
19241#if defined __stub_chflags || defined __stub___chflags
19242choke me
19243#endif
19244
19245int
19246main ()
19247{
19248return chflags ();
19249 ;
19250 return 0;
19251}
19252_ACEOF
19253rm -f conftest.$ac_objext conftest$ac_exeext
19254if { (ac_try="$ac_link"
19255case "(($ac_try" in
19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19257 *) ac_try_echo=$ac_try;;
19258esac
19259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19260 (eval "$ac_link") 2>conftest.er1
19261 ac_status=$?
19262 grep -v '^ *+' conftest.er1 >conftest.err
19263 rm -f conftest.er1
19264 cat conftest.err >&5
19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19266 (exit $ac_status); } && {
19267 test -z "$ac_c_werror_flag" ||
19268 test ! -s conftest.err
19269 } && test -s conftest$ac_exeext &&
19270 $as_test_x conftest$ac_exeext; then
19271 ac_cv_func_chflags=yes
19272else
19273 echo "$as_me: failed program was:" >&5
19274sed 's/^/| /' conftest.$ac_ext >&5
19275
19276 ac_cv_func_chflags=no
19277fi
19278
19279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19280 conftest$ac_exeext conftest.$ac_ext
19281fi
19282{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19283echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19284if test $ac_cv_func_chflags = yes; then
19285 ac_cv_have_chflags="yes"
19286else
19287 ac_cv_have_chflags="no"
19288fi
19289
19290fi
19291if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019292
19293cat >>confdefs.h <<\_ACEOF
19294#define HAVE_CHFLAGS 1
19295_ACEOF
19296
19297fi
19298
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019299{ echo "$as_me:$LINENO: checking for lchflags" >&5
19300echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019301if test "${ac_cv_have_lchflags+set}" = set; then
19302 echo $ECHO_N "(cached) $ECHO_C" >&6
19303else
19304 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019305 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019306else
19307 cat >conftest.$ac_ext <<_ACEOF
19308/* confdefs.h. */
19309_ACEOF
19310cat confdefs.h >>conftest.$ac_ext
19311cat >>conftest.$ac_ext <<_ACEOF
19312/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019313[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019314#include <sys/stat.h>
19315#include <unistd.h>
19316int main(int argc, char*argv[])
19317{
19318 if(lchflags(argv[0], 0) != 0)
19319 return 1;
19320 return 0;
19321}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019322]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019323_ACEOF
19324rm -f conftest$ac_exeext
19325if { (ac_try="$ac_link"
19326case "(($ac_try" in
19327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19328 *) ac_try_echo=$ac_try;;
19329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019331 (eval "$ac_link") 2>&5
19332 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19335 { (case "(($ac_try" in
19336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19337 *) ac_try_echo=$ac_try;;
19338esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019340 (eval "$ac_try") 2>&5
19341 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019343 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019344 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019345else
19346 echo "$as_me: program exited with status $ac_status" >&5
19347echo "$as_me: failed program was:" >&5
19348sed 's/^/| /' conftest.$ac_ext >&5
19349
19350( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019351ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019352fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19354fi
19355
19356
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019357
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019358fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019359{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19360echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019361if test "$ac_cv_have_lchflags" = cross ; then
19362 { echo "$as_me:$LINENO: checking for lchflags" >&5
19363echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19364if test "${ac_cv_func_lchflags+set}" = set; then
19365 echo $ECHO_N "(cached) $ECHO_C" >&6
19366else
19367 cat >conftest.$ac_ext <<_ACEOF
19368/* confdefs.h. */
19369_ACEOF
19370cat confdefs.h >>conftest.$ac_ext
19371cat >>conftest.$ac_ext <<_ACEOF
19372/* end confdefs.h. */
19373/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19374 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19375#define lchflags innocuous_lchflags
19376
19377/* System header to define __stub macros and hopefully few prototypes,
19378 which can conflict with char lchflags (); below.
19379 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19380 <limits.h> exists even on freestanding compilers. */
19381
19382#ifdef __STDC__
19383# include <limits.h>
19384#else
19385# include <assert.h>
19386#endif
19387
19388#undef lchflags
19389
19390/* Override any GCC internal prototype to avoid an error.
19391 Use char because int might match the return type of a GCC
19392 builtin and then its argument prototype would still apply. */
19393#ifdef __cplusplus
19394extern "C"
19395#endif
19396char lchflags ();
19397/* The GNU C library defines this for functions which it implements
19398 to always fail with ENOSYS. Some functions are actually named
19399 something starting with __ and the normal name is an alias. */
19400#if defined __stub_lchflags || defined __stub___lchflags
19401choke me
19402#endif
19403
19404int
19405main ()
19406{
19407return lchflags ();
19408 ;
19409 return 0;
19410}
19411_ACEOF
19412rm -f conftest.$ac_objext conftest$ac_exeext
19413if { (ac_try="$ac_link"
19414case "(($ac_try" in
19415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19416 *) ac_try_echo=$ac_try;;
19417esac
19418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19419 (eval "$ac_link") 2>conftest.er1
19420 ac_status=$?
19421 grep -v '^ *+' conftest.er1 >conftest.err
19422 rm -f conftest.er1
19423 cat conftest.err >&5
19424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19425 (exit $ac_status); } && {
19426 test -z "$ac_c_werror_flag" ||
19427 test ! -s conftest.err
19428 } && test -s conftest$ac_exeext &&
19429 $as_test_x conftest$ac_exeext; then
19430 ac_cv_func_lchflags=yes
19431else
19432 echo "$as_me: failed program was:" >&5
19433sed 's/^/| /' conftest.$ac_ext >&5
19434
19435 ac_cv_func_lchflags=no
19436fi
19437
19438rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19439 conftest$ac_exeext conftest.$ac_ext
19440fi
19441{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19442echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19443if test $ac_cv_func_lchflags = yes; then
19444 ac_cv_have_lchflags="yes"
19445else
19446 ac_cv_have_lchflags="no"
19447fi
19448
19449fi
19450if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019451
19452cat >>confdefs.h <<\_ACEOF
19453#define HAVE_LCHFLAGS 1
19454_ACEOF
19455
19456fi
19457
Ronald Oussorenf8752642006-07-06 10:13:35 +000019458case $ac_sys_system/$ac_sys_release in
19459Darwin/*)
19460 _CUR_CFLAGS="${CFLAGS}"
19461 _CUR_LDFLAGS="${LDFLAGS}"
19462 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19463 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19464 ;;
19465esac
19466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019467{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19468echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019469if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019470 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019471else
19472 ac_check_lib_save_LIBS=$LIBS
19473LIBS="-lz $LIBS"
19474cat >conftest.$ac_ext <<_ACEOF
19475/* confdefs.h. */
19476_ACEOF
19477cat confdefs.h >>conftest.$ac_ext
19478cat >>conftest.$ac_ext <<_ACEOF
19479/* end confdefs.h. */
19480
Martin v. Löwiseba40652007-08-30 20:10:57 +000019481/* Override any GCC internal prototype to avoid an error.
19482 Use char because int might match the return type of a GCC
19483 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019484#ifdef __cplusplus
19485extern "C"
19486#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019487char inflateCopy ();
19488int
19489main ()
19490{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019491return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019492 ;
19493 return 0;
19494}
19495_ACEOF
19496rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019497if { (ac_try="$ac_link"
19498case "(($ac_try" in
19499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19500 *) ac_try_echo=$ac_try;;
19501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019503 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019504 ac_status=$?
19505 grep -v '^ *+' conftest.er1 >conftest.err
19506 rm -f conftest.er1
19507 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509 (exit $ac_status); } && {
19510 test -z "$ac_c_werror_flag" ||
19511 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019512 } && test -s conftest$ac_exeext &&
19513 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019514 ac_cv_lib_z_inflateCopy=yes
19515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019516 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019517sed 's/^/| /' conftest.$ac_ext >&5
19518
Martin v. Löwiseba40652007-08-30 20:10:57 +000019519 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521
19522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019523 conftest$ac_exeext conftest.$ac_ext
19524LIBS=$ac_check_lib_save_LIBS
19525fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019526{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19527echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19528if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019529
19530cat >>confdefs.h <<\_ACEOF
19531#define HAVE_ZLIB_COPY 1
19532_ACEOF
19533
19534fi
19535
19536
Ronald Oussorenf8752642006-07-06 10:13:35 +000019537case $ac_sys_system/$ac_sys_release in
19538Darwin/*)
19539 CFLAGS="${_CUR_CFLAGS}"
19540 LDFLAGS="${_CUR_LDFLAGS}"
19541 ;;
19542esac
19543
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019544{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19545echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019546cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019547/* confdefs.h. */
19548_ACEOF
19549cat confdefs.h >>conftest.$ac_ext
19550cat >>conftest.$ac_ext <<_ACEOF
19551/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019552
19553#include "confdefs.h"
19554#include <netdb.h>
19555
Martin v. Löwise9416172003-05-03 10:12:45 +000019556int
19557main ()
19558{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019559void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019560 ;
19561 return 0;
19562}
19563_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019564rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019565if { (ac_try="$ac_link"
19566case "(($ac_try" in
19567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19568 *) ac_try_echo=$ac_try;;
19569esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019571 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019573 grep -v '^ *+' conftest.er1 >conftest.err
19574 rm -f conftest.er1
19575 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019577 (exit $ac_status); } && {
19578 test -z "$ac_c_werror_flag" ||
19579 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019580 } && test -s conftest$ac_exeext &&
19581 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019582
19583cat >>confdefs.h <<\_ACEOF
19584#define HAVE_HSTRERROR 1
19585_ACEOF
19586
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019587 { echo "$as_me:$LINENO: result: yes" >&5
19588echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019591sed 's/^/| /' conftest.$ac_ext >&5
19592
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019593 { echo "$as_me:$LINENO: result: no" >&5
19594echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019595
19596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019597
19598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019601{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19602echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019604/* confdefs.h. */
19605_ACEOF
19606cat confdefs.h >>conftest.$ac_ext
19607cat >>conftest.$ac_ext <<_ACEOF
19608/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019609
19610#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019611#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019612#include <sys/socket.h>
19613#include <netinet/in.h>
19614#include <arpa/inet.h>
19615
Martin v. Löwise9416172003-05-03 10:12:45 +000019616int
19617main ()
19618{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019619void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019620 ;
19621 return 0;
19622}
19623_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019624rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019625if { (ac_try="$ac_link"
19626case "(($ac_try" in
19627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19628 *) ac_try_echo=$ac_try;;
19629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019631 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019633 grep -v '^ *+' conftest.er1 >conftest.err
19634 rm -f conftest.er1
19635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637 (exit $ac_status); } && {
19638 test -z "$ac_c_werror_flag" ||
19639 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019640 } && test -s conftest$ac_exeext &&
19641 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019642
19643cat >>confdefs.h <<\_ACEOF
19644#define HAVE_INET_ATON 1
19645_ACEOF
19646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019647 { echo "$as_me:$LINENO: result: yes" >&5
19648echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019651sed 's/^/| /' conftest.$ac_ext >&5
19652
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019653 { echo "$as_me:$LINENO: result: no" >&5
19654echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019655
19656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019657
19658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019661{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19662echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019664/* confdefs.h. */
19665_ACEOF
19666cat confdefs.h >>conftest.$ac_ext
19667cat >>conftest.$ac_ext <<_ACEOF
19668/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019669
19670#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019671#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019672#include <sys/socket.h>
19673#include <netinet/in.h>
19674#include <arpa/inet.h>
19675
Martin v. Löwise9416172003-05-03 10:12:45 +000019676int
19677main ()
19678{
19679void* p = inet_pton
19680 ;
19681 return 0;
19682}
19683_ACEOF
19684rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019685if { (ac_try="$ac_compile"
19686case "(($ac_try" in
19687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19688 *) ac_try_echo=$ac_try;;
19689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019693 grep -v '^ *+' conftest.er1 >conftest.err
19694 rm -f conftest.er1
19695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697 (exit $ac_status); } && {
19698 test -z "$ac_c_werror_flag" ||
19699 test ! -s conftest.err
19700 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019701
19702cat >>confdefs.h <<\_ACEOF
19703#define HAVE_INET_PTON 1
19704_ACEOF
19705
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019706 { echo "$as_me:$LINENO: result: yes" >&5
19707echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019710sed 's/^/| /' conftest.$ac_ext >&5
19711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019712 { echo "$as_me:$LINENO: result: no" >&5
19713echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019714
19715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019716
19717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019718
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019719# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019720{ echo "$as_me:$LINENO: checking for setgroups" >&5
19721echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019723/* confdefs.h. */
19724_ACEOF
19725cat confdefs.h >>conftest.$ac_ext
19726cat >>conftest.$ac_ext <<_ACEOF
19727/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019728
19729#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019730#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019731#ifdef HAVE_GRP_H
19732#include <grp.h>
19733#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019734
Martin v. Löwisd5843682002-11-21 20:41:28 +000019735int
19736main ()
19737{
19738void* p = setgroups
19739 ;
19740 return 0;
19741}
19742_ACEOF
19743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019744if { (ac_try="$ac_compile"
19745case "(($ac_try" in
19746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19747 *) ac_try_echo=$ac_try;;
19748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019752 grep -v '^ *+' conftest.er1 >conftest.err
19753 rm -f conftest.er1
19754 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019756 (exit $ac_status); } && {
19757 test -z "$ac_c_werror_flag" ||
19758 test ! -s conftest.err
19759 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019760
19761cat >>confdefs.h <<\_ACEOF
19762#define HAVE_SETGROUPS 1
19763_ACEOF
19764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019765 { echo "$as_me:$LINENO: result: yes" >&5
19766echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019769sed 's/^/| /' conftest.$ac_ext >&5
19770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019771 { echo "$as_me:$LINENO: result: no" >&5
19772echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019773
19774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775
19776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019777
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019778# check for openpty and forkpty
19779
Martin v. Löwis11437992002-04-12 09:54:03 +000019780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019781for ac_func in openpty
19782do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019783as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19784{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19785echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019786if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019788else
Martin v. Löwis11437992002-04-12 09:54:03 +000019789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019790/* confdefs.h. */
19791_ACEOF
19792cat confdefs.h >>conftest.$ac_ext
19793cat >>conftest.$ac_ext <<_ACEOF
19794/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019795/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19796 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19797#define $ac_func innocuous_$ac_func
19798
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019799/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019800 which can conflict with char $ac_func (); below.
19801 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019802 <limits.h> exists even on freestanding compilers. */
19803
19804#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019805# include <limits.h>
19806#else
19807# include <assert.h>
19808#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019809
19810#undef $ac_func
19811
Martin v. Löwiseba40652007-08-30 20:10:57 +000019812/* Override any GCC internal prototype to avoid an error.
19813 Use char because int might match the return type of a GCC
19814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019815#ifdef __cplusplus
19816extern "C"
19817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019818char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019819/* The GNU C library defines this for functions which it implements
19820 to always fail with ENOSYS. Some functions are actually named
19821 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019823choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019824#endif
19825
Skip Montanaro6dead952003-09-25 14:50:04 +000019826int
19827main ()
19828{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019830 ;
19831 return 0;
19832}
19833_ACEOF
19834rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835if { (ac_try="$ac_link"
19836case "(($ac_try" in
19837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19838 *) ac_try_echo=$ac_try;;
19839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019843 grep -v '^ *+' conftest.er1 >conftest.err
19844 rm -f conftest.er1
19845 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847 (exit $ac_status); } && {
19848 test -z "$ac_c_werror_flag" ||
19849 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019850 } && test -s conftest$ac_exeext &&
19851 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019852 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019853else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019855sed 's/^/| /' conftest.$ac_ext >&5
19856
Martin v. Löwiseba40652007-08-30 20:10:57 +000019857 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859
19860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019861 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019862fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019863ac_res=`eval echo '${'$as_ac_var'}'`
19864 { echo "$as_me:$LINENO: result: $ac_res" >&5
19865echo "${ECHO_T}$ac_res" >&6; }
19866if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019867 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019868#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019869_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019870
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019871else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019872 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19873echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019874if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019875 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019876else
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019878LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019880/* confdefs.h. */
19881_ACEOF
19882cat confdefs.h >>conftest.$ac_ext
19883cat >>conftest.$ac_ext <<_ACEOF
19884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019885
Martin v. Löwiseba40652007-08-30 20:10:57 +000019886/* Override any GCC internal prototype to avoid an error.
19887 Use char because int might match the return type of a GCC
19888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019889#ifdef __cplusplus
19890extern "C"
19891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019892char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019893int
19894main ()
19895{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019896return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 ;
19898 return 0;
19899}
19900_ACEOF
19901rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019902if { (ac_try="$ac_link"
19903case "(($ac_try" in
19904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905 *) ac_try_echo=$ac_try;;
19906esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019908 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019910 grep -v '^ *+' conftest.er1 >conftest.err
19911 rm -f conftest.er1
19912 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019914 (exit $ac_status); } && {
19915 test -z "$ac_c_werror_flag" ||
19916 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019917 } && test -s conftest$ac_exeext &&
19918 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019922sed 's/^/| /' conftest.$ac_ext >&5
19923
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926
19927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019929LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019930fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019931{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19932echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19933if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019934 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019935#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019936_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019937 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019939 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19940echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019941if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019943else
19944 ac_check_lib_save_LIBS=$LIBS
19945LIBS="-lbsd $LIBS"
19946cat >conftest.$ac_ext <<_ACEOF
19947/* confdefs.h. */
19948_ACEOF
19949cat confdefs.h >>conftest.$ac_ext
19950cat >>conftest.$ac_ext <<_ACEOF
19951/* end confdefs.h. */
19952
Martin v. Löwiseba40652007-08-30 20:10:57 +000019953/* Override any GCC internal prototype to avoid an error.
19954 Use char because int might match the return type of a GCC
19955 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019956#ifdef __cplusplus
19957extern "C"
19958#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019959char openpty ();
19960int
19961main ()
19962{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019964 ;
19965 return 0;
19966}
19967_ACEOF
19968rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019969if { (ac_try="$ac_link"
19970case "(($ac_try" in
19971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19972 *) ac_try_echo=$ac_try;;
19973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019975 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019976 ac_status=$?
19977 grep -v '^ *+' conftest.er1 >conftest.err
19978 rm -f conftest.er1
19979 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981 (exit $ac_status); } && {
19982 test -z "$ac_c_werror_flag" ||
19983 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019984 } && test -s conftest$ac_exeext &&
19985 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019986 ac_cv_lib_bsd_openpty=yes
19987else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019988 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019989sed 's/^/| /' conftest.$ac_ext >&5
19990
Martin v. Löwiseba40652007-08-30 20:10:57 +000019991 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993
19994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019995 conftest$ac_exeext conftest.$ac_ext
19996LIBS=$ac_check_lib_save_LIBS
19997fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019998{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19999echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20000if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020001 cat >>confdefs.h <<\_ACEOF
20002#define HAVE_OPENPTY 1
20003_ACEOF
20004 LIBS="$LIBS -lbsd"
20005fi
20006
20007
20008fi
20009
Fred Drake8cef4cf2000-06-28 16:40:38 +000020010
20011fi
20012done
20013
Martin v. Löwis11437992002-04-12 09:54:03 +000020014
Fred Drake8cef4cf2000-06-28 16:40:38 +000020015for ac_func in forkpty
20016do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020017as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20018{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20019echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020020if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020021 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020022else
Martin v. Löwis11437992002-04-12 09:54:03 +000020023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020024/* confdefs.h. */
20025_ACEOF
20026cat confdefs.h >>conftest.$ac_ext
20027cat >>conftest.$ac_ext <<_ACEOF
20028/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020029/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20030 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20031#define $ac_func innocuous_$ac_func
20032
Fred Drake8cef4cf2000-06-28 16:40:38 +000020033/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020034 which can conflict with char $ac_func (); below.
20035 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020036 <limits.h> exists even on freestanding compilers. */
20037
20038#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020039# include <limits.h>
20040#else
20041# include <assert.h>
20042#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020043
20044#undef $ac_func
20045
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046/* Override any GCC internal prototype to avoid an error.
20047 Use char because int might match the return type of a GCC
20048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020049#ifdef __cplusplus
20050extern "C"
20051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020052char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020053/* The GNU C library defines this for functions which it implements
20054 to always fail with ENOSYS. Some functions are actually named
20055 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020057choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020058#endif
20059
Skip Montanaro6dead952003-09-25 14:50:04 +000020060int
20061main ()
20062{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020064 ;
20065 return 0;
20066}
20067_ACEOF
20068rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020069if { (ac_try="$ac_link"
20070case "(($ac_try" in
20071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20072 *) ac_try_echo=$ac_try;;
20073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020077 grep -v '^ *+' conftest.er1 >conftest.err
20078 rm -f conftest.er1
20079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020081 (exit $ac_status); } && {
20082 test -z "$ac_c_werror_flag" ||
20083 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020084 } && test -s conftest$ac_exeext &&
20085 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020086 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020089sed 's/^/| /' conftest.$ac_ext >&5
20090
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020093
20094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020095 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020096fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020097ac_res=`eval echo '${'$as_ac_var'}'`
20098 { echo "$as_me:$LINENO: result: $ac_res" >&5
20099echo "${ECHO_T}$ac_res" >&6; }
20100if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020101 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020102#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020103_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020104
Fred Drake8cef4cf2000-06-28 16:40:38 +000020105else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020106 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20107echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020108if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020109 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020110else
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020112LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020114/* confdefs.h. */
20115_ACEOF
20116cat confdefs.h >>conftest.$ac_ext
20117cat >>conftest.$ac_ext <<_ACEOF
20118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020119
Martin v. Löwiseba40652007-08-30 20:10:57 +000020120/* Override any GCC internal prototype to avoid an error.
20121 Use char because int might match the return type of a GCC
20122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020123#ifdef __cplusplus
20124extern "C"
20125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020126char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020127int
20128main ()
20129{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020131 ;
20132 return 0;
20133}
20134_ACEOF
20135rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020136if { (ac_try="$ac_link"
20137case "(($ac_try" in
20138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20139 *) ac_try_echo=$ac_try;;
20140esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020142 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020144 grep -v '^ *+' conftest.er1 >conftest.err
20145 rm -f conftest.er1
20146 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020148 (exit $ac_status); } && {
20149 test -z "$ac_c_werror_flag" ||
20150 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020151 } && test -s conftest$ac_exeext &&
20152 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020153 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020156sed 's/^/| /' conftest.$ac_ext >&5
20157
Martin v. Löwiseba40652007-08-30 20:10:57 +000020158 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160
20161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020163LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020164fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020165{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20166echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20167if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020169#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020170_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020171 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020173 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20174echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020175if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020177else
20178 ac_check_lib_save_LIBS=$LIBS
20179LIBS="-lbsd $LIBS"
20180cat >conftest.$ac_ext <<_ACEOF
20181/* confdefs.h. */
20182_ACEOF
20183cat confdefs.h >>conftest.$ac_ext
20184cat >>conftest.$ac_ext <<_ACEOF
20185/* end confdefs.h. */
20186
Martin v. Löwiseba40652007-08-30 20:10:57 +000020187/* Override any GCC internal prototype to avoid an error.
20188 Use char because int might match the return type of a GCC
20189 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020190#ifdef __cplusplus
20191extern "C"
20192#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020193char forkpty ();
20194int
20195main ()
20196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020198 ;
20199 return 0;
20200}
20201_ACEOF
20202rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020203if { (ac_try="$ac_link"
20204case "(($ac_try" in
20205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20206 *) ac_try_echo=$ac_try;;
20207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020210 ac_status=$?
20211 grep -v '^ *+' conftest.er1 >conftest.err
20212 rm -f conftest.er1
20213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215 (exit $ac_status); } && {
20216 test -z "$ac_c_werror_flag" ||
20217 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020218 } && test -s conftest$ac_exeext &&
20219 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020220 ac_cv_lib_bsd_forkpty=yes
20221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020222 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020223sed 's/^/| /' conftest.$ac_ext >&5
20224
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227
20228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020229 conftest$ac_exeext conftest.$ac_ext
20230LIBS=$ac_check_lib_save_LIBS
20231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020232{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20233echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20234if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020235 cat >>confdefs.h <<\_ACEOF
20236#define HAVE_FORKPTY 1
20237_ACEOF
20238 LIBS="$LIBS -lbsd"
20239fi
20240
20241
20242fi
20243
Fred Drake8cef4cf2000-06-28 16:40:38 +000020244
20245fi
20246done
20247
Jack Jansendd19cf82001-12-06 22:36:17 +000020248
Brett Cannonaa5778d2008-03-18 04:09:00 +000020249# Stuff for expat.
20250
20251for ac_func in memmove
20252do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020253as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20254{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20255echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020256if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020257 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020258else
20259 cat >conftest.$ac_ext <<_ACEOF
20260/* confdefs.h. */
20261_ACEOF
20262cat confdefs.h >>conftest.$ac_ext
20263cat >>conftest.$ac_ext <<_ACEOF
20264/* end confdefs.h. */
20265/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20266 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20267#define $ac_func innocuous_$ac_func
20268
20269/* System header to define __stub macros and hopefully few prototypes,
20270 which can conflict with char $ac_func (); below.
20271 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20272 <limits.h> exists even on freestanding compilers. */
20273
20274#ifdef __STDC__
20275# include <limits.h>
20276#else
20277# include <assert.h>
20278#endif
20279
20280#undef $ac_func
20281
20282/* Override any GCC internal prototype to avoid an error.
20283 Use char because int might match the return type of a GCC
20284 builtin and then its argument prototype would still apply. */
20285#ifdef __cplusplus
20286extern "C"
20287#endif
20288char $ac_func ();
20289/* The GNU C library defines this for functions which it implements
20290 to always fail with ENOSYS. Some functions are actually named
20291 something starting with __ and the normal name is an alias. */
20292#if defined __stub_$ac_func || defined __stub___$ac_func
20293choke me
20294#endif
20295
20296int
20297main ()
20298{
20299return $ac_func ();
20300 ;
20301 return 0;
20302}
20303_ACEOF
20304rm -f conftest.$ac_objext conftest$ac_exeext
20305if { (ac_try="$ac_link"
20306case "(($ac_try" in
20307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20308 *) ac_try_echo=$ac_try;;
20309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020311 (eval "$ac_link") 2>conftest.er1
20312 ac_status=$?
20313 grep -v '^ *+' conftest.er1 >conftest.err
20314 rm -f conftest.er1
20315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020317 (exit $ac_status); } && {
20318 test -z "$ac_c_werror_flag" ||
20319 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020320 } && test -s conftest$ac_exeext &&
20321 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020322 eval "$as_ac_var=yes"
20323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020324 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020325sed 's/^/| /' conftest.$ac_ext >&5
20326
20327 eval "$as_ac_var=no"
20328fi
20329
20330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20331 conftest$ac_exeext conftest.$ac_ext
20332fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020333ac_res=`eval echo '${'$as_ac_var'}'`
20334 { echo "$as_me:$LINENO: result: $ac_res" >&5
20335echo "${ECHO_T}$ac_res" >&6; }
20336if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020337 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020338#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020339_ACEOF
20340
20341fi
20342done
20343
20344
Michael W. Hudson54241132001-12-07 15:38:26 +000020345# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020346
20347
20348
20349
20350
20351
Fred Drake8cef4cf2000-06-28 16:40:38 +000020352for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20353do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20355{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020357if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020359else
Martin v. Löwis11437992002-04-12 09:54:03 +000020360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020361/* confdefs.h. */
20362_ACEOF
20363cat confdefs.h >>conftest.$ac_ext
20364cat >>conftest.$ac_ext <<_ACEOF
20365/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020366/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20367 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20368#define $ac_func innocuous_$ac_func
20369
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020370/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020371 which can conflict with char $ac_func (); below.
20372 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020373 <limits.h> exists even on freestanding compilers. */
20374
20375#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020376# include <limits.h>
20377#else
20378# include <assert.h>
20379#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020380
20381#undef $ac_func
20382
Martin v. Löwiseba40652007-08-30 20:10:57 +000020383/* Override any GCC internal prototype to avoid an error.
20384 Use char because int might match the return type of a GCC
20385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020386#ifdef __cplusplus
20387extern "C"
20388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020389char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020390/* The GNU C library defines this for functions which it implements
20391 to always fail with ENOSYS. Some functions are actually named
20392 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020393#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020394choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020395#endif
20396
Skip Montanaro6dead952003-09-25 14:50:04 +000020397int
20398main ()
20399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020400return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020401 ;
20402 return 0;
20403}
20404_ACEOF
20405rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020406if { (ac_try="$ac_link"
20407case "(($ac_try" in
20408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20409 *) ac_try_echo=$ac_try;;
20410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020414 grep -v '^ *+' conftest.er1 >conftest.err
20415 rm -f conftest.er1
20416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418 (exit $ac_status); } && {
20419 test -z "$ac_c_werror_flag" ||
20420 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020421 } && test -s conftest$ac_exeext &&
20422 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020426sed 's/^/| /' conftest.$ac_ext >&5
20427
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430
20431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020432 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020433fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020434ac_res=`eval echo '${'$as_ac_var'}'`
20435 { echo "$as_me:$LINENO: result: $ac_res" >&5
20436echo "${ECHO_T}$ac_res" >&6; }
20437if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020438 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020439#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020440_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020442fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020443done
20444
Michael W. Hudson54241132001-12-07 15:38:26 +000020445
Martin v. Löwis11437992002-04-12 09:54:03 +000020446
20447
20448
Brett Cannonaa5778d2008-03-18 04:09:00 +000020449for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020450do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020451as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20452{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20453echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020454if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020456else
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020458/* confdefs.h. */
20459_ACEOF
20460cat confdefs.h >>conftest.$ac_ext
20461cat >>conftest.$ac_ext <<_ACEOF
20462/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020463/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20464 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20465#define $ac_func innocuous_$ac_func
20466
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020467/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020468 which can conflict with char $ac_func (); below.
20469 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020470 <limits.h> exists even on freestanding compilers. */
20471
20472#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020473# include <limits.h>
20474#else
20475# include <assert.h>
20476#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020477
20478#undef $ac_func
20479
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480/* Override any GCC internal prototype to avoid an error.
20481 Use char because int might match the return type of a GCC
20482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020483#ifdef __cplusplus
20484extern "C"
20485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020486char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020487/* The GNU C library defines this for functions which it implements
20488 to always fail with ENOSYS. Some functions are actually named
20489 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020491choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020492#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020493
Skip Montanaro6dead952003-09-25 14:50:04 +000020494int
20495main ()
20496{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ;
20499 return 0;
20500}
20501_ACEOF
20502rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020503if { (ac_try="$ac_link"
20504case "(($ac_try" in
20505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20506 *) ac_try_echo=$ac_try;;
20507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020511 grep -v '^ *+' conftest.er1 >conftest.err
20512 rm -f conftest.er1
20513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515 (exit $ac_status); } && {
20516 test -z "$ac_c_werror_flag" ||
20517 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020518 } && test -s conftest$ac_exeext &&
20519 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020520 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020523sed 's/^/| /' conftest.$ac_ext >&5
20524
Martin v. Löwiseba40652007-08-30 20:10:57 +000020525 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020527
20528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020530fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020531ac_res=`eval echo '${'$as_ac_var'}'`
20532 { echo "$as_me:$LINENO: result: $ac_res" >&5
20533echo "${ECHO_T}$ac_res" >&6; }
20534if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020535 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020536#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020537_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020538
Martin v. Löwis1142de32002-03-29 16:28:31 +000020539else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020540 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020541 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20543 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020544esac
20545
Martin v. Löwis1142de32002-03-29 16:28:31 +000020546fi
20547done
20548
20549
Martin v. Löwis11437992002-04-12 09:54:03 +000020550
Martin v. Löwis1142de32002-03-29 16:28:31 +000020551for ac_func in getpgrp
20552do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020558else
Martin v. Löwis11437992002-04-12 09:54:03 +000020559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020560/* confdefs.h. */
20561_ACEOF
20562cat confdefs.h >>conftest.$ac_ext
20563cat >>conftest.$ac_ext <<_ACEOF
20564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20567#define $ac_func innocuous_$ac_func
20568
Martin v. Löwis1142de32002-03-29 16:28:31 +000020569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020570 which can conflict with char $ac_func (); below.
20571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020572 <limits.h> exists even on freestanding compilers. */
20573
20574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020575# include <limits.h>
20576#else
20577# include <assert.h>
20578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020579
20580#undef $ac_func
20581
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582/* Override any GCC internal prototype to avoid an error.
20583 Use char because int might match the return type of a GCC
20584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020585#ifdef __cplusplus
20586extern "C"
20587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020588char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020589/* The GNU C library defines this for functions which it implements
20590 to always fail with ENOSYS. Some functions are actually named
20591 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020592#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020593choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020594#endif
20595
Skip Montanaro6dead952003-09-25 14:50:04 +000020596int
20597main ()
20598{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020599return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020600 ;
20601 return 0;
20602}
20603_ACEOF
20604rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605if { (ac_try="$ac_link"
20606case "(($ac_try" in
20607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20608 *) ac_try_echo=$ac_try;;
20609esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020613 grep -v '^ *+' conftest.er1 >conftest.err
20614 rm -f conftest.er1
20615 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020617 (exit $ac_status); } && {
20618 test -z "$ac_c_werror_flag" ||
20619 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020620 } && test -s conftest$ac_exeext &&
20621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020625sed 's/^/| /' conftest.$ac_ext >&5
20626
Martin v. Löwiseba40652007-08-30 20:10:57 +000020627 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020629
20630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020631 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020633ac_res=`eval echo '${'$as_ac_var'}'`
20634 { echo "$as_me:$LINENO: result: $ac_res" >&5
20635echo "${ECHO_T}$ac_res" >&6; }
20636if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020637 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020639_ACEOF
20640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020641/* confdefs.h. */
20642_ACEOF
20643cat confdefs.h >>conftest.$ac_ext
20644cat >>conftest.$ac_ext <<_ACEOF
20645/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020646#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020647int
20648main ()
20649{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020650getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020651 ;
20652 return 0;
20653}
20654_ACEOF
20655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020656if { (ac_try="$ac_compile"
20657case "(($ac_try" in
20658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20659 *) ac_try_echo=$ac_try;;
20660esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020662 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020664 grep -v '^ *+' conftest.er1 >conftest.err
20665 rm -f conftest.er1
20666 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020668 (exit $ac_status); } && {
20669 test -z "$ac_c_werror_flag" ||
20670 test ! -s conftest.err
20671 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020672
20673cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020674#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020675_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020676
Martin v. Löwis11437992002-04-12 09:54:03 +000020677
Guido van Rossumf78abae1997-01-21 22:02:36 +000020678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020680sed 's/^/| /' conftest.$ac_ext >&5
20681
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682
Guido van Rossum627b2d71993-12-24 10:39:16 +000020683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020684
20685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020686
Guido van Rossum627b2d71993-12-24 10:39:16 +000020687fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020688done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020689
Jack Jansen150753c2003-03-29 22:07:47 +000020690
20691for ac_func in setpgrp
20692do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20694{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020696if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020698else
Martin v. Löwis11437992002-04-12 09:54:03 +000020699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020700/* confdefs.h. */
20701_ACEOF
20702cat confdefs.h >>conftest.$ac_ext
20703cat >>conftest.$ac_ext <<_ACEOF
20704/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020705/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20706 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20707#define $ac_func innocuous_$ac_func
20708
Jack Jansen150753c2003-03-29 22:07:47 +000020709/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020710 which can conflict with char $ac_func (); below.
20711 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020712 <limits.h> exists even on freestanding compilers. */
20713
20714#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020715# include <limits.h>
20716#else
20717# include <assert.h>
20718#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020719
20720#undef $ac_func
20721
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722/* Override any GCC internal prototype to avoid an error.
20723 Use char because int might match the return type of a GCC
20724 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020725#ifdef __cplusplus
20726extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020727#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020728char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020729/* The GNU C library defines this for functions which it implements
20730 to always fail with ENOSYS. Some functions are actually named
20731 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020733choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020734#endif
20735
Skip Montanaro6dead952003-09-25 14:50:04 +000020736int
20737main ()
20738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020740 ;
20741 return 0;
20742}
20743_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745if { (ac_try="$ac_link"
20746case "(($ac_try" in
20747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20748 *) ac_try_echo=$ac_try;;
20749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020753 grep -v '^ *+' conftest.er1 >conftest.err
20754 rm -f conftest.er1
20755 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757 (exit $ac_status); } && {
20758 test -z "$ac_c_werror_flag" ||
20759 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020760 } && test -s conftest$ac_exeext &&
20761 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020762 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020765sed 's/^/| /' conftest.$ac_ext >&5
20766
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769
20770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020771 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020773ac_res=`eval echo '${'$as_ac_var'}'`
20774 { echo "$as_me:$LINENO: result: $ac_res" >&5
20775echo "${ECHO_T}$ac_res" >&6; }
20776if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020777 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020779_ACEOF
20780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020781/* confdefs.h. */
20782_ACEOF
20783cat confdefs.h >>conftest.$ac_ext
20784cat >>conftest.$ac_ext <<_ACEOF
20785/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020786#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020787int
20788main ()
20789{
20790setpgrp(0,0);
20791 ;
20792 return 0;
20793}
20794_ACEOF
20795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796if { (ac_try="$ac_compile"
20797case "(($ac_try" in
20798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20799 *) ac_try_echo=$ac_try;;
20800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020802 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020804 grep -v '^ *+' conftest.er1 >conftest.err
20805 rm -f conftest.er1
20806 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808 (exit $ac_status); } && {
20809 test -z "$ac_c_werror_flag" ||
20810 test ! -s conftest.err
20811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020812
20813cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020814#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020815_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020816
Jack Jansen150753c2003-03-29 22:07:47 +000020817
20818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020820sed 's/^/| /' conftest.$ac_ext >&5
20821
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020824
20825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020826
20827fi
20828done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020829
Martin v. Löwis11437992002-04-12 09:54:03 +000020830
Thomas Wouters3a584202000-08-05 23:28:51 +000020831for ac_func in gettimeofday
20832do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020833as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20834{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20835echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020836if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020838else
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020840/* confdefs.h. */
20841_ACEOF
20842cat confdefs.h >>conftest.$ac_ext
20843cat >>conftest.$ac_ext <<_ACEOF
20844/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020845/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20846 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20847#define $ac_func innocuous_$ac_func
20848
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020849/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020850 which can conflict with char $ac_func (); below.
20851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020852 <limits.h> exists even on freestanding compilers. */
20853
20854#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020855# include <limits.h>
20856#else
20857# include <assert.h>
20858#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020859
20860#undef $ac_func
20861
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862/* Override any GCC internal prototype to avoid an error.
20863 Use char because int might match the return type of a GCC
20864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020865#ifdef __cplusplus
20866extern "C"
20867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020868char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020869/* The GNU C library defines this for functions which it implements
20870 to always fail with ENOSYS. Some functions are actually named
20871 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020872#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020873choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874#endif
20875
Skip Montanaro6dead952003-09-25 14:50:04 +000020876int
20877main ()
20878{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020879return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020880 ;
20881 return 0;
20882}
20883_ACEOF
20884rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885if { (ac_try="$ac_link"
20886case "(($ac_try" in
20887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20888 *) ac_try_echo=$ac_try;;
20889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020893 grep -v '^ *+' conftest.er1 >conftest.err
20894 rm -f conftest.er1
20895 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897 (exit $ac_status); } && {
20898 test -z "$ac_c_werror_flag" ||
20899 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020900 } && test -s conftest$ac_exeext &&
20901 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020905sed 's/^/| /' conftest.$ac_ext >&5
20906
Martin v. Löwiseba40652007-08-30 20:10:57 +000020907 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020909
20910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020911 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020912fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020913ac_res=`eval echo '${'$as_ac_var'}'`
20914 { echo "$as_me:$LINENO: result: $ac_res" >&5
20915echo "${ECHO_T}$ac_res" >&6; }
20916if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020918#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020919_ACEOF
20920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020921/* confdefs.h. */
20922_ACEOF
20923cat confdefs.h >>conftest.$ac_ext
20924cat >>conftest.$ac_ext <<_ACEOF
20925/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020926#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020927int
20928main ()
20929{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020930gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 ;
20932 return 0;
20933}
20934_ACEOF
20935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020936if { (ac_try="$ac_compile"
20937case "(($ac_try" in
20938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20939 *) ac_try_echo=$ac_try;;
20940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020944 grep -v '^ *+' conftest.er1 >conftest.err
20945 rm -f conftest.er1
20946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020948 (exit $ac_status); } && {
20949 test -z "$ac_c_werror_flag" ||
20950 test ! -s conftest.err
20951 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020952 :
20953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020955sed 's/^/| /' conftest.$ac_ext >&5
20956
Martin v. Löwis11437992002-04-12 09:54:03 +000020957
20958cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020959#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020960_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020961
Martin v. Löwis11437992002-04-12 09:54:03 +000020962
Guido van Rossum627b2d71993-12-24 10:39:16 +000020963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020964
20965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020967fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020968done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020969
Michael W. Hudson54241132001-12-07 15:38:26 +000020970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020971{ echo "$as_me:$LINENO: checking for major" >&5
20972echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020974/* confdefs.h. */
20975_ACEOF
20976cat confdefs.h >>conftest.$ac_ext
20977cat >>conftest.$ac_ext <<_ACEOF
20978/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020979
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020980#if defined(MAJOR_IN_MKDEV)
20981#include <sys/mkdev.h>
20982#elif defined(MAJOR_IN_SYSMACROS)
20983#include <sys/sysmacros.h>
20984#else
20985#include <sys/types.h>
20986#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020987
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020988int
20989main ()
20990{
20991
20992 makedev(major(0),minor(0));
20993
20994 ;
20995 return 0;
20996}
20997_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020998rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999if { (ac_try="$ac_link"
21000case "(($ac_try" in
21001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21002 *) ac_try_echo=$ac_try;;
21003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021007 grep -v '^ *+' conftest.er1 >conftest.err
21008 rm -f conftest.er1
21009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021011 (exit $ac_status); } && {
21012 test -z "$ac_c_werror_flag" ||
21013 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021014 } && test -s conftest$ac_exeext &&
21015 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021016
21017
21018cat >>confdefs.h <<\_ACEOF
21019#define HAVE_DEVICE_MACROS 1
21020_ACEOF
21021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021022 { echo "$as_me:$LINENO: result: yes" >&5
21023echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021024
21025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021027sed 's/^/| /' conftest.$ac_ext >&5
21028
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021029
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021030 { echo "$as_me:$LINENO: result: no" >&5
21031echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021032
21033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021034
21035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021036 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021037
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021038# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021039# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021040{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21041echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021043/* confdefs.h. */
21044_ACEOF
21045cat confdefs.h >>conftest.$ac_ext
21046cat >>conftest.$ac_ext <<_ACEOF
21047/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021048
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021049#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021050#include <sys/socket.h>
21051#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021052#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021053
Martin v. Löwis11437992002-04-12 09:54:03 +000021054int
21055main ()
21056{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021057getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021058 ;
21059 return 0;
21060}
21061_ACEOF
21062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021063if { (ac_try="$ac_link"
21064case "(($ac_try" in
21065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21066 *) ac_try_echo=$ac_try;;
21067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021071 grep -v '^ *+' conftest.er1 >conftest.err
21072 rm -f conftest.er1
21073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021075 (exit $ac_status); } && {
21076 test -z "$ac_c_werror_flag" ||
21077 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021078 } && test -s conftest$ac_exeext &&
21079 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021080 have_getaddrinfo=yes
21081else
21082 echo "$as_me: failed program was:" >&5
21083sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021084
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021085 have_getaddrinfo=no
21086fi
21087
21088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21089 conftest$ac_exeext conftest.$ac_ext
21090{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21091echo "${ECHO_T}$have_getaddrinfo" >&6; }
21092if test $have_getaddrinfo = yes
21093then
21094 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021095echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021096 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21097 echo $ECHO_N "(cached) $ECHO_C" >&6
21098else
21099 if test "$cross_compiling" = yes; then
21100 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021101else
Martin v. Löwis11437992002-04-12 09:54:03 +000021102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021103/* confdefs.h. */
21104_ACEOF
21105cat confdefs.h >>conftest.$ac_ext
21106cat >>conftest.$ac_ext <<_ACEOF
21107/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021108
21109#include <sys/types.h>
21110#include <netdb.h>
21111#include <string.h>
21112#include <sys/socket.h>
21113#include <netinet/in.h>
21114
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021115int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021116{
21117 int passive, gaierr, inet4 = 0, inet6 = 0;
21118 struct addrinfo hints, *ai, *aitop;
21119 char straddr[INET6_ADDRSTRLEN], strport[16];
21120
21121 for (passive = 0; passive <= 1; passive++) {
21122 memset(&hints, 0, sizeof(hints));
21123 hints.ai_family = AF_UNSPEC;
21124 hints.ai_flags = passive ? AI_PASSIVE : 0;
21125 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021126 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021127 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21128 (void)gai_strerror(gaierr);
21129 goto bad;
21130 }
21131 for (ai = aitop; ai; ai = ai->ai_next) {
21132 if (ai->ai_addr == NULL ||
21133 ai->ai_addrlen == 0 ||
21134 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21135 straddr, sizeof(straddr), strport, sizeof(strport),
21136 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21137 goto bad;
21138 }
21139 switch (ai->ai_family) {
21140 case AF_INET:
21141 if (strcmp(strport, "54321") != 0) {
21142 goto bad;
21143 }
21144 if (passive) {
21145 if (strcmp(straddr, "0.0.0.0") != 0) {
21146 goto bad;
21147 }
21148 } else {
21149 if (strcmp(straddr, "127.0.0.1") != 0) {
21150 goto bad;
21151 }
21152 }
21153 inet4++;
21154 break;
21155 case AF_INET6:
21156 if (strcmp(strport, "54321") != 0) {
21157 goto bad;
21158 }
21159 if (passive) {
21160 if (strcmp(straddr, "::") != 0) {
21161 goto bad;
21162 }
21163 } else {
21164 if (strcmp(straddr, "::1") != 0) {
21165 goto bad;
21166 }
21167 }
21168 inet6++;
21169 break;
21170 case AF_UNSPEC:
21171 goto bad;
21172 break;
21173 default:
21174 /* another family support? */
21175 break;
21176 }
21177 }
21178 }
21179
21180 if (!(inet4 == 0 || inet4 == 2))
21181 goto bad;
21182 if (!(inet6 == 0 || inet6 == 2))
21183 goto bad;
21184
21185 if (aitop)
21186 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021187 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021188
21189 bad:
21190 if (aitop)
21191 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021192 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021193}
21194
Martin v. Löwis11437992002-04-12 09:54:03 +000021195_ACEOF
21196rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021197if { (ac_try="$ac_link"
21198case "(($ac_try" in
21199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21200 *) ac_try_echo=$ac_try;;
21201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021204 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207 { (case "(($ac_try" in
21208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21209 *) ac_try_echo=$ac_try;;
21210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021212 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021215 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021216 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021218 echo "$as_me: program exited with status $ac_status" >&5
21219echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021220sed 's/^/| /' conftest.$ac_ext >&5
21221
Martin v. Löwis11437992002-04-12 09:54:03 +000021222( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021223ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225rm -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 +000021226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227
21228
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021229fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021230
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021232
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021233if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021234then
21235 if test $ipv6 = yes
21236 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021237 echo 'Fatal: You must get working getaddrinfo() function.'
21238 echo ' or you can specify "--disable-ipv6"'.
21239 exit 1
21240 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021241else
Martin v. Löwis11437992002-04-12 09:54:03 +000021242
21243cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021244#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021245_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021246
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021248
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021249for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021250do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021251as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21252{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21253echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021254if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021255 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021256else
Martin v. Löwis11437992002-04-12 09:54:03 +000021257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021258/* confdefs.h. */
21259_ACEOF
21260cat confdefs.h >>conftest.$ac_ext
21261cat >>conftest.$ac_ext <<_ACEOF
21262/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021263/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21265#define $ac_func innocuous_$ac_func
21266
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021267/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021268 which can conflict with char $ac_func (); below.
21269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021270 <limits.h> exists even on freestanding compilers. */
21271
21272#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021273# include <limits.h>
21274#else
21275# include <assert.h>
21276#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021277
21278#undef $ac_func
21279
Martin v. Löwiseba40652007-08-30 20:10:57 +000021280/* Override any GCC internal prototype to avoid an error.
21281 Use char because int might match the return type of a GCC
21282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021283#ifdef __cplusplus
21284extern "C"
21285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021286char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021287/* The GNU C library defines this for functions which it implements
21288 to always fail with ENOSYS. Some functions are actually named
21289 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021290#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021291choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021292#endif
21293
Skip Montanaro6dead952003-09-25 14:50:04 +000021294int
21295main ()
21296{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021297return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021298 ;
21299 return 0;
21300}
21301_ACEOF
21302rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021303if { (ac_try="$ac_link"
21304case "(($ac_try" in
21305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21306 *) ac_try_echo=$ac_try;;
21307esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021311 grep -v '^ *+' conftest.er1 >conftest.err
21312 rm -f conftest.er1
21313 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315 (exit $ac_status); } && {
21316 test -z "$ac_c_werror_flag" ||
21317 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021318 } && test -s conftest$ac_exeext &&
21319 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021320 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021323sed 's/^/| /' conftest.$ac_ext >&5
21324
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327
21328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021329 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021330fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021331ac_res=`eval echo '${'$as_ac_var'}'`
21332 { echo "$as_me:$LINENO: result: $ac_res" >&5
21333echo "${ECHO_T}$ac_res" >&6; }
21334if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021335 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021336#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021337_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021338
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021339fi
21340done
21341
Michael W. Hudson54241132001-12-07 15:38:26 +000021342
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021343# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021344{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21345echo $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 +000021346if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021348else
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021350/* confdefs.h. */
21351_ACEOF
21352cat confdefs.h >>conftest.$ac_ext
21353cat >>conftest.$ac_ext <<_ACEOF
21354/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021355#include <sys/types.h>
21356#include <sys/time.h>
21357#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021358
Martin v. Löwis11437992002-04-12 09:54:03 +000021359int
21360main ()
21361{
21362if ((struct tm *) 0)
21363return 0;
21364 ;
21365 return 0;
21366}
21367_ACEOF
21368rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021369if { (ac_try="$ac_compile"
21370case "(($ac_try" in
21371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21372 *) ac_try_echo=$ac_try;;
21373esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021377 grep -v '^ *+' conftest.er1 >conftest.err
21378 rm -f conftest.er1
21379 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021381 (exit $ac_status); } && {
21382 test -z "$ac_c_werror_flag" ||
21383 test ! -s conftest.err
21384 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021385 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021388sed 's/^/| /' conftest.$ac_ext >&5
21389
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021392
21393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021394fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021395{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21396echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021397if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021398
21399cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021400#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021402
21403fi
21404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021405{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21406echo $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 +000021407if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021408 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021409else
Martin v. Löwis11437992002-04-12 09:54:03 +000021410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021411/* confdefs.h. */
21412_ACEOF
21413cat confdefs.h >>conftest.$ac_ext
21414cat >>conftest.$ac_ext <<_ACEOF
21415/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021416#include <sys/types.h>
21417#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021418
Martin v. Löwis11437992002-04-12 09:54:03 +000021419int
21420main ()
21421{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021422struct tm tm;
21423 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021424 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 ;
21426 return 0;
21427}
21428_ACEOF
21429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430if { (ac_try="$ac_compile"
21431case "(($ac_try" in
21432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21433 *) ac_try_echo=$ac_try;;
21434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021438 grep -v '^ *+' conftest.er1 >conftest.err
21439 rm -f conftest.er1
21440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021442 (exit $ac_status); } && {
21443 test -z "$ac_c_werror_flag" ||
21444 test ! -s conftest.err
21445 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021446 ac_cv_struct_tm=time.h
21447else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021449sed 's/^/| /' conftest.$ac_ext >&5
21450
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453
21454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021456{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21457echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021458if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021459
21460cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021461#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021462_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021463
21464fi
21465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021466{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21467echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021468if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021470else
Martin v. Löwis11437992002-04-12 09:54:03 +000021471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021472/* confdefs.h. */
21473_ACEOF
21474cat confdefs.h >>conftest.$ac_ext
21475cat >>conftest.$ac_ext <<_ACEOF
21476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021477#include <sys/types.h>
21478#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021479
21480
Martin v. Löwis11437992002-04-12 09:54:03 +000021481int
21482main ()
21483{
21484static struct tm ac_aggr;
21485if (ac_aggr.tm_zone)
21486return 0;
21487 ;
21488 return 0;
21489}
21490_ACEOF
21491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492if { (ac_try="$ac_compile"
21493case "(($ac_try" in
21494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21495 *) ac_try_echo=$ac_try;;
21496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021500 grep -v '^ *+' conftest.er1 >conftest.err
21501 rm -f conftest.er1
21502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 (exit $ac_status); } && {
21505 test -z "$ac_c_werror_flag" ||
21506 test ! -s conftest.err
21507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021508 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021511sed 's/^/| /' conftest.$ac_ext >&5
21512
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021514/* confdefs.h. */
21515_ACEOF
21516cat confdefs.h >>conftest.$ac_ext
21517cat >>conftest.$ac_ext <<_ACEOF
21518/* end confdefs.h. */
21519#include <sys/types.h>
21520#include <$ac_cv_struct_tm>
21521
21522
21523int
21524main ()
21525{
21526static struct tm ac_aggr;
21527if (sizeof ac_aggr.tm_zone)
21528return 0;
21529 ;
21530 return 0;
21531}
21532_ACEOF
21533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534if { (ac_try="$ac_compile"
21535case "(($ac_try" in
21536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21537 *) ac_try_echo=$ac_try;;
21538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021540 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021542 grep -v '^ *+' conftest.er1 >conftest.err
21543 rm -f conftest.er1
21544 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546 (exit $ac_status); } && {
21547 test -z "$ac_c_werror_flag" ||
21548 test ! -s conftest.err
21549 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021550 ac_cv_member_struct_tm_tm_zone=yes
21551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021553sed 's/^/| /' conftest.$ac_ext >&5
21554
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021557
21558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560
21561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021562fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021563{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21564echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21565if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021566
21567cat >>confdefs.h <<_ACEOF
21568#define HAVE_STRUCT_TM_TM_ZONE 1
21569_ACEOF
21570
21571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021572fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021573
Martin v. Löwis11437992002-04-12 09:54:03 +000021574if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21575
21576cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021577#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021579
21580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021581 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21582echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021584 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021585else
21586 cat >conftest.$ac_ext <<_ACEOF
21587/* confdefs.h. */
21588_ACEOF
21589cat confdefs.h >>conftest.$ac_ext
21590cat >>conftest.$ac_ext <<_ACEOF
21591/* end confdefs.h. */
21592#include <time.h>
21593
21594int
21595main ()
21596{
21597#ifndef tzname
21598 (void) tzname;
21599#endif
21600
21601 ;
21602 return 0;
21603}
21604_ACEOF
21605rm -f conftest.$ac_objext
21606if { (ac_try="$ac_compile"
21607case "(($ac_try" in
21608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21609 *) ac_try_echo=$ac_try;;
21610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 (eval "$ac_compile") 2>conftest.er1
21613 ac_status=$?
21614 grep -v '^ *+' conftest.er1 >conftest.err
21615 rm -f conftest.er1
21616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021618 (exit $ac_status); } && {
21619 test -z "$ac_c_werror_flag" ||
21620 test ! -s conftest.err
21621 } && test -s conftest.$ac_objext; then
21622 ac_cv_have_decl_tzname=yes
21623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021624 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625sed 's/^/| /' conftest.$ac_ext >&5
21626
21627 ac_cv_have_decl_tzname=no
21628fi
21629
21630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21631fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021632{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21633echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21634if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021635
21636cat >>confdefs.h <<_ACEOF
21637#define HAVE_DECL_TZNAME 1
21638_ACEOF
21639
21640
21641else
21642 cat >>confdefs.h <<_ACEOF
21643#define HAVE_DECL_TZNAME 0
21644_ACEOF
21645
21646
21647fi
21648
21649
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021650 { echo "$as_me:$LINENO: checking for tzname" >&5
21651echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021652if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021654else
Martin v. Löwis11437992002-04-12 09:54:03 +000021655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021656/* confdefs.h. */
21657_ACEOF
21658cat confdefs.h >>conftest.$ac_ext
21659cat >>conftest.$ac_ext <<_ACEOF
21660/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021661#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021662#if !HAVE_DECL_TZNAME
21663extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021665
Martin v. Löwis11437992002-04-12 09:54:03 +000021666int
21667main ()
21668{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021669return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 ;
21671 return 0;
21672}
21673_ACEOF
21674rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675if { (ac_try="$ac_link"
21676case "(($ac_try" in
21677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21678 *) ac_try_echo=$ac_try;;
21679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021683 grep -v '^ *+' conftest.er1 >conftest.err
21684 rm -f conftest.er1
21685 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687 (exit $ac_status); } && {
21688 test -z "$ac_c_werror_flag" ||
21689 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021690 } && test -s conftest$ac_exeext &&
21691 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021692 ac_cv_var_tzname=yes
21693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021695sed 's/^/| /' conftest.$ac_ext >&5
21696
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699
21700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021701 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021703{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21704echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021705 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021706
21707cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021708#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021709_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021711 fi
21712fi
21713
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021714{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21715echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021716if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021717 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021718else
21719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021720/* confdefs.h. */
21721_ACEOF
21722cat confdefs.h >>conftest.$ac_ext
21723cat >>conftest.$ac_ext <<_ACEOF
21724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021725$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021726int
21727main ()
21728{
21729static struct stat ac_aggr;
21730if (ac_aggr.st_rdev)
21731return 0;
21732 ;
21733 return 0;
21734}
21735_ACEOF
21736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021737if { (ac_try="$ac_compile"
21738case "(($ac_try" in
21739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21740 *) ac_try_echo=$ac_try;;
21741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021745 grep -v '^ *+' conftest.er1 >conftest.err
21746 rm -f conftest.er1
21747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021749 (exit $ac_status); } && {
21750 test -z "$ac_c_werror_flag" ||
21751 test ! -s conftest.err
21752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021753 ac_cv_member_struct_stat_st_rdev=yes
21754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021756sed 's/^/| /' conftest.$ac_ext >&5
21757
Martin v. Löwiseba40652007-08-30 20:10:57 +000021758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021759/* confdefs.h. */
21760_ACEOF
21761cat confdefs.h >>conftest.$ac_ext
21762cat >>conftest.$ac_ext <<_ACEOF
21763/* end confdefs.h. */
21764$ac_includes_default
21765int
21766main ()
21767{
21768static struct stat ac_aggr;
21769if (sizeof ac_aggr.st_rdev)
21770return 0;
21771 ;
21772 return 0;
21773}
21774_ACEOF
21775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021776if { (ac_try="$ac_compile"
21777case "(($ac_try" in
21778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21779 *) ac_try_echo=$ac_try;;
21780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021782 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021784 grep -v '^ *+' conftest.er1 >conftest.err
21785 rm -f conftest.er1
21786 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021788 (exit $ac_status); } && {
21789 test -z "$ac_c_werror_flag" ||
21790 test ! -s conftest.err
21791 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021792 ac_cv_member_struct_stat_st_rdev=yes
21793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021795sed 's/^/| /' conftest.$ac_ext >&5
21796
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799
21800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802
21803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021804fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021805{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21806echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21807if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021808
21809cat >>confdefs.h <<_ACEOF
21810#define HAVE_STRUCT_STAT_ST_RDEV 1
21811_ACEOF
21812
21813
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021814fi
21815
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021816{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21817echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021818if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021820else
Martin v. Löwis11437992002-04-12 09:54:03 +000021821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021822/* confdefs.h. */
21823_ACEOF
21824cat confdefs.h >>conftest.$ac_ext
21825cat >>conftest.$ac_ext <<_ACEOF
21826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021827$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021828int
21829main ()
21830{
21831static struct stat ac_aggr;
21832if (ac_aggr.st_blksize)
21833return 0;
21834 ;
21835 return 0;
21836}
21837_ACEOF
21838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839if { (ac_try="$ac_compile"
21840case "(($ac_try" in
21841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21842 *) ac_try_echo=$ac_try;;
21843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021847 grep -v '^ *+' conftest.er1 >conftest.err
21848 rm -f conftest.er1
21849 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851 (exit $ac_status); } && {
21852 test -z "$ac_c_werror_flag" ||
21853 test ! -s conftest.err
21854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021855 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021856else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021858sed 's/^/| /' conftest.$ac_ext >&5
21859
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021861/* confdefs.h. */
21862_ACEOF
21863cat confdefs.h >>conftest.$ac_ext
21864cat >>conftest.$ac_ext <<_ACEOF
21865/* end confdefs.h. */
21866$ac_includes_default
21867int
21868main ()
21869{
21870static struct stat ac_aggr;
21871if (sizeof ac_aggr.st_blksize)
21872return 0;
21873 ;
21874 return 0;
21875}
21876_ACEOF
21877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021878if { (ac_try="$ac_compile"
21879case "(($ac_try" in
21880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21881 *) ac_try_echo=$ac_try;;
21882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021884 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021886 grep -v '^ *+' conftest.er1 >conftest.err
21887 rm -f conftest.er1
21888 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890 (exit $ac_status); } && {
21891 test -z "$ac_c_werror_flag" ||
21892 test ! -s conftest.err
21893 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021894 ac_cv_member_struct_stat_st_blksize=yes
21895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021897sed 's/^/| /' conftest.$ac_ext >&5
21898
Martin v. Löwiseba40652007-08-30 20:10:57 +000021899 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021901
21902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021904
21905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021906fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021907{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21908echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21909if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021910
Martin v. Löwis11437992002-04-12 09:54:03 +000021911cat >>confdefs.h <<_ACEOF
21912#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21913_ACEOF
21914
21915
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021916fi
21917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021918{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21919echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021920if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021921 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021922else
21923 cat >conftest.$ac_ext <<_ACEOF
21924/* confdefs.h. */
21925_ACEOF
21926cat confdefs.h >>conftest.$ac_ext
21927cat >>conftest.$ac_ext <<_ACEOF
21928/* end confdefs.h. */
21929$ac_includes_default
21930int
21931main ()
21932{
21933static struct stat ac_aggr;
21934if (ac_aggr.st_flags)
21935return 0;
21936 ;
21937 return 0;
21938}
21939_ACEOF
21940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021941if { (ac_try="$ac_compile"
21942case "(($ac_try" in
21943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21944 *) ac_try_echo=$ac_try;;
21945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021948 ac_status=$?
21949 grep -v '^ *+' conftest.er1 >conftest.err
21950 rm -f conftest.er1
21951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021953 (exit $ac_status); } && {
21954 test -z "$ac_c_werror_flag" ||
21955 test ! -s conftest.err
21956 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021957 ac_cv_member_struct_stat_st_flags=yes
21958else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021959 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021960sed 's/^/| /' conftest.$ac_ext >&5
21961
Martin v. Löwiseba40652007-08-30 20:10:57 +000021962 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021963/* confdefs.h. */
21964_ACEOF
21965cat confdefs.h >>conftest.$ac_ext
21966cat >>conftest.$ac_ext <<_ACEOF
21967/* end confdefs.h. */
21968$ac_includes_default
21969int
21970main ()
21971{
21972static struct stat ac_aggr;
21973if (sizeof ac_aggr.st_flags)
21974return 0;
21975 ;
21976 return 0;
21977}
21978_ACEOF
21979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021980if { (ac_try="$ac_compile"
21981case "(($ac_try" in
21982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21983 *) ac_try_echo=$ac_try;;
21984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021986 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021987 ac_status=$?
21988 grep -v '^ *+' conftest.er1 >conftest.err
21989 rm -f conftest.er1
21990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021992 (exit $ac_status); } && {
21993 test -z "$ac_c_werror_flag" ||
21994 test ! -s conftest.err
21995 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021996 ac_cv_member_struct_stat_st_flags=yes
21997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021998 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021999sed 's/^/| /' conftest.$ac_ext >&5
22000
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022003
22004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006
22007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022009{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22010echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22011if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022012
22013cat >>confdefs.h <<_ACEOF
22014#define HAVE_STRUCT_STAT_ST_FLAGS 1
22015_ACEOF
22016
22017
22018fi
22019
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022020{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22021echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022022if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022023 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022024else
22025 cat >conftest.$ac_ext <<_ACEOF
22026/* confdefs.h. */
22027_ACEOF
22028cat confdefs.h >>conftest.$ac_ext
22029cat >>conftest.$ac_ext <<_ACEOF
22030/* end confdefs.h. */
22031$ac_includes_default
22032int
22033main ()
22034{
22035static struct stat ac_aggr;
22036if (ac_aggr.st_gen)
22037return 0;
22038 ;
22039 return 0;
22040}
22041_ACEOF
22042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022043if { (ac_try="$ac_compile"
22044case "(($ac_try" in
22045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22046 *) ac_try_echo=$ac_try;;
22047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022050 ac_status=$?
22051 grep -v '^ *+' conftest.er1 >conftest.err
22052 rm -f conftest.er1
22053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022055 (exit $ac_status); } && {
22056 test -z "$ac_c_werror_flag" ||
22057 test ! -s conftest.err
22058 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022059 ac_cv_member_struct_stat_st_gen=yes
22060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022061 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022062sed 's/^/| /' conftest.$ac_ext >&5
22063
Martin v. Löwiseba40652007-08-30 20:10:57 +000022064 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022065/* confdefs.h. */
22066_ACEOF
22067cat confdefs.h >>conftest.$ac_ext
22068cat >>conftest.$ac_ext <<_ACEOF
22069/* end confdefs.h. */
22070$ac_includes_default
22071int
22072main ()
22073{
22074static struct stat ac_aggr;
22075if (sizeof ac_aggr.st_gen)
22076return 0;
22077 ;
22078 return 0;
22079}
22080_ACEOF
22081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022082if { (ac_try="$ac_compile"
22083case "(($ac_try" in
22084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22085 *) ac_try_echo=$ac_try;;
22086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022089 ac_status=$?
22090 grep -v '^ *+' conftest.er1 >conftest.err
22091 rm -f conftest.er1
22092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022094 (exit $ac_status); } && {
22095 test -z "$ac_c_werror_flag" ||
22096 test ! -s conftest.err
22097 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022098 ac_cv_member_struct_stat_st_gen=yes
22099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022100 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022101sed 's/^/| /' conftest.$ac_ext >&5
22102
Martin v. Löwiseba40652007-08-30 20:10:57 +000022103 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022105
22106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108
22109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022110fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022111{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22112echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22113if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022114
22115cat >>confdefs.h <<_ACEOF
22116#define HAVE_STRUCT_STAT_ST_GEN 1
22117_ACEOF
22118
22119
22120fi
22121
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022122{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22123echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022124if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022126else
22127 cat >conftest.$ac_ext <<_ACEOF
22128/* confdefs.h. */
22129_ACEOF
22130cat confdefs.h >>conftest.$ac_ext
22131cat >>conftest.$ac_ext <<_ACEOF
22132/* end confdefs.h. */
22133$ac_includes_default
22134int
22135main ()
22136{
22137static struct stat ac_aggr;
22138if (ac_aggr.st_birthtime)
22139return 0;
22140 ;
22141 return 0;
22142}
22143_ACEOF
22144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022145if { (ac_try="$ac_compile"
22146case "(($ac_try" in
22147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22148 *) ac_try_echo=$ac_try;;
22149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022152 ac_status=$?
22153 grep -v '^ *+' conftest.er1 >conftest.err
22154 rm -f conftest.er1
22155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022157 (exit $ac_status); } && {
22158 test -z "$ac_c_werror_flag" ||
22159 test ! -s conftest.err
22160 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022161 ac_cv_member_struct_stat_st_birthtime=yes
22162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022163 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022164sed 's/^/| /' conftest.$ac_ext >&5
22165
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022167/* confdefs.h. */
22168_ACEOF
22169cat confdefs.h >>conftest.$ac_ext
22170cat >>conftest.$ac_ext <<_ACEOF
22171/* end confdefs.h. */
22172$ac_includes_default
22173int
22174main ()
22175{
22176static struct stat ac_aggr;
22177if (sizeof ac_aggr.st_birthtime)
22178return 0;
22179 ;
22180 return 0;
22181}
22182_ACEOF
22183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184if { (ac_try="$ac_compile"
22185case "(($ac_try" in
22186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22187 *) ac_try_echo=$ac_try;;
22188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022191 ac_status=$?
22192 grep -v '^ *+' conftest.er1 >conftest.err
22193 rm -f conftest.er1
22194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196 (exit $ac_status); } && {
22197 test -z "$ac_c_werror_flag" ||
22198 test ! -s conftest.err
22199 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022200 ac_cv_member_struct_stat_st_birthtime=yes
22201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022202 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022203sed 's/^/| /' conftest.$ac_ext >&5
22204
Martin v. Löwiseba40652007-08-30 20:10:57 +000022205 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022207
22208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210
22211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022213{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22214echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22215if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022216
22217cat >>confdefs.h <<_ACEOF
22218#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22219_ACEOF
22220
22221
22222fi
22223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022224{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22225echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022226if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022227 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022228else
Martin v. Löwis11437992002-04-12 09:54:03 +000022229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022230/* confdefs.h. */
22231_ACEOF
22232cat confdefs.h >>conftest.$ac_ext
22233cat >>conftest.$ac_ext <<_ACEOF
22234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022235$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022236int
22237main ()
22238{
22239static struct stat ac_aggr;
22240if (ac_aggr.st_blocks)
22241return 0;
22242 ;
22243 return 0;
22244}
22245_ACEOF
22246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022247if { (ac_try="$ac_compile"
22248case "(($ac_try" in
22249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22250 *) ac_try_echo=$ac_try;;
22251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022255 grep -v '^ *+' conftest.er1 >conftest.err
22256 rm -f conftest.er1
22257 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022259 (exit $ac_status); } && {
22260 test -z "$ac_c_werror_flag" ||
22261 test ! -s conftest.err
22262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022263 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022266sed 's/^/| /' conftest.$ac_ext >&5
22267
Martin v. Löwiseba40652007-08-30 20:10:57 +000022268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022269/* confdefs.h. */
22270_ACEOF
22271cat confdefs.h >>conftest.$ac_ext
22272cat >>conftest.$ac_ext <<_ACEOF
22273/* end confdefs.h. */
22274$ac_includes_default
22275int
22276main ()
22277{
22278static struct stat ac_aggr;
22279if (sizeof ac_aggr.st_blocks)
22280return 0;
22281 ;
22282 return 0;
22283}
22284_ACEOF
22285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286if { (ac_try="$ac_compile"
22287case "(($ac_try" in
22288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22289 *) ac_try_echo=$ac_try;;
22290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022292 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022294 grep -v '^ *+' conftest.er1 >conftest.err
22295 rm -f conftest.er1
22296 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022298 (exit $ac_status); } && {
22299 test -z "$ac_c_werror_flag" ||
22300 test ! -s conftest.err
22301 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022302 ac_cv_member_struct_stat_st_blocks=yes
22303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022305sed 's/^/| /' conftest.$ac_ext >&5
22306
Martin v. Löwiseba40652007-08-30 20:10:57 +000022307 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022309
22310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022312
22313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022314fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022315{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22316echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22317if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022318
Martin v. Löwis11437992002-04-12 09:54:03 +000022319cat >>confdefs.h <<_ACEOF
22320#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22321_ACEOF
22322
22323
22324cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022325#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022326_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022327
22328else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022329 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022330 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22332 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022333esac
22334
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022335fi
22336
Michael W. Hudson54241132001-12-07 15:38:26 +000022337
Martin v. Löwis11437992002-04-12 09:54:03 +000022338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022339{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22340echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022341if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022343else
Martin v. Löwis11437992002-04-12 09:54:03 +000022344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022345/* confdefs.h. */
22346_ACEOF
22347cat confdefs.h >>conftest.$ac_ext
22348cat >>conftest.$ac_ext <<_ACEOF
22349/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022350#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022351int
22352main ()
22353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022354return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022355 ;
22356 return 0;
22357}
22358_ACEOF
22359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360if { (ac_try="$ac_compile"
22361case "(($ac_try" in
22362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22363 *) ac_try_echo=$ac_try;;
22364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022368 grep -v '^ *+' conftest.er1 >conftest.err
22369 rm -f conftest.er1
22370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022372 (exit $ac_status); } && {
22373 test -z "$ac_c_werror_flag" ||
22374 test ! -s conftest.err
22375 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022376 ac_cv_header_time_altzone=yes
22377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022379sed 's/^/| /' conftest.$ac_ext >&5
22380
Martin v. Löwiseba40652007-08-30 20:10:57 +000022381 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022382fi
22383
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22385fi
22386
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022387{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22388echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022389if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022390
22391cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022392#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022393_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022394
22395fi
22396
Guido van Rossumda88dad1995-01-26 00:46:29 +000022397was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022398{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22399echo $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 +000022400cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022401/* confdefs.h. */
22402_ACEOF
22403cat confdefs.h >>conftest.$ac_ext
22404cat >>conftest.$ac_ext <<_ACEOF
22405/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022406
22407#include <sys/types.h>
22408#include <sys/select.h>
22409#include <sys/time.h>
22410
Martin v. Löwis11437992002-04-12 09:54:03 +000022411int
22412main ()
22413{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022414;
Martin v. Löwis11437992002-04-12 09:54:03 +000022415 ;
22416 return 0;
22417}
22418_ACEOF
22419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022420if { (ac_try="$ac_compile"
22421case "(($ac_try" in
22422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22423 *) ac_try_echo=$ac_try;;
22424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022428 grep -v '^ *+' conftest.er1 >conftest.err
22429 rm -f conftest.er1
22430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432 (exit $ac_status); } && {
22433 test -z "$ac_c_werror_flag" ||
22434 test ! -s conftest.err
22435 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022436
22437
22438cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022439#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022440_ACEOF
22441
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022442 was_it_defined=yes
22443
Guido van Rossumf78abae1997-01-21 22:02:36 +000022444else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022446sed 's/^/| /' conftest.$ac_ext >&5
22447
Brett Cannon19fab762007-06-02 03:02:29 +000022448
Martin v. Löwiseba40652007-08-30 20:10:57 +000022449fi
22450
22451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022452{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22453echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022455{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22456echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022457if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022458 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022459else
Martin v. Löwis11437992002-04-12 09:54:03 +000022460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022461/* confdefs.h. */
22462_ACEOF
22463cat confdefs.h >>conftest.$ac_ext
22464cat >>conftest.$ac_ext <<_ACEOF
22465/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022466
22467# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022468int
22469main ()
22470{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022471struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022472 ;
22473 return 0;
22474}
22475_ACEOF
22476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022477if { (ac_try="$ac_compile"
22478case "(($ac_try" in
22479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22480 *) ac_try_echo=$ac_try;;
22481esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022485 grep -v '^ *+' conftest.er1 >conftest.err
22486 rm -f conftest.er1
22487 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022489 (exit $ac_status); } && {
22490 test -z "$ac_c_werror_flag" ||
22491 test ! -s conftest.err
22492 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022493 ac_cv_struct_addrinfo=yes
22494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022496sed 's/^/| /' conftest.$ac_ext >&5
22497
Martin v. Löwiseba40652007-08-30 20:10:57 +000022498 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022499fi
22500
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22502fi
22503
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022504{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22505echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022506if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022507
22508cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022509#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022510_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022511
22512fi
22513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022514{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22515echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022516if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022517 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022518else
Martin v. Löwis11437992002-04-12 09:54:03 +000022519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022520/* confdefs.h. */
22521_ACEOF
22522cat confdefs.h >>conftest.$ac_ext
22523cat >>conftest.$ac_ext <<_ACEOF
22524/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022525
22526# include <sys/types.h>
22527# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022528int
22529main ()
22530{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022531struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 ;
22533 return 0;
22534}
22535_ACEOF
22536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537if { (ac_try="$ac_compile"
22538case "(($ac_try" in
22539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22540 *) ac_try_echo=$ac_try;;
22541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022545 grep -v '^ *+' conftest.er1 >conftest.err
22546 rm -f conftest.er1
22547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022549 (exit $ac_status); } && {
22550 test -z "$ac_c_werror_flag" ||
22551 test ! -s conftest.err
22552 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022553 ac_cv_struct_sockaddr_storage=yes
22554else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022556sed 's/^/| /' conftest.$ac_ext >&5
22557
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022559fi
22560
Martin v. Löwiseba40652007-08-30 20:10:57 +000022561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22562fi
22563
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022564{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22565echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022566if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022567
22568cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022569#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022570_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022571
22572fi
22573
Guido van Rossum627b2d71993-12-24 10:39:16 +000022574# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022575
Michael W. Hudson54241132001-12-07 15:38:26 +000022576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022577{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22578echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022579if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022580 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022581else
Martin v. Löwis11437992002-04-12 09:54:03 +000022582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022583/* confdefs.h. */
22584_ACEOF
22585cat confdefs.h >>conftest.$ac_ext
22586cat >>conftest.$ac_ext <<_ACEOF
22587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022588$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022589int
22590main ()
22591{
22592static int test_array [1 - 2 * !(((char) -1) < 0)];
22593test_array [0] = 0
22594
22595 ;
22596 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022597}
Martin v. Löwis11437992002-04-12 09:54:03 +000022598_ACEOF
22599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600if { (ac_try="$ac_compile"
22601case "(($ac_try" in
22602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22603 *) ac_try_echo=$ac_try;;
22604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022608 grep -v '^ *+' conftest.er1 >conftest.err
22609 rm -f conftest.er1
22610 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612 (exit $ac_status); } && {
22613 test -z "$ac_c_werror_flag" ||
22614 test ! -s conftest.err
22615 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022616 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022619sed 's/^/| /' conftest.$ac_ext >&5
22620
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022623
22624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022625fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022626{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22627echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022628if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022629 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022630#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022631_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022632
22633fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022635{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22636echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022637if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022639else
22640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022641/* confdefs.h. */
22642_ACEOF
22643cat confdefs.h >>conftest.$ac_ext
22644cat >>conftest.$ac_ext <<_ACEOF
22645/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022646
Martin v. Löwis11437992002-04-12 09:54:03 +000022647int
22648main ()
22649{
22650/* FIXME: Include the comments suggested by Paul. */
22651#ifndef __cplusplus
22652 /* Ultrix mips cc rejects this. */
22653 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022654 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022655 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022656 char const *const *pcpcc;
22657 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 /* NEC SVR4.0.2 mips cc rejects this. */
22659 struct point {int x, y;};
22660 static struct point const zero = {0,0};
22661 /* AIX XL C 1.02.0.0 rejects this.
22662 It does not let you subtract one const X* pointer from another in
22663 an arm of an if-expression whose if-part is not a constant
22664 expression */
22665 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022666 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022668 ++pcpcc;
22669 ppc = (char**) pcpcc;
22670 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022671 { /* SCO 3.2v4 cc rejects this. */
22672 char *t;
22673 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022674
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 }
22678 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22679 int x[] = {25, 17};
22680 const int *foo = &x[0];
22681 ++foo;
22682 }
22683 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22684 typedef const int *iptr;
22685 iptr p = 0;
22686 ++p;
22687 }
22688 { /* AIX XL C 1.02.0.0 rejects this saying
22689 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22690 struct s { int j; const int *ap[3]; };
22691 struct s *b; b->j = 5;
22692 }
22693 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22694 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022695 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022696 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022697 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022698#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022699
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 ;
22701 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022702}
Martin v. Löwis11437992002-04-12 09:54:03 +000022703_ACEOF
22704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022705if { (ac_try="$ac_compile"
22706case "(($ac_try" in
22707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22708 *) ac_try_echo=$ac_try;;
22709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022713 grep -v '^ *+' conftest.er1 >conftest.err
22714 rm -f conftest.er1
22715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022717 (exit $ac_status); } && {
22718 test -z "$ac_c_werror_flag" ||
22719 test ! -s conftest.err
22720 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022721 ac_cv_c_const=yes
22722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022724sed 's/^/| /' conftest.$ac_ext >&5
22725
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022728
22729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022730fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022731{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22732echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022733if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022734
22735cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022736#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022737_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022738
22739fi
22740
Michael W. Hudson54241132001-12-07 15:38:26 +000022741
Guido van Rossumda88dad1995-01-26 00:46:29 +000022742works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022743{ echo "$as_me:$LINENO: checking for working volatile" >&5
22744echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022746/* confdefs.h. */
22747_ACEOF
22748cat confdefs.h >>conftest.$ac_ext
22749cat >>conftest.$ac_ext <<_ACEOF
22750/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022751
Martin v. Löwis11437992002-04-12 09:54:03 +000022752int
22753main ()
22754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022755volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022756 ;
22757 return 0;
22758}
22759_ACEOF
22760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022761if { (ac_try="$ac_compile"
22762case "(($ac_try" in
22763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22764 *) ac_try_echo=$ac_try;;
22765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022769 grep -v '^ *+' conftest.er1 >conftest.err
22770 rm -f conftest.er1
22771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022773 (exit $ac_status); } && {
22774 test -z "$ac_c_werror_flag" ||
22775 test ! -s conftest.err
22776 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022777 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022780sed 's/^/| /' conftest.$ac_ext >&5
22781
Martin v. Löwis11437992002-04-12 09:54:03 +000022782
22783cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022784#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022785_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022786
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022787
Guido van Rossum627b2d71993-12-24 10:39:16 +000022788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789
22790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022791{ echo "$as_me:$LINENO: result: $works" >&5
22792echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022793
Guido van Rossumda88dad1995-01-26 00:46:29 +000022794works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022795{ echo "$as_me:$LINENO: checking for working signed char" >&5
22796echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022798/* confdefs.h. */
22799_ACEOF
22800cat confdefs.h >>conftest.$ac_ext
22801cat >>conftest.$ac_ext <<_ACEOF
22802/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022803
Martin v. Löwis11437992002-04-12 09:54:03 +000022804int
22805main ()
22806{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022807signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 ;
22809 return 0;
22810}
22811_ACEOF
22812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813if { (ac_try="$ac_compile"
22814case "(($ac_try" in
22815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22816 *) ac_try_echo=$ac_try;;
22817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022821 grep -v '^ *+' conftest.er1 >conftest.err
22822 rm -f conftest.er1
22823 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022825 (exit $ac_status); } && {
22826 test -z "$ac_c_werror_flag" ||
22827 test ! -s conftest.err
22828 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022829 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022830else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022832sed 's/^/| /' conftest.$ac_ext >&5
22833
Martin v. Löwis11437992002-04-12 09:54:03 +000022834
22835cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022836#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022837_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022838
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022839
Guido van Rossum7f43da71994-08-01 12:15:30 +000022840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022841
22842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022843{ echo "$as_me:$LINENO: result: $works" >&5
22844echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022845
Guido van Rossumda88dad1995-01-26 00:46:29 +000022846have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022847{ echo "$as_me:$LINENO: checking for prototypes" >&5
22848echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022849cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022850/* confdefs.h. */
22851_ACEOF
22852cat confdefs.h >>conftest.$ac_ext
22853cat >>conftest.$ac_ext <<_ACEOF
22854/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022855int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022856int
22857main ()
22858{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022859return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022860 ;
22861 return 0;
22862}
22863_ACEOF
22864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865if { (ac_try="$ac_compile"
22866case "(($ac_try" in
22867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22868 *) ac_try_echo=$ac_try;;
22869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022873 grep -v '^ *+' conftest.er1 >conftest.err
22874 rm -f conftest.er1
22875 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877 (exit $ac_status); } && {
22878 test -z "$ac_c_werror_flag" ||
22879 test ! -s conftest.err
22880 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022881
22882
22883cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022884#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022885_ACEOF
22886
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022887 have_prototypes=yes
22888
Guido van Rossumf78abae1997-01-21 22:02:36 +000022889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022891sed 's/^/| /' conftest.$ac_ext >&5
22892
Martin v. Löwiseba40652007-08-30 20:10:57 +000022893
Guido van Rossum7f43da71994-08-01 12:15:30 +000022894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022895
22896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022897{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22898echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022899
Guido van Rossumda88dad1995-01-26 00:46:29 +000022900works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022901{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22902echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022904/* confdefs.h. */
22905_ACEOF
22906cat confdefs.h >>conftest.$ac_ext
22907cat >>conftest.$ac_ext <<_ACEOF
22908/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022909
22910#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022911int foo(int x, ...) {
22912 va_list va;
22913 va_start(va, x);
22914 va_arg(va, int);
22915 va_arg(va, char *);
22916 va_arg(va, double);
22917 return 0;
22918}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022919
Martin v. Löwis11437992002-04-12 09:54:03 +000022920int
22921main ()
22922{
Guido van Rossum90eea071996-08-30 20:58:57 +000022923return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022924 ;
22925 return 0;
22926}
22927_ACEOF
22928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929if { (ac_try="$ac_compile"
22930case "(($ac_try" in
22931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22932 *) ac_try_echo=$ac_try;;
22933esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022937 grep -v '^ *+' conftest.er1 >conftest.err
22938 rm -f conftest.er1
22939 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941 (exit $ac_status); } && {
22942 test -z "$ac_c_werror_flag" ||
22943 test ! -s conftest.err
22944 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022945
22946
22947cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022948#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022949_ACEOF
22950
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022951 works=yes
22952
Guido van Rossumf78abae1997-01-21 22:02:36 +000022953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022955sed 's/^/| /' conftest.$ac_ext >&5
22956
Martin v. Löwiseba40652007-08-30 20:10:57 +000022957
Guido van Rossum627b2d71993-12-24 10:39:16 +000022958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959
22960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022961{ echo "$as_me:$LINENO: result: $works" >&5
22962echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022963
Martin v. Löwisd6320502004-08-12 13:45:08 +000022964# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022965{ echo "$as_me:$LINENO: checking for socketpair" >&5
22966echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022967cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022968/* confdefs.h. */
22969_ACEOF
22970cat confdefs.h >>conftest.$ac_ext
22971cat >>conftest.$ac_ext <<_ACEOF
22972/* end confdefs.h. */
22973
22974#include <sys/types.h>
22975#include <sys/socket.h>
22976
22977int
22978main ()
22979{
22980void *x=socketpair
22981 ;
22982 return 0;
22983}
22984_ACEOF
22985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022986if { (ac_try="$ac_compile"
22987case "(($ac_try" in
22988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22989 *) ac_try_echo=$ac_try;;
22990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022994 grep -v '^ *+' conftest.er1 >conftest.err
22995 rm -f conftest.er1
22996 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022998 (exit $ac_status); } && {
22999 test -z "$ac_c_werror_flag" ||
23000 test ! -s conftest.err
23001 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023002
23003cat >>confdefs.h <<\_ACEOF
23004#define HAVE_SOCKETPAIR 1
23005_ACEOF
23006
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023007 { echo "$as_me:$LINENO: result: yes" >&5
23008echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023010 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023011sed 's/^/| /' conftest.$ac_ext >&5
23012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023013 { echo "$as_me:$LINENO: result: no" >&5
23014echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023015
23016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023017
23018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023019
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023020# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023021{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23022echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023024/* confdefs.h. */
23025_ACEOF
23026cat confdefs.h >>conftest.$ac_ext
23027cat >>conftest.$ac_ext <<_ACEOF
23028/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023029#include <sys/types.h>
23030#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023031int
23032main ()
23033{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023034struct sockaddr x;
23035x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023036 ;
23037 return 0;
23038}
23039_ACEOF
23040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023041if { (ac_try="$ac_compile"
23042case "(($ac_try" in
23043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23044 *) ac_try_echo=$ac_try;;
23045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023049 grep -v '^ *+' conftest.er1 >conftest.err
23050 rm -f conftest.er1
23051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023053 (exit $ac_status); } && {
23054 test -z "$ac_c_werror_flag" ||
23055 test ! -s conftest.err
23056 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023057 { echo "$as_me:$LINENO: result: yes" >&5
23058echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023059
23060cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023061#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023062_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023063
23064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023066sed 's/^/| /' conftest.$ac_ext >&5
23067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023068 { echo "$as_me:$LINENO: result: no" >&5
23069echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023071
23072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023073
Guido van Rossumda88dad1995-01-26 00:46:29 +000023074va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023075{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23076echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023078/* confdefs.h. */
23079_ACEOF
23080cat confdefs.h >>conftest.$ac_ext
23081cat >>conftest.$ac_ext <<_ACEOF
23082/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023083
23084#ifdef HAVE_STDARG_PROTOTYPES
23085#include <stdarg.h>
23086#else
23087#include <varargs.h>
23088#endif
23089
Martin v. Löwis11437992002-04-12 09:54:03 +000023090int
23091main ()
23092{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023093va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023094 ;
23095 return 0;
23096}
23097_ACEOF
23098rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023099if { (ac_try="$ac_compile"
23100case "(($ac_try" in
23101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23102 *) ac_try_echo=$ac_try;;
23103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023105 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023107 grep -v '^ *+' conftest.er1 >conftest.err
23108 rm -f conftest.er1
23109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023111 (exit $ac_status); } && {
23112 test -z "$ac_c_werror_flag" ||
23113 test ! -s conftest.err
23114 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023115 :
23116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023118sed 's/^/| /' conftest.$ac_ext >&5
23119
Martin v. Löwis11437992002-04-12 09:54:03 +000023120
23121
23122cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023123#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023124_ACEOF
23125
Guido van Rossumda88dad1995-01-26 00:46:29 +000023126 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023127
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129
23130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023131{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23132echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023133
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023134# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023135
23136
23137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023138{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23139echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023140if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023142else
Martin v. Löwis11437992002-04-12 09:54:03 +000023143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023144/* confdefs.h. */
23145_ACEOF
23146cat confdefs.h >>conftest.$ac_ext
23147cat >>conftest.$ac_ext <<_ACEOF
23148/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023149/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23150 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23151#define gethostbyname_r innocuous_gethostbyname_r
23152
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023153/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023154 which can conflict with char gethostbyname_r (); below.
23155 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023156 <limits.h> exists even on freestanding compilers. */
23157
23158#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023159# include <limits.h>
23160#else
23161# include <assert.h>
23162#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023163
23164#undef gethostbyname_r
23165
Martin v. Löwiseba40652007-08-30 20:10:57 +000023166/* Override any GCC internal prototype to avoid an error.
23167 Use char because int might match the return type of a GCC
23168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023169#ifdef __cplusplus
23170extern "C"
23171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023172char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023173/* The GNU C library defines this for functions which it implements
23174 to always fail with ENOSYS. Some functions are actually named
23175 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023176#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023177choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023178#endif
23179
Skip Montanaro6dead952003-09-25 14:50:04 +000023180int
23181main ()
23182{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023183return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023184 ;
23185 return 0;
23186}
23187_ACEOF
23188rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023189if { (ac_try="$ac_link"
23190case "(($ac_try" in
23191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23192 *) ac_try_echo=$ac_try;;
23193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023197 grep -v '^ *+' conftest.er1 >conftest.err
23198 rm -f conftest.er1
23199 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201 (exit $ac_status); } && {
23202 test -z "$ac_c_werror_flag" ||
23203 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023204 } && test -s conftest$ac_exeext &&
23205 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023206 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023209sed 's/^/| /' conftest.$ac_ext >&5
23210
Martin v. Löwiseba40652007-08-30 20:10:57 +000023211 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213
23214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023215 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023216fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023217{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23218echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23219if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023220
Martin v. Löwis11437992002-04-12 09:54:03 +000023221 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023222#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023223_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023225 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23226echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023227 OLD_CFLAGS=$CFLAGS
23228 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023230/* confdefs.h. */
23231_ACEOF
23232cat confdefs.h >>conftest.$ac_ext
23233cat >>conftest.$ac_ext <<_ACEOF
23234/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023235
23236# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023237
Martin v. Löwis11437992002-04-12 09:54:03 +000023238int
23239main ()
23240{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023241
23242 char *name;
23243 struct hostent *he, *res;
23244 char buffer[2048];
23245 int buflen = 2048;
23246 int h_errnop;
23247
23248 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023249
23250 ;
23251 return 0;
23252}
23253_ACEOF
23254rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023255if { (ac_try="$ac_compile"
23256case "(($ac_try" in
23257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23258 *) ac_try_echo=$ac_try;;
23259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023263 grep -v '^ *+' conftest.er1 >conftest.err
23264 rm -f conftest.er1
23265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023267 (exit $ac_status); } && {
23268 test -z "$ac_c_werror_flag" ||
23269 test ! -s conftest.err
23270 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023271
23272 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023273#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023274_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023275
Martin v. Löwis11437992002-04-12 09:54:03 +000023276
23277cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023278#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023279_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023281 { echo "$as_me:$LINENO: result: yes" >&5
23282echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023283
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023286sed 's/^/| /' conftest.$ac_ext >&5
23287
Martin v. Löwis11437992002-04-12 09:54:03 +000023288
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023289 { echo "$as_me:$LINENO: result: no" >&5
23290echo "${ECHO_T}no" >&6; }
23291 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23292echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023294/* confdefs.h. */
23295_ACEOF
23296cat confdefs.h >>conftest.$ac_ext
23297cat >>conftest.$ac_ext <<_ACEOF
23298/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023299
23300# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023301
Martin v. Löwis11437992002-04-12 09:54:03 +000023302int
23303main ()
23304{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023305
23306 char *name;
23307 struct hostent *he;
23308 char buffer[2048];
23309 int buflen = 2048;
23310 int h_errnop;
23311
23312 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023313
23314 ;
23315 return 0;
23316}
23317_ACEOF
23318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023319if { (ac_try="$ac_compile"
23320case "(($ac_try" in
23321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23322 *) ac_try_echo=$ac_try;;
23323esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023327 grep -v '^ *+' conftest.er1 >conftest.err
23328 rm -f conftest.er1
23329 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023331 (exit $ac_status); } && {
23332 test -z "$ac_c_werror_flag" ||
23333 test ! -s conftest.err
23334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023335
23336 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023337#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023338_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023339
Martin v. Löwis11437992002-04-12 09:54:03 +000023340
23341cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023342#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023343_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023345 { echo "$as_me:$LINENO: result: yes" >&5
23346echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023347
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023350sed 's/^/| /' conftest.$ac_ext >&5
23351
Martin v. Löwis11437992002-04-12 09:54:03 +000023352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023353 { echo "$as_me:$LINENO: result: no" >&5
23354echo "${ECHO_T}no" >&6; }
23355 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23356echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023358/* confdefs.h. */
23359_ACEOF
23360cat confdefs.h >>conftest.$ac_ext
23361cat >>conftest.$ac_ext <<_ACEOF
23362/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023363
23364# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023365
Martin v. Löwis11437992002-04-12 09:54:03 +000023366int
23367main ()
23368{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023369
23370 char *name;
23371 struct hostent *he;
23372 struct hostent_data data;
23373
23374 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023375
23376 ;
23377 return 0;
23378}
23379_ACEOF
23380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023381if { (ac_try="$ac_compile"
23382case "(($ac_try" in
23383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23384 *) ac_try_echo=$ac_try;;
23385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023389 grep -v '^ *+' conftest.er1 >conftest.err
23390 rm -f conftest.er1
23391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023393 (exit $ac_status); } && {
23394 test -z "$ac_c_werror_flag" ||
23395 test ! -s conftest.err
23396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023397
23398 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023399#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023400_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023401
Martin v. Löwis11437992002-04-12 09:54:03 +000023402
23403cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023404#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023405_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023406
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023407 { echo "$as_me:$LINENO: result: yes" >&5
23408echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023412sed 's/^/| /' conftest.$ac_ext >&5
23413
Martin v. Löwis11437992002-04-12 09:54:03 +000023414
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023415 { echo "$as_me:$LINENO: result: no" >&5
23416echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023417
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419
23420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023421
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023423
23424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023427
23428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023429 CFLAGS=$OLD_CFLAGS
23430
23431else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023432
Martin v. Löwis11437992002-04-12 09:54:03 +000023433
23434for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023435do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023436as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23437{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23438echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023439if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023441else
Martin v. Löwis11437992002-04-12 09:54:03 +000023442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023443/* confdefs.h. */
23444_ACEOF
23445cat confdefs.h >>conftest.$ac_ext
23446cat >>conftest.$ac_ext <<_ACEOF
23447/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023448/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23449 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23450#define $ac_func innocuous_$ac_func
23451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023452/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023453 which can conflict with char $ac_func (); below.
23454 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023455 <limits.h> exists even on freestanding compilers. */
23456
23457#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023458# include <limits.h>
23459#else
23460# include <assert.h>
23461#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023462
23463#undef $ac_func
23464
Martin v. Löwiseba40652007-08-30 20:10:57 +000023465/* Override any GCC internal prototype to avoid an error.
23466 Use char because int might match the return type of a GCC
23467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023468#ifdef __cplusplus
23469extern "C"
23470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023471char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023472/* The GNU C library defines this for functions which it implements
23473 to always fail with ENOSYS. Some functions are actually named
23474 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023475#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023476choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023477#endif
23478
Skip Montanaro6dead952003-09-25 14:50:04 +000023479int
23480main ()
23481{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023482return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023483 ;
23484 return 0;
23485}
23486_ACEOF
23487rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488if { (ac_try="$ac_link"
23489case "(($ac_try" in
23490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23491 *) ac_try_echo=$ac_try;;
23492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023494 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023496 grep -v '^ *+' conftest.er1 >conftest.err
23497 rm -f conftest.er1
23498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500 (exit $ac_status); } && {
23501 test -z "$ac_c_werror_flag" ||
23502 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023503 } && test -s conftest$ac_exeext &&
23504 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023505 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023508sed 's/^/| /' conftest.$ac_ext >&5
23509
Martin v. Löwiseba40652007-08-30 20:10:57 +000023510 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023512
23513rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023514 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023515fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023516ac_res=`eval echo '${'$as_ac_var'}'`
23517 { echo "$as_me:$LINENO: result: $ac_res" >&5
23518echo "${ECHO_T}$ac_res" >&6; }
23519if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023520 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023522_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023524fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023525done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023526
Michael W. Hudson54241132001-12-07 15:38:26 +000023527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023528fi
23529
Michael W. Hudson54241132001-12-07 15:38:26 +000023530
23531
23532
23533
23534
23535
Guido van Rossum627b2d71993-12-24 10:39:16 +000023536# checks for system services
23537# (none yet)
23538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023539# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023540{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23541echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023542if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023543 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023544else
Martin v. Löwis11437992002-04-12 09:54:03 +000023545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023546/* confdefs.h. */
23547_ACEOF
23548cat confdefs.h >>conftest.$ac_ext
23549cat >>conftest.$ac_ext <<_ACEOF
23550/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023551/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23552 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23553#define __fpu_control innocuous___fpu_control
23554
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023555/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023556 which can conflict with char __fpu_control (); below.
23557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023558 <limits.h> exists even on freestanding compilers. */
23559
23560#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023561# include <limits.h>
23562#else
23563# include <assert.h>
23564#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023565
23566#undef __fpu_control
23567
Martin v. Löwiseba40652007-08-30 20:10:57 +000023568/* Override any GCC internal prototype to avoid an error.
23569 Use char because int might match the return type of a GCC
23570 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023571#ifdef __cplusplus
23572extern "C"
23573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023574char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023575/* The GNU C library defines this for functions which it implements
23576 to always fail with ENOSYS. Some functions are actually named
23577 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023578#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023579choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023580#endif
23581
Skip Montanaro6dead952003-09-25 14:50:04 +000023582int
23583main ()
23584{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023585return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023586 ;
23587 return 0;
23588}
23589_ACEOF
23590rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591if { (ac_try="$ac_link"
23592case "(($ac_try" in
23593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23594 *) ac_try_echo=$ac_try;;
23595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023597 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023599 grep -v '^ *+' conftest.er1 >conftest.err
23600 rm -f conftest.er1
23601 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023603 (exit $ac_status); } && {
23604 test -z "$ac_c_werror_flag" ||
23605 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023606 } && test -s conftest$ac_exeext &&
23607 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023608 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023611sed 's/^/| /' conftest.$ac_ext >&5
23612
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023615
23616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023617 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023618fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023619{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23620echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23621if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023622 :
23623else
Martin v. Löwis11437992002-04-12 09:54:03 +000023624
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023625{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23626echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023627if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023628 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023629else
Martin v. Löwis11437992002-04-12 09:54:03 +000023630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023631LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023633/* confdefs.h. */
23634_ACEOF
23635cat confdefs.h >>conftest.$ac_ext
23636cat >>conftest.$ac_ext <<_ACEOF
23637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023638
Martin v. Löwiseba40652007-08-30 20:10:57 +000023639/* Override any GCC internal prototype to avoid an error.
23640 Use char because int might match the return type of a GCC
23641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023642#ifdef __cplusplus
23643extern "C"
23644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023645char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023646int
23647main ()
23648{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023649return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023650 ;
23651 return 0;
23652}
23653_ACEOF
23654rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023655if { (ac_try="$ac_link"
23656case "(($ac_try" in
23657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23658 *) ac_try_echo=$ac_try;;
23659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023661 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023663 grep -v '^ *+' conftest.er1 >conftest.err
23664 rm -f conftest.er1
23665 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023667 (exit $ac_status); } && {
23668 test -z "$ac_c_werror_flag" ||
23669 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023670 } && test -s conftest$ac_exeext &&
23671 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023672 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023673else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023675sed 's/^/| /' conftest.$ac_ext >&5
23676
Martin v. Löwiseba40652007-08-30 20:10:57 +000023677 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023679
23680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023683fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023684{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23685echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23686if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023687 cat >>confdefs.h <<_ACEOF
23688#define HAVE_LIBIEEE 1
23689_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023691 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023692
Guido van Rossum627b2d71993-12-24 10:39:16 +000023693fi
23694
Michael W. Hudson54241132001-12-07 15:38:26 +000023695
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023696fi
23697
Michael W. Hudson54241132001-12-07 15:38:26 +000023698
Guido van Rossum7f253911997-05-09 02:42:48 +000023699# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023700{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23701echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023702
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023704if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023705 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023706if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023707then
23708
23709cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023710#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023711_ACEOF
23712
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023713 { echo "$as_me:$LINENO: result: yes" >&5
23714echo "${ECHO_T}yes" >&6; }
23715else { echo "$as_me:$LINENO: result: no" >&5
23716echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023717fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023719 { echo "$as_me:$LINENO: result: no" >&5
23720echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023721fi
23722
Guido van Rossum7f253911997-05-09 02:42:48 +000023723
Guido van Rossum7f43da71994-08-01 12:15:30 +000023724# check for --with-libm=...
23725
Guido van Rossum563e7081996-09-10 18:20:48 +000023726case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023727Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023728BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023729*) LIBM=-lm
23730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023731{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23732echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023733
Martin v. Löwiseba40652007-08-30 20:10:57 +000023734# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023735if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023736 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023737if test "$withval" = no
23738then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023739 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23740echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023741elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023742then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023743 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23744echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23745else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23746echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023747 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023748fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023750 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23751echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023752fi
23753
Guido van Rossum7f43da71994-08-01 12:15:30 +000023754
23755# check for --with-libc=...
23756
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023757{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23758echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023759
Martin v. Löwiseba40652007-08-30 20:10:57 +000023760# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023761if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023762 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023763if test "$withval" = no
23764then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023765 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23766echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023767elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023768then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023769 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23770echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23771else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23772echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023773 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023774fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023775else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023776 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23777echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778fi
23779
Guido van Rossum7f43da71994-08-01 12:15:30 +000023780
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023781# **************************************************
23782# * Check for various properties of floating point *
23783# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023784
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023785{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23786echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23787if test "${ac_cv_little_endian_double+set}" = set; then
23788 echo $ECHO_N "(cached) $ECHO_C" >&6
23789else
23790
23791if test "$cross_compiling" = yes; then
23792 ac_cv_little_endian_double=no
23793else
23794 cat >conftest.$ac_ext <<_ACEOF
23795/* confdefs.h. */
23796_ACEOF
23797cat confdefs.h >>conftest.$ac_ext
23798cat >>conftest.$ac_ext <<_ACEOF
23799/* end confdefs.h. */
23800
23801#include <string.h>
23802int main() {
23803 double x = 9006104071832581.0;
23804 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23805 return 0;
23806 else
23807 return 1;
23808}
23809
23810_ACEOF
23811rm -f conftest$ac_exeext
23812if { (ac_try="$ac_link"
23813case "(($ac_try" in
23814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23815 *) ac_try_echo=$ac_try;;
23816esac
23817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23818 (eval "$ac_link") 2>&5
23819 ac_status=$?
23820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23822 { (case "(($ac_try" in
23823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23824 *) ac_try_echo=$ac_try;;
23825esac
23826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23827 (eval "$ac_try") 2>&5
23828 ac_status=$?
23829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23830 (exit $ac_status); }; }; then
23831 ac_cv_little_endian_double=yes
23832else
23833 echo "$as_me: program exited with status $ac_status" >&5
23834echo "$as_me: failed program was:" >&5
23835sed 's/^/| /' conftest.$ac_ext >&5
23836
23837( exit $ac_status )
23838ac_cv_little_endian_double=no
23839fi
23840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23841fi
23842
23843
23844fi
23845
23846{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23847echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23848if test "$ac_cv_little_endian_double" = yes
23849then
23850
23851cat >>confdefs.h <<\_ACEOF
23852#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23853_ACEOF
23854
23855fi
23856
23857{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23858echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23859if test "${ac_cv_big_endian_double+set}" = set; then
23860 echo $ECHO_N "(cached) $ECHO_C" >&6
23861else
23862
23863if test "$cross_compiling" = yes; then
23864 ac_cv_big_endian_double=no
23865else
23866 cat >conftest.$ac_ext <<_ACEOF
23867/* confdefs.h. */
23868_ACEOF
23869cat confdefs.h >>conftest.$ac_ext
23870cat >>conftest.$ac_ext <<_ACEOF
23871/* end confdefs.h. */
23872
23873#include <string.h>
23874int main() {
23875 double x = 9006104071832581.0;
23876 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23877 return 0;
23878 else
23879 return 1;
23880}
23881
23882_ACEOF
23883rm -f conftest$ac_exeext
23884if { (ac_try="$ac_link"
23885case "(($ac_try" in
23886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23887 *) ac_try_echo=$ac_try;;
23888esac
23889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23890 (eval "$ac_link") 2>&5
23891 ac_status=$?
23892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23894 { (case "(($ac_try" in
23895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23896 *) ac_try_echo=$ac_try;;
23897esac
23898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23899 (eval "$ac_try") 2>&5
23900 ac_status=$?
23901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23902 (exit $ac_status); }; }; then
23903 ac_cv_big_endian_double=yes
23904else
23905 echo "$as_me: program exited with status $ac_status" >&5
23906echo "$as_me: failed program was:" >&5
23907sed 's/^/| /' conftest.$ac_ext >&5
23908
23909( exit $ac_status )
23910ac_cv_big_endian_double=no
23911fi
23912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23913fi
23914
23915
23916fi
23917
23918{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23919echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23920if test "$ac_cv_big_endian_double" = yes
23921then
23922
23923cat >>confdefs.h <<\_ACEOF
23924#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23925_ACEOF
23926
23927fi
23928
23929# Some ARM platforms use a mixed-endian representation for doubles.
23930# While Python doesn't currently have full support for these platforms
23931# (see e.g., issue 1762561), we can at least make sure that float <-> string
23932# conversions work.
23933{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23934echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23935if test "${ac_cv_mixed_endian_double+set}" = set; then
23936 echo $ECHO_N "(cached) $ECHO_C" >&6
23937else
23938
23939if test "$cross_compiling" = yes; then
23940 ac_cv_mixed_endian_double=no
23941else
23942 cat >conftest.$ac_ext <<_ACEOF
23943/* confdefs.h. */
23944_ACEOF
23945cat confdefs.h >>conftest.$ac_ext
23946cat >>conftest.$ac_ext <<_ACEOF
23947/* end confdefs.h. */
23948
23949#include <string.h>
23950int main() {
23951 double x = 9006104071832581.0;
23952 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23953 return 0;
23954 else
23955 return 1;
23956}
23957
23958_ACEOF
23959rm -f conftest$ac_exeext
23960if { (ac_try="$ac_link"
23961case "(($ac_try" in
23962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23963 *) ac_try_echo=$ac_try;;
23964esac
23965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23966 (eval "$ac_link") 2>&5
23967 ac_status=$?
23968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23970 { (case "(($ac_try" in
23971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23972 *) ac_try_echo=$ac_try;;
23973esac
23974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23975 (eval "$ac_try") 2>&5
23976 ac_status=$?
23977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23978 (exit $ac_status); }; }; then
23979 ac_cv_mixed_endian_double=yes
23980else
23981 echo "$as_me: program exited with status $ac_status" >&5
23982echo "$as_me: failed program was:" >&5
23983sed 's/^/| /' conftest.$ac_ext >&5
23984
23985( exit $ac_status )
23986ac_cv_mixed_endian_double=no
23987fi
23988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23989fi
23990
23991
23992fi
23993
23994{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23995echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23996if test "$ac_cv_mixed_endian_double" = yes
23997then
23998
23999cat >>confdefs.h <<\_ACEOF
24000#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24001_ACEOF
24002
24003fi
24004
24005# The short float repr introduced in Python 3.1 requires the
24006# correctly-rounded string <-> double conversion functions from
24007# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24008# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024009# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024010# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024011
24012# This inline assembler syntax may also work for suncc and icc,
24013# so we try it on all platforms.
24014
24015{ 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 +000024016echo $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 +000024017cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024018/* confdefs.h. */
24019_ACEOF
24020cat confdefs.h >>conftest.$ac_ext
24021cat >>conftest.$ac_ext <<_ACEOF
24022/* end confdefs.h. */
24023
24024int
24025main ()
24026{
24027
Mark Dickinsona548dee2009-11-15 13:12:43 +000024028 unsigned short cw;
24029 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24030 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024031
24032 ;
24033 return 0;
24034}
24035_ACEOF
24036rm -f conftest.$ac_objext
24037if { (ac_try="$ac_compile"
24038case "(($ac_try" in
24039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24040 *) ac_try_echo=$ac_try;;
24041esac
24042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24043 (eval "$ac_compile") 2>conftest.er1
24044 ac_status=$?
24045 grep -v '^ *+' conftest.er1 >conftest.err
24046 rm -f conftest.er1
24047 cat conftest.err >&5
24048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24049 (exit $ac_status); } && {
24050 test -z "$ac_c_werror_flag" ||
24051 test ! -s conftest.err
24052 } && test -s conftest.$ac_objext; then
24053 have_gcc_asm_for_x87=yes
24054else
24055 echo "$as_me: failed program was:" >&5
24056sed 's/^/| /' conftest.$ac_ext >&5
24057
24058 have_gcc_asm_for_x87=no
24059fi
24060
24061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024062{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024063echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024064if test "$have_gcc_asm_for_x87" = yes
24065then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024066
24067cat >>confdefs.h <<\_ACEOF
24068#define HAVE_GCC_ASM_FOR_X87 1
24069_ACEOF
24070
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024071fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024072
Mark Dickinson04b27232009-01-04 12:29:36 +000024073# Detect whether system arithmetic is subject to x87-style double
24074# rounding issues. The result of this test has little meaning on non
24075# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24076# mode is round-to-nearest and double rounding issues are present, and
24077# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024078{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24079echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024080# $BASECFLAGS may affect the result
24081ac_save_cc="$CC"
24082CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024083if test "$cross_compiling" = yes; then
24084 ac_cv_x87_double_rounding=no
24085else
24086 cat >conftest.$ac_ext <<_ACEOF
24087/* confdefs.h. */
24088_ACEOF
24089cat confdefs.h >>conftest.$ac_ext
24090cat >>conftest.$ac_ext <<_ACEOF
24091/* end confdefs.h. */
24092
24093#include <stdlib.h>
24094#include <math.h>
24095int main() {
24096 volatile double x, y, z;
24097 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24098 x = 0.99999999999999989; /* 1-2**-53 */
24099 y = 1./x;
24100 if (y != 1.)
24101 exit(0);
24102 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24103 x = 1e16;
24104 y = 2.99999;
24105 z = x + y;
24106 if (z != 1e16+4.)
24107 exit(0);
24108 /* both tests show evidence of double rounding */
24109 exit(1);
24110}
24111
24112_ACEOF
24113rm -f conftest$ac_exeext
24114if { (ac_try="$ac_link"
24115case "(($ac_try" in
24116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24117 *) ac_try_echo=$ac_try;;
24118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024120 (eval "$ac_link") 2>&5
24121 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24124 { (case "(($ac_try" in
24125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24126 *) ac_try_echo=$ac_try;;
24127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024129 (eval "$ac_try") 2>&5
24130 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024132 (exit $ac_status); }; }; then
24133 ac_cv_x87_double_rounding=no
24134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024135 echo "$as_me: program exited with status $ac_status" >&5
24136echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024137sed 's/^/| /' conftest.$ac_ext >&5
24138
24139( exit $ac_status )
24140ac_cv_x87_double_rounding=yes
24141fi
24142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24143fi
24144
24145
Mark Dickinson99abd142009-10-24 13:44:16 +000024146CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024147{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24148echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024149if test "$ac_cv_x87_double_rounding" = yes
24150then
24151
24152cat >>confdefs.h <<\_ACEOF
24153#define X87_DOUBLE_ROUNDING 1
24154_ACEOF
24155
24156fi
24157
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024158# ************************************
24159# * Check for mathematical functions *
24160# ************************************
24161
24162LIBS_SAVE=$LIBS
24163LIBS="$LIBS $LIBM"
24164
Mark Dickinson265d7382008-04-21 22:32:24 +000024165# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24166# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024167{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24168echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024169if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024170 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024171else
24172
24173if test "$cross_compiling" = yes; then
24174 ac_cv_tanh_preserves_zero_sign=no
24175else
24176 cat >conftest.$ac_ext <<_ACEOF
24177/* confdefs.h. */
24178_ACEOF
24179cat confdefs.h >>conftest.$ac_ext
24180cat >>conftest.$ac_ext <<_ACEOF
24181/* end confdefs.h. */
24182
24183#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024184#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024185int main() {
24186 /* return 0 if either negative zeros don't exist
24187 on this platform or if negative zeros exist
24188 and tanh(-0.) == -0. */
24189 if (atan2(0., -1.) == atan2(-0., -1.) ||
24190 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24191 else exit(1);
24192}
24193
24194_ACEOF
24195rm -f conftest$ac_exeext
24196if { (ac_try="$ac_link"
24197case "(($ac_try" in
24198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24199 *) ac_try_echo=$ac_try;;
24200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024202 (eval "$ac_link") 2>&5
24203 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24206 { (case "(($ac_try" in
24207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24208 *) ac_try_echo=$ac_try;;
24209esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024211 (eval "$ac_try") 2>&5
24212 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024214 (exit $ac_status); }; }; then
24215 ac_cv_tanh_preserves_zero_sign=yes
24216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024217 echo "$as_me: program exited with status $ac_status" >&5
24218echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024219sed 's/^/| /' conftest.$ac_ext >&5
24220
24221( exit $ac_status )
24222ac_cv_tanh_preserves_zero_sign=no
24223fi
24224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24225fi
24226
24227
24228fi
24229
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024230{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24231echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024232if test "$ac_cv_tanh_preserves_zero_sign" = yes
24233then
24234
24235cat >>confdefs.h <<\_ACEOF
24236#define TANH_PRESERVES_ZERO_SIGN 1
24237_ACEOF
24238
24239fi
24240
Martin v. Löwis11437992002-04-12 09:54:03 +000024241
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024242
Michael W. Hudson54241132001-12-07 15:38:26 +000024243
Christian Heimes0a8143f2007-12-18 23:22:54 +000024244
24245
24246
24247
24248
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024249
Mark Dickinson65898e02009-09-05 10:27:00 +000024250for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24251do
24252as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24253{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24254echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24255if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24256 echo $ECHO_N "(cached) $ECHO_C" >&6
24257else
24258 cat >conftest.$ac_ext <<_ACEOF
24259/* confdefs.h. */
24260_ACEOF
24261cat confdefs.h >>conftest.$ac_ext
24262cat >>conftest.$ac_ext <<_ACEOF
24263/* end confdefs.h. */
24264/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24265 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24266#define $ac_func innocuous_$ac_func
24267
24268/* System header to define __stub macros and hopefully few prototypes,
24269 which can conflict with char $ac_func (); below.
24270 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24271 <limits.h> exists even on freestanding compilers. */
24272
24273#ifdef __STDC__
24274# include <limits.h>
24275#else
24276# include <assert.h>
24277#endif
24278
24279#undef $ac_func
24280
24281/* Override any GCC internal prototype to avoid an error.
24282 Use char because int might match the return type of a GCC
24283 builtin and then its argument prototype would still apply. */
24284#ifdef __cplusplus
24285extern "C"
24286#endif
24287char $ac_func ();
24288/* The GNU C library defines this for functions which it implements
24289 to always fail with ENOSYS. Some functions are actually named
24290 something starting with __ and the normal name is an alias. */
24291#if defined __stub_$ac_func || defined __stub___$ac_func
24292choke me
24293#endif
24294
24295int
24296main ()
24297{
24298return $ac_func ();
24299 ;
24300 return 0;
24301}
24302_ACEOF
24303rm -f conftest.$ac_objext conftest$ac_exeext
24304if { (ac_try="$ac_link"
24305case "(($ac_try" in
24306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24307 *) ac_try_echo=$ac_try;;
24308esac
24309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24310 (eval "$ac_link") 2>conftest.er1
24311 ac_status=$?
24312 grep -v '^ *+' conftest.er1 >conftest.err
24313 rm -f conftest.er1
24314 cat conftest.err >&5
24315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24316 (exit $ac_status); } && {
24317 test -z "$ac_c_werror_flag" ||
24318 test ! -s conftest.err
24319 } && test -s conftest$ac_exeext &&
24320 $as_test_x conftest$ac_exeext; then
24321 eval "$as_ac_var=yes"
24322else
24323 echo "$as_me: failed program was:" >&5
24324sed 's/^/| /' conftest.$ac_ext >&5
24325
24326 eval "$as_ac_var=no"
24327fi
24328
24329rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24330 conftest$ac_exeext conftest.$ac_ext
24331fi
24332ac_res=`eval echo '${'$as_ac_var'}'`
24333 { echo "$as_me:$LINENO: result: $ac_res" >&5
24334echo "${ECHO_T}$ac_res" >&6; }
24335if test `eval echo '${'$as_ac_var'}'` = yes; then
24336 cat >>confdefs.h <<_ACEOF
24337#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24338_ACEOF
24339
24340fi
24341done
24342
24343
24344
24345
24346
24347
24348for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024349do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024350as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24351{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24352echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024353if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024354 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024355else
24356 cat >conftest.$ac_ext <<_ACEOF
24357/* confdefs.h. */
24358_ACEOF
24359cat confdefs.h >>conftest.$ac_ext
24360cat >>conftest.$ac_ext <<_ACEOF
24361/* end confdefs.h. */
24362/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24363 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24364#define $ac_func innocuous_$ac_func
24365
24366/* System header to define __stub macros and hopefully few prototypes,
24367 which can conflict with char $ac_func (); below.
24368 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24369 <limits.h> exists even on freestanding compilers. */
24370
24371#ifdef __STDC__
24372# include <limits.h>
24373#else
24374# include <assert.h>
24375#endif
24376
24377#undef $ac_func
24378
24379/* Override any GCC internal prototype to avoid an error.
24380 Use char because int might match the return type of a GCC
24381 builtin and then its argument prototype would still apply. */
24382#ifdef __cplusplus
24383extern "C"
24384#endif
24385char $ac_func ();
24386/* The GNU C library defines this for functions which it implements
24387 to always fail with ENOSYS. Some functions are actually named
24388 something starting with __ and the normal name is an alias. */
24389#if defined __stub_$ac_func || defined __stub___$ac_func
24390choke me
24391#endif
24392
24393int
24394main ()
24395{
24396return $ac_func ();
24397 ;
24398 return 0;
24399}
24400_ACEOF
24401rm -f conftest.$ac_objext conftest$ac_exeext
24402if { (ac_try="$ac_link"
24403case "(($ac_try" in
24404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24405 *) ac_try_echo=$ac_try;;
24406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024408 (eval "$ac_link") 2>conftest.er1
24409 ac_status=$?
24410 grep -v '^ *+' conftest.er1 >conftest.err
24411 rm -f conftest.er1
24412 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024414 (exit $ac_status); } && {
24415 test -z "$ac_c_werror_flag" ||
24416 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024417 } && test -s conftest$ac_exeext &&
24418 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024419 eval "$as_ac_var=yes"
24420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024421 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024422sed 's/^/| /' conftest.$ac_ext >&5
24423
24424 eval "$as_ac_var=no"
24425fi
24426
24427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24428 conftest$ac_exeext conftest.$ac_ext
24429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024430ac_res=`eval echo '${'$as_ac_var'}'`
24431 { echo "$as_me:$LINENO: result: $ac_res" >&5
24432echo "${ECHO_T}$ac_res" >&6; }
24433if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024434 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024435#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024436_ACEOF
24437
24438fi
24439done
24440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024441{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24442echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024443if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024444 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024445else
24446 cat >conftest.$ac_ext <<_ACEOF
24447/* confdefs.h. */
24448_ACEOF
24449cat confdefs.h >>conftest.$ac_ext
24450cat >>conftest.$ac_ext <<_ACEOF
24451/* end confdefs.h. */
24452#include <math.h>
24453
24454int
24455main ()
24456{
24457#ifndef isinf
24458 (void) isinf;
24459#endif
24460
24461 ;
24462 return 0;
24463}
24464_ACEOF
24465rm -f conftest.$ac_objext
24466if { (ac_try="$ac_compile"
24467case "(($ac_try" in
24468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24469 *) ac_try_echo=$ac_try;;
24470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024472 (eval "$ac_compile") 2>conftest.er1
24473 ac_status=$?
24474 grep -v '^ *+' conftest.er1 >conftest.err
24475 rm -f conftest.er1
24476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024478 (exit $ac_status); } && {
24479 test -z "$ac_c_werror_flag" ||
24480 test ! -s conftest.err
24481 } && test -s conftest.$ac_objext; then
24482 ac_cv_have_decl_isinf=yes
24483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024484 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024485sed 's/^/| /' conftest.$ac_ext >&5
24486
24487 ac_cv_have_decl_isinf=no
24488fi
24489
24490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24491fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024492{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24493echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24494if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024495
24496cat >>confdefs.h <<_ACEOF
24497#define HAVE_DECL_ISINF 1
24498_ACEOF
24499
24500
24501else
24502 cat >>confdefs.h <<_ACEOF
24503#define HAVE_DECL_ISINF 0
24504_ACEOF
24505
24506
24507fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024508{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24509echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024510if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024511 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024512else
24513 cat >conftest.$ac_ext <<_ACEOF
24514/* confdefs.h. */
24515_ACEOF
24516cat confdefs.h >>conftest.$ac_ext
24517cat >>conftest.$ac_ext <<_ACEOF
24518/* end confdefs.h. */
24519#include <math.h>
24520
24521int
24522main ()
24523{
24524#ifndef isnan
24525 (void) isnan;
24526#endif
24527
24528 ;
24529 return 0;
24530}
24531_ACEOF
24532rm -f conftest.$ac_objext
24533if { (ac_try="$ac_compile"
24534case "(($ac_try" in
24535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24536 *) ac_try_echo=$ac_try;;
24537esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024539 (eval "$ac_compile") 2>conftest.er1
24540 ac_status=$?
24541 grep -v '^ *+' conftest.er1 >conftest.err
24542 rm -f conftest.er1
24543 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024545 (exit $ac_status); } && {
24546 test -z "$ac_c_werror_flag" ||
24547 test ! -s conftest.err
24548 } && test -s conftest.$ac_objext; then
24549 ac_cv_have_decl_isnan=yes
24550else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024551 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024552sed 's/^/| /' conftest.$ac_ext >&5
24553
24554 ac_cv_have_decl_isnan=no
24555fi
24556
24557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24558fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024559{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24560echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24561if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024562
24563cat >>confdefs.h <<_ACEOF
24564#define HAVE_DECL_ISNAN 1
24565_ACEOF
24566
24567
24568else
24569 cat >>confdefs.h <<_ACEOF
24570#define HAVE_DECL_ISNAN 0
24571_ACEOF
24572
24573
24574fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024575{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24576echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024577if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024578 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024579else
24580 cat >conftest.$ac_ext <<_ACEOF
24581/* confdefs.h. */
24582_ACEOF
24583cat confdefs.h >>conftest.$ac_ext
24584cat >>conftest.$ac_ext <<_ACEOF
24585/* end confdefs.h. */
24586#include <math.h>
24587
24588int
24589main ()
24590{
24591#ifndef isfinite
24592 (void) isfinite;
24593#endif
24594
24595 ;
24596 return 0;
24597}
24598_ACEOF
24599rm -f conftest.$ac_objext
24600if { (ac_try="$ac_compile"
24601case "(($ac_try" in
24602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24603 *) ac_try_echo=$ac_try;;
24604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024606 (eval "$ac_compile") 2>conftest.er1
24607 ac_status=$?
24608 grep -v '^ *+' conftest.er1 >conftest.err
24609 rm -f conftest.er1
24610 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024612 (exit $ac_status); } && {
24613 test -z "$ac_c_werror_flag" ||
24614 test ! -s conftest.err
24615 } && test -s conftest.$ac_objext; then
24616 ac_cv_have_decl_isfinite=yes
24617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024618 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024619sed 's/^/| /' conftest.$ac_ext >&5
24620
24621 ac_cv_have_decl_isfinite=no
24622fi
24623
24624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24625fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024626{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24627echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24628if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024629
24630cat >>confdefs.h <<_ACEOF
24631#define HAVE_DECL_ISFINITE 1
24632_ACEOF
24633
24634
24635else
24636 cat >>confdefs.h <<_ACEOF
24637#define HAVE_DECL_ISFINITE 0
24638_ACEOF
24639
24640
24641fi
24642
24643
Christian Heimes0a8143f2007-12-18 23:22:54 +000024644
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024645LIBS=$LIBS_SAVE
24646
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024647# For multiprocessing module, check that sem_open
24648# actually works. For FreeBSD versions <= 7.2,
24649# the kernel module that provides POSIX semaphores
24650# isn't loaded by default, so an attempt to call
24651# sem_open results in a 'Signal 12' error.
24652{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24653echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24654if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24655 echo $ECHO_N "(cached) $ECHO_C" >&6
24656else
24657 if test "$cross_compiling" = yes; then
24658 ac_cv_posix_semaphores_enabled=yes
24659else
24660 cat >conftest.$ac_ext <<_ACEOF
24661/* confdefs.h. */
24662_ACEOF
24663cat confdefs.h >>conftest.$ac_ext
24664cat >>conftest.$ac_ext <<_ACEOF
24665/* end confdefs.h. */
24666
24667#include <unistd.h>
24668#include <fcntl.h>
24669#include <stdio.h>
24670#include <semaphore.h>
24671#include <sys/stat.h>
24672
24673int main(void) {
24674 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24675 if (a == SEM_FAILED) {
24676 perror("sem_open");
24677 return 1;
24678 }
24679 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024680 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024681 return 0;
24682}
24683
24684_ACEOF
24685rm -f conftest$ac_exeext
24686if { (ac_try="$ac_link"
24687case "(($ac_try" in
24688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24689 *) ac_try_echo=$ac_try;;
24690esac
24691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24692 (eval "$ac_link") 2>&5
24693 ac_status=$?
24694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24696 { (case "(($ac_try" in
24697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24698 *) ac_try_echo=$ac_try;;
24699esac
24700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24701 (eval "$ac_try") 2>&5
24702 ac_status=$?
24703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24704 (exit $ac_status); }; }; then
24705 ac_cv_posix_semaphores_enabled=yes
24706else
24707 echo "$as_me: program exited with status $ac_status" >&5
24708echo "$as_me: failed program was:" >&5
24709sed 's/^/| /' conftest.$ac_ext >&5
24710
24711( exit $ac_status )
24712ac_cv_posix_semaphores_enabled=no
24713fi
24714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24715fi
24716
24717
24718
24719fi
24720
24721{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24722echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24723if test $ac_cv_posix_semaphores_enabled = no
24724then
24725
24726cat >>confdefs.h <<\_ACEOF
24727#define POSIX_SEMAPHORES_NOT_ENABLED 1
24728_ACEOF
24729
24730fi
24731
24732# Multiprocessing check for broken sem_getvalue
24733{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24734echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24735if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24736 echo $ECHO_N "(cached) $ECHO_C" >&6
24737else
24738 if test "$cross_compiling" = yes; then
24739 ac_cv_broken_sem_getvalue=yes
24740else
24741 cat >conftest.$ac_ext <<_ACEOF
24742/* confdefs.h. */
24743_ACEOF
24744cat confdefs.h >>conftest.$ac_ext
24745cat >>conftest.$ac_ext <<_ACEOF
24746/* end confdefs.h. */
24747
24748#include <unistd.h>
24749#include <fcntl.h>
24750#include <stdio.h>
24751#include <semaphore.h>
24752#include <sys/stat.h>
24753
24754int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024755 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024756 int count;
24757 int res;
24758 if(a==SEM_FAILED){
24759 perror("sem_open");
24760 return 1;
24761
24762 }
24763 res = sem_getvalue(a, &count);
24764 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024765 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024766 return res==-1 ? 1 : 0;
24767}
24768
24769_ACEOF
24770rm -f conftest$ac_exeext
24771if { (ac_try="$ac_link"
24772case "(($ac_try" in
24773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24774 *) ac_try_echo=$ac_try;;
24775esac
24776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24777 (eval "$ac_link") 2>&5
24778 ac_status=$?
24779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24780 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24781 { (case "(($ac_try" in
24782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24783 *) ac_try_echo=$ac_try;;
24784esac
24785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24786 (eval "$ac_try") 2>&5
24787 ac_status=$?
24788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24789 (exit $ac_status); }; }; then
24790 ac_cv_broken_sem_getvalue=no
24791else
24792 echo "$as_me: program exited with status $ac_status" >&5
24793echo "$as_me: failed program was:" >&5
24794sed 's/^/| /' conftest.$ac_ext >&5
24795
24796( exit $ac_status )
24797ac_cv_broken_sem_getvalue=yes
24798fi
24799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24800fi
24801
24802
24803
24804fi
24805
24806{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24807echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24808if test $ac_cv_broken_sem_getvalue = yes
24809then
24810
24811cat >>confdefs.h <<\_ACEOF
24812#define HAVE_BROKEN_SEM_GETVALUE 1
24813_ACEOF
24814
24815fi
24816
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024817# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024818{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24819echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024820# Check whether --enable-big-digits was given.
24821if test "${enable_big_digits+set}" = set; then
24822 enableval=$enable_big_digits; case $enable_big_digits in
24823yes)
24824 enable_big_digits=30 ;;
24825no)
24826 enable_big_digits=15 ;;
2482715|30)
24828 ;;
24829*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024830 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24831echo "$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 +000024832 { (exit 1); exit 1; }; } ;;
24833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024834{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24835echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024836
24837cat >>confdefs.h <<_ACEOF
24838#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24839_ACEOF
24840
24841
24842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024843 { echo "$as_me:$LINENO: result: no value specified" >&5
24844echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024845fi
24846
24847
Guido van Rossumef2255b2000-03-10 22:30:29 +000024848# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024849if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024850 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24851echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024852if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024854fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024855{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24856echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024857else
Martin v. Löwis11437992002-04-12 09:54:03 +000024858 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024859{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24860echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024862/* confdefs.h. */
24863_ACEOF
24864cat confdefs.h >>conftest.$ac_ext
24865cat >>conftest.$ac_ext <<_ACEOF
24866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024867$ac_includes_default
24868#include <wchar.h>
24869_ACEOF
24870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024871if { (ac_try="$ac_compile"
24872case "(($ac_try" in
24873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24874 *) ac_try_echo=$ac_try;;
24875esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024879 grep -v '^ *+' conftest.er1 >conftest.err
24880 rm -f conftest.er1
24881 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 (exit $ac_status); } && {
24884 test -z "$ac_c_werror_flag" ||
24885 test ! -s conftest.err
24886 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024887 ac_header_compiler=yes
24888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024890sed 's/^/| /' conftest.$ac_ext >&5
24891
Martin v. Löwiseba40652007-08-30 20:10:57 +000024892 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024894
24895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024896{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24897echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024898
24899# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024900{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24901echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024903/* confdefs.h. */
24904_ACEOF
24905cat confdefs.h >>conftest.$ac_ext
24906cat >>conftest.$ac_ext <<_ACEOF
24907/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024908#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024909_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910if { (ac_try="$ac_cpp conftest.$ac_ext"
24911case "(($ac_try" in
24912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24913 *) ac_try_echo=$ac_try;;
24914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024916 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024917 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024918 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024919 rm -f conftest.er1
24920 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024922 (exit $ac_status); } >/dev/null && {
24923 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24924 test ! -s conftest.err
24925 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024926 ac_header_preproc=yes
24927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024929sed 's/^/| /' conftest.$ac_ext >&5
24930
Martin v. Löwis11437992002-04-12 09:54:03 +000024931 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024933
Martin v. Löwis11437992002-04-12 09:54:03 +000024934rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024935{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24936echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024937
24938# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024939case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24940 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24942echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24943 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24944echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024945 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024946 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024947 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024948 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24949echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24950 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24951echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24952 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24953echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24954 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24955echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24956 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24957echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24958 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24959echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024960 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024961## -------------------------------------- ##
24962## Report this to http://bugs.python.org/ ##
24963## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024964_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024966 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024968{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24969echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024970if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024972else
24973 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024974fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024975{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24976echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024977
24978fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024979if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024980
24981
24982cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024983#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024984_ACEOF
24985
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024986 wchar_h="yes"
24987
Guido van Rossumef2255b2000-03-10 22:30:29 +000024988else
Martin v. Löwis11437992002-04-12 09:54:03 +000024989 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024990
24991fi
24992
Michael W. Hudson54241132001-12-07 15:38:26 +000024993
Martin v. Löwis11437992002-04-12 09:54:03 +000024994
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024995# determine wchar_t size
24996if test "$wchar_h" = yes
24997then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024998 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24999echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25000if test "${ac_cv_type_wchar_t+set}" = set; then
25001 echo $ECHO_N "(cached) $ECHO_C" >&6
25002else
25003 cat >conftest.$ac_ext <<_ACEOF
25004/* confdefs.h. */
25005_ACEOF
25006cat confdefs.h >>conftest.$ac_ext
25007cat >>conftest.$ac_ext <<_ACEOF
25008/* end confdefs.h. */
25009#include <wchar.h>
25010
25011typedef wchar_t ac__type_new_;
25012int
25013main ()
25014{
25015if ((ac__type_new_ *) 0)
25016 return 0;
25017if (sizeof (ac__type_new_))
25018 return 0;
25019 ;
25020 return 0;
25021}
25022_ACEOF
25023rm -f conftest.$ac_objext
25024if { (ac_try="$ac_compile"
25025case "(($ac_try" in
25026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25027 *) ac_try_echo=$ac_try;;
25028esac
25029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25030 (eval "$ac_compile") 2>conftest.er1
25031 ac_status=$?
25032 grep -v '^ *+' conftest.er1 >conftest.err
25033 rm -f conftest.er1
25034 cat conftest.err >&5
25035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25036 (exit $ac_status); } && {
25037 test -z "$ac_c_werror_flag" ||
25038 test ! -s conftest.err
25039 } && test -s conftest.$ac_objext; then
25040 ac_cv_type_wchar_t=yes
25041else
25042 echo "$as_me: failed program was:" >&5
25043sed 's/^/| /' conftest.$ac_ext >&5
25044
25045 ac_cv_type_wchar_t=no
25046fi
25047
25048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25049fi
25050{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25051echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25052
25053# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25056# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025057{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25058echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025059if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025061else
Martin v. Löwis11437992002-04-12 09:54:03 +000025062 if test "$cross_compiling" = yes; then
25063 # Depending upon the size, compute the lo and hi bounds.
25064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025065/* confdefs.h. */
25066_ACEOF
25067cat confdefs.h >>conftest.$ac_ext
25068cat >>conftest.$ac_ext <<_ACEOF
25069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025070#include <wchar.h>
25071
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025072 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025073int
25074main ()
25075{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025076static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025077test_array [0] = 0
25078
25079 ;
25080 return 0;
25081}
25082_ACEOF
25083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025084if { (ac_try="$ac_compile"
25085case "(($ac_try" in
25086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25087 *) ac_try_echo=$ac_try;;
25088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025092 grep -v '^ *+' conftest.er1 >conftest.err
25093 rm -f conftest.er1
25094 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096 (exit $ac_status); } && {
25097 test -z "$ac_c_werror_flag" ||
25098 test ! -s conftest.err
25099 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025100 ac_lo=0 ac_mid=0
25101 while :; do
25102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025103/* confdefs.h. */
25104_ACEOF
25105cat confdefs.h >>conftest.$ac_ext
25106cat >>conftest.$ac_ext <<_ACEOF
25107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025108#include <wchar.h>
25109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025110 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025111int
25112main ()
25113{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025114static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025115test_array [0] = 0
25116
25117 ;
25118 return 0;
25119}
25120_ACEOF
25121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122if { (ac_try="$ac_compile"
25123case "(($ac_try" in
25124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25125 *) ac_try_echo=$ac_try;;
25126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025130 grep -v '^ *+' conftest.er1 >conftest.err
25131 rm -f conftest.er1
25132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025134 (exit $ac_status); } && {
25135 test -z "$ac_c_werror_flag" ||
25136 test ! -s conftest.err
25137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025138 ac_hi=$ac_mid; break
25139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025141sed 's/^/| /' conftest.$ac_ext >&5
25142
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143 ac_lo=`expr $ac_mid + 1`
25144 if test $ac_lo -le $ac_mid; then
25145 ac_lo= ac_hi=
25146 break
25147 fi
25148 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025150
25151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025152 done
25153else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025155sed 's/^/| /' conftest.$ac_ext >&5
25156
Martin v. Löwiseba40652007-08-30 20:10:57 +000025157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025158/* confdefs.h. */
25159_ACEOF
25160cat confdefs.h >>conftest.$ac_ext
25161cat >>conftest.$ac_ext <<_ACEOF
25162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025163#include <wchar.h>
25164
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025165 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025166int
25167main ()
25168{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025169static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025170test_array [0] = 0
25171
25172 ;
25173 return 0;
25174}
25175_ACEOF
25176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025177if { (ac_try="$ac_compile"
25178case "(($ac_try" in
25179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25180 *) ac_try_echo=$ac_try;;
25181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025185 grep -v '^ *+' conftest.er1 >conftest.err
25186 rm -f conftest.er1
25187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025189 (exit $ac_status); } && {
25190 test -z "$ac_c_werror_flag" ||
25191 test ! -s conftest.err
25192 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025193 ac_hi=-1 ac_mid=-1
25194 while :; do
25195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025196/* confdefs.h. */
25197_ACEOF
25198cat confdefs.h >>conftest.$ac_ext
25199cat >>conftest.$ac_ext <<_ACEOF
25200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025201#include <wchar.h>
25202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025203 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025204int
25205main ()
25206{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025208test_array [0] = 0
25209
25210 ;
25211 return 0;
25212}
25213_ACEOF
25214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215if { (ac_try="$ac_compile"
25216case "(($ac_try" in
25217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25218 *) ac_try_echo=$ac_try;;
25219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025223 grep -v '^ *+' conftest.er1 >conftest.err
25224 rm -f conftest.er1
25225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025227 (exit $ac_status); } && {
25228 test -z "$ac_c_werror_flag" ||
25229 test ! -s conftest.err
25230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025231 ac_lo=$ac_mid; break
25232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025234sed 's/^/| /' conftest.$ac_ext >&5
25235
Martin v. Löwiseba40652007-08-30 20:10:57 +000025236 ac_hi=`expr '(' $ac_mid ')' - 1`
25237 if test $ac_mid -le $ac_hi; then
25238 ac_lo= ac_hi=
25239 break
25240 fi
25241 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025243
25244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025245 done
25246else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025248sed 's/^/| /' conftest.$ac_ext >&5
25249
Martin v. Löwiseba40652007-08-30 20:10:57 +000025250 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025252
25253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255
25256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025257# Binary search between lo and hi bounds.
25258while test "x$ac_lo" != "x$ac_hi"; do
25259 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025261/* confdefs.h. */
25262_ACEOF
25263cat confdefs.h >>conftest.$ac_ext
25264cat >>conftest.$ac_ext <<_ACEOF
25265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025266#include <wchar.h>
25267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025269int
25270main ()
25271{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025273test_array [0] = 0
25274
25275 ;
25276 return 0;
25277}
25278_ACEOF
25279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025280if { (ac_try="$ac_compile"
25281case "(($ac_try" in
25282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25283 *) ac_try_echo=$ac_try;;
25284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025288 grep -v '^ *+' conftest.er1 >conftest.err
25289 rm -f conftest.er1
25290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025292 (exit $ac_status); } && {
25293 test -z "$ac_c_werror_flag" ||
25294 test ! -s conftest.err
25295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025296 ac_hi=$ac_mid
25297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025299sed 's/^/| /' conftest.$ac_ext >&5
25300
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025303
25304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025305done
25306case $ac_lo in
25307?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025308'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025310See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025311echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025312See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025313 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025314 else
25315 ac_cv_sizeof_wchar_t=0
25316 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025317esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025318else
Martin v. Löwis11437992002-04-12 09:54:03 +000025319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025320/* confdefs.h. */
25321_ACEOF
25322cat confdefs.h >>conftest.$ac_ext
25323cat >>conftest.$ac_ext <<_ACEOF
25324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025325#include <wchar.h>
25326
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025327 typedef wchar_t ac__type_sizeof_;
25328static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25329static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025330#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025331#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025332int
25333main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025334{
Martin v. Löwis11437992002-04-12 09:54:03 +000025335
25336 FILE *f = fopen ("conftest.val", "w");
25337 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025338 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025339 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025340 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025341 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025342 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025343 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025344 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025345 }
25346 else
25347 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025348 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025349 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025350 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025351 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025352 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025354
25355 ;
25356 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025357}
Martin v. Löwis11437992002-04-12 09:54:03 +000025358_ACEOF
25359rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360if { (ac_try="$ac_link"
25361case "(($ac_try" in
25362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25363 *) ac_try_echo=$ac_try;;
25364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025366 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025367 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025369 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025370 { (case "(($ac_try" in
25371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25372 *) ac_try_echo=$ac_try;;
25373esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025375 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025378 (exit $ac_status); }; }; then
25379 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025381 echo "$as_me: program exited with status $ac_status" >&5
25382echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025383sed 's/^/| /' conftest.$ac_ext >&5
25384
Martin v. Löwis11437992002-04-12 09:54:03 +000025385( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025386if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025387 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025388See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025389echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025390See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025391 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025392 else
25393 ac_cv_sizeof_wchar_t=0
25394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025396rm -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 +000025397fi
25398rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025399fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025400{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25401echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025402
25403
25404
Martin v. Löwis11437992002-04-12 09:54:03 +000025405cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025406#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025407_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025408
Michael W. Hudson54241132001-12-07 15:38:26 +000025409
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025410fi
25411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025412{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25413echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025414have_ucs4_tcl=no
25415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025416/* confdefs.h. */
25417_ACEOF
25418cat confdefs.h >>conftest.$ac_ext
25419cat >>conftest.$ac_ext <<_ACEOF
25420/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025421
25422#include <tcl.h>
25423#if TCL_UTF_MAX != 6
25424# error "NOT UCS4_TCL"
25425#endif
25426int
25427main ()
25428{
25429
25430 ;
25431 return 0;
25432}
25433_ACEOF
25434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025435if { (ac_try="$ac_compile"
25436case "(($ac_try" in
25437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25438 *) ac_try_echo=$ac_try;;
25439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025443 grep -v '^ *+' conftest.er1 >conftest.err
25444 rm -f conftest.er1
25445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025447 (exit $ac_status); } && {
25448 test -z "$ac_c_werror_flag" ||
25449 test ! -s conftest.err
25450 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025451
25452
25453cat >>confdefs.h <<\_ACEOF
25454#define HAVE_UCS4_TCL 1
25455_ACEOF
25456
25457 have_ucs4_tcl=yes
25458
25459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025461sed 's/^/| /' conftest.$ac_ext >&5
25462
Martin v. Löwiseba40652007-08-30 20:10:57 +000025463
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025465
25466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025467{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25468echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025469
Skip Montanaro6dead952003-09-25 14:50:04 +000025470# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025471if test "$wchar_h" = yes
25472then
25473 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025474 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25475echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025476 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025477 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025478else
25479
25480 if test "$cross_compiling" = yes; then
25481 ac_cv_wchar_t_signed=yes
25482else
25483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025484/* confdefs.h. */
25485_ACEOF
25486cat confdefs.h >>conftest.$ac_ext
25487cat >>conftest.$ac_ext <<_ACEOF
25488/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025489
25490 #include <wchar.h>
25491 int main()
25492 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025493 /* Success: exit code 0 */
25494 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025495 }
25496
25497_ACEOF
25498rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025499if { (ac_try="$ac_link"
25500case "(($ac_try" in
25501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25502 *) ac_try_echo=$ac_try;;
25503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025505 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025506 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509 { (case "(($ac_try" in
25510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25511 *) ac_try_echo=$ac_try;;
25512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025514 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025515 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025517 (exit $ac_status); }; }; then
25518 ac_cv_wchar_t_signed=yes
25519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025520 echo "$as_me: program exited with status $ac_status" >&5
25521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025522sed 's/^/| /' conftest.$ac_ext >&5
25523
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025524( exit $ac_status )
25525ac_cv_wchar_t_signed=no
25526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025527rm -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 +000025528fi
25529
Martin v. Löwiseba40652007-08-30 20:10:57 +000025530
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025531fi
25532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025533 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25534echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025535fi
25536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025537{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25538echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025539# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025540if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025541 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025542else
25543 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025544fi
25545
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025546
25547if test $enable_unicode = yes
25548then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025549 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025550 case "$have_ucs4_tcl" in
25551 yes) enable_unicode="ucs4"
25552 ;;
25553 *) enable_unicode="ucs2"
25554 ;;
25555 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025556fi
25557
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025558
25559
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025560case "$enable_unicode" in
25561ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025562 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025563#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025564_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025565
25566 ;;
25567ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025568 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025569#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025570_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025571
25572 ;;
25573esac
25574
Michael W. Hudson54241132001-12-07 15:38:26 +000025575
Martin v. Löwis11437992002-04-12 09:54:03 +000025576
25577
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025578
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025579if test "$enable_unicode" = "no"
25580then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025581 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025582 { echo "$as_me:$LINENO: result: not used" >&5
25583echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025584else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025585 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025586
25587cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025588#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025589_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025590
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025591
25592 # wchar_t is only usable if it maps to an unsigned type
25593 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025594 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025595 then
25596 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025597
Martin v. Löwis11437992002-04-12 09:54:03 +000025598cat >>confdefs.h <<\_ACEOF
25599#define HAVE_USABLE_WCHAR_T 1
25600_ACEOF
25601
25602 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025603#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025604_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025605
25606 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25607 then
25608 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025609 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025610#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025611_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025612
25613 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25614 then
25615 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025616 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025617#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025618_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025619
25620 else
25621 PY_UNICODE_TYPE="no type found"
25622 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025623 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25624echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025625fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025626
25627# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025628{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25629echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025630if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025633 # See if sys/param.h defines the BYTE_ORDER macro.
25634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025635/* confdefs.h. */
25636_ACEOF
25637cat confdefs.h >>conftest.$ac_ext
25638cat >>conftest.$ac_ext <<_ACEOF
25639/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025640#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025641#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025642
Martin v. Löwis11437992002-04-12 09:54:03 +000025643int
25644main ()
25645{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025646#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25647 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25648 bogus endian macros
25649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025650
25651 ;
25652 return 0;
25653}
25654_ACEOF
25655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025656if { (ac_try="$ac_compile"
25657case "(($ac_try" in
25658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25659 *) ac_try_echo=$ac_try;;
25660esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025662 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025664 grep -v '^ *+' conftest.er1 >conftest.err
25665 rm -f conftest.er1
25666 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025668 (exit $ac_status); } && {
25669 test -z "$ac_c_werror_flag" ||
25670 test ! -s conftest.err
25671 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025672 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025674/* confdefs.h. */
25675_ACEOF
25676cat confdefs.h >>conftest.$ac_ext
25677cat >>conftest.$ac_ext <<_ACEOF
25678/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025679#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025680#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025681
Martin v. Löwis11437992002-04-12 09:54:03 +000025682int
25683main ()
25684{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025685#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025686 not big endian
25687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025688
25689 ;
25690 return 0;
25691}
25692_ACEOF
25693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025694if { (ac_try="$ac_compile"
25695case "(($ac_try" in
25696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25697 *) ac_try_echo=$ac_try;;
25698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025702 grep -v '^ *+' conftest.er1 >conftest.err
25703 rm -f conftest.er1
25704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025706 (exit $ac_status); } && {
25707 test -z "$ac_c_werror_flag" ||
25708 test ! -s conftest.err
25709 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025710 ac_cv_c_bigendian=yes
25711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025713sed 's/^/| /' conftest.$ac_ext >&5
25714
Martin v. Löwiseba40652007-08-30 20:10:57 +000025715 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025717
25718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025719else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025721sed 's/^/| /' conftest.$ac_ext >&5
25722
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025723 # It does not; compile a test program.
25724if test "$cross_compiling" = yes; then
25725 # try to guess the endianness by grepping values into an object file
25726 ac_cv_c_bigendian=unknown
25727 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025728/* confdefs.h. */
25729_ACEOF
25730cat confdefs.h >>conftest.$ac_ext
25731cat >>conftest.$ac_ext <<_ACEOF
25732/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025733short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25734short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25735void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25736short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25737short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25738void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025739int
25740main ()
25741{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025742 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025743 ;
25744 return 0;
25745}
25746_ACEOF
25747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748if { (ac_try="$ac_compile"
25749case "(($ac_try" in
25750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25751 *) ac_try_echo=$ac_try;;
25752esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025756 grep -v '^ *+' conftest.er1 >conftest.err
25757 rm -f conftest.er1
25758 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760 (exit $ac_status); } && {
25761 test -z "$ac_c_werror_flag" ||
25762 test ! -s conftest.err
25763 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025764 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025765 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025766fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025767if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25768 if test "$ac_cv_c_bigendian" = unknown; then
25769 ac_cv_c_bigendian=no
25770 else
25771 # finding both strings is unlikely to happen, but who knows?
25772 ac_cv_c_bigendian=unknown
25773 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025774fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025775else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025777sed 's/^/| /' conftest.$ac_ext >&5
25778
Martin v. Löwiseba40652007-08-30 20:10:57 +000025779
Martin v. Löwis11437992002-04-12 09:54:03 +000025780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025781
25782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025783else
25784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025785/* confdefs.h. */
25786_ACEOF
25787cat confdefs.h >>conftest.$ac_ext
25788cat >>conftest.$ac_ext <<_ACEOF
25789/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025791int
25792main ()
25793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025794
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025795 /* Are we little or big endian? From Harbison&Steele. */
25796 union
25797 {
25798 long int l;
25799 char c[sizeof (long int)];
25800 } u;
25801 u.l = 1;
25802 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803
25804 ;
25805 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025806}
Martin v. Löwis11437992002-04-12 09:54:03 +000025807_ACEOF
25808rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025809if { (ac_try="$ac_link"
25810case "(($ac_try" in
25811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25812 *) ac_try_echo=$ac_try;;
25813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025816 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819 { (case "(($ac_try" in
25820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25821 *) ac_try_echo=$ac_try;;
25822esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025825 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025827 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025828 ac_cv_c_bigendian=no
25829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025830 echo "$as_me: program exited with status $ac_status" >&5
25831echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025832sed 's/^/| /' conftest.$ac_ext >&5
25833
Martin v. Löwis11437992002-04-12 09:54:03 +000025834( exit $ac_status )
25835ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837rm -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 +000025838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025839
25840
Martin v. Löwis11437992002-04-12 09:54:03 +000025841fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025842
25843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25844fi
25845{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25846echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25847case $ac_cv_c_bigendian in
25848 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025849
25850cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025851#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025852_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025853 ;;
25854 no)
25855 ;;
25856 *)
25857 { { echo "$as_me:$LINENO: error: unknown endianness
25858presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25859echo "$as_me: error: unknown endianness
25860presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025861 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025862esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025863
Michael W. Hudson54241132001-12-07 15:38:26 +000025864
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025865# Check whether right shifting a negative integer extends the sign bit
25866# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025867{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25868echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025869if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025870 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025871else
Martin v. Löwis11437992002-04-12 09:54:03 +000025872
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025873if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025874 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025875else
Martin v. Löwis11437992002-04-12 09:54:03 +000025876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025877/* confdefs.h. */
25878_ACEOF
25879cat confdefs.h >>conftest.$ac_ext
25880cat >>conftest.$ac_ext <<_ACEOF
25881/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025882
25883int main()
25884{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025885 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025886}
25887
Martin v. Löwis11437992002-04-12 09:54:03 +000025888_ACEOF
25889rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025890if { (ac_try="$ac_link"
25891case "(($ac_try" in
25892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25893 *) ac_try_echo=$ac_try;;
25894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025896 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025897 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025899 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025900 { (case "(($ac_try" in
25901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25902 *) ac_try_echo=$ac_try;;
25903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025905 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025906 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025909 ac_cv_rshift_extends_sign=yes
25910else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025911 echo "$as_me: program exited with status $ac_status" >&5
25912echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025913sed 's/^/| /' conftest.$ac_ext >&5
25914
Martin v. Löwis11437992002-04-12 09:54:03 +000025915( exit $ac_status )
25916ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025918rm -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 +000025919fi
25920
Martin v. Löwiseba40652007-08-30 20:10:57 +000025921
25922fi
25923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025924{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25925echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025926if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025927then
Martin v. Löwis11437992002-04-12 09:54:03 +000025928
25929cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025930#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025931_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025932
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025933fi
25934
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025935# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025936{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25937echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025938if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025940else
Martin v. Löwis11437992002-04-12 09:54:03 +000025941
25942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025943/* confdefs.h. */
25944_ACEOF
25945cat confdefs.h >>conftest.$ac_ext
25946cat >>conftest.$ac_ext <<_ACEOF
25947/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025948#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025949int
25950main ()
25951{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025952
25953 FILE *f = fopen("/dev/null", "r");
25954 flockfile(f);
25955 getc_unlocked(f);
25956 funlockfile(f);
25957
Martin v. Löwis11437992002-04-12 09:54:03 +000025958 ;
25959 return 0;
25960}
25961_ACEOF
25962rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025963if { (ac_try="$ac_link"
25964case "(($ac_try" in
25965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25966 *) ac_try_echo=$ac_try;;
25967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025969 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025971 grep -v '^ *+' conftest.er1 >conftest.err
25972 rm -f conftest.er1
25973 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025975 (exit $ac_status); } && {
25976 test -z "$ac_c_werror_flag" ||
25977 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025978 } && test -s conftest$ac_exeext &&
25979 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025980 ac_cv_have_getc_unlocked=yes
25981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025983sed 's/^/| /' conftest.$ac_ext >&5
25984
Martin v. Löwiseba40652007-08-30 20:10:57 +000025985 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025987
25988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025989 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025990fi
25991
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025992{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25993echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025994if test "$ac_cv_have_getc_unlocked" = yes
25995then
Martin v. Löwis11437992002-04-12 09:54:03 +000025996
25997cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025998#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025999_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026000
26001fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026002
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026003# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026004# save the value of LIBS so we don't actually link Python with readline
26005LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026006
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026007# On some systems we need to link readline to a termcap compatible
26008# library. NOTE: Keep the precedence of listed libraries synchronised
26009# with setup.py.
26010py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026011{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26012echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026013for py_libtermcap in "" ncursesw ncurses curses termcap; do
26014 if test -z "$py_libtermcap"; then
26015 READLINE_LIBS="-lreadline"
26016 else
26017 READLINE_LIBS="-lreadline -l$py_libtermcap"
26018 fi
26019 LIBS="$READLINE_LIBS $LIBS_no_readline"
26020 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026021/* confdefs.h. */
26022_ACEOF
26023cat confdefs.h >>conftest.$ac_ext
26024cat >>conftest.$ac_ext <<_ACEOF
26025/* end confdefs.h. */
26026
Martin v. Löwiseba40652007-08-30 20:10:57 +000026027/* Override any GCC internal prototype to avoid an error.
26028 Use char because int might match the return type of a GCC
26029 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026030#ifdef __cplusplus
26031extern "C"
26032#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026033char readline ();
26034int
26035main ()
26036{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026037return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026038 ;
26039 return 0;
26040}
26041_ACEOF
26042rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043if { (ac_try="$ac_link"
26044case "(($ac_try" in
26045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26046 *) ac_try_echo=$ac_try;;
26047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026049 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026050 ac_status=$?
26051 grep -v '^ *+' conftest.er1 >conftest.err
26052 rm -f conftest.er1
26053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055 (exit $ac_status); } && {
26056 test -z "$ac_c_werror_flag" ||
26057 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026058 } && test -s conftest$ac_exeext &&
26059 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026060 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026062 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026063sed 's/^/| /' conftest.$ac_ext >&5
26064
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026065
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067
26068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026069 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026070 if test $py_cv_lib_readline = yes; then
26071 break
26072 fi
26073done
26074# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26075#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026076if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026077 { echo "$as_me:$LINENO: result: none" >&5
26078echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026080 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26081echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026082
26083cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026084#define HAVE_LIBREADLINE 1
26085_ACEOF
26086
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026087fi
26088
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026089# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026090{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26091echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026092if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026093 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026094else
26095 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026096LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026097cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026098/* confdefs.h. */
26099_ACEOF
26100cat confdefs.h >>conftest.$ac_ext
26101cat >>conftest.$ac_ext <<_ACEOF
26102/* end confdefs.h. */
26103
Martin v. Löwiseba40652007-08-30 20:10:57 +000026104/* Override any GCC internal prototype to avoid an error.
26105 Use char because int might match the return type of a GCC
26106 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026107#ifdef __cplusplus
26108extern "C"
26109#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026110char rl_callback_handler_install ();
26111int
26112main ()
26113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026114return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026115 ;
26116 return 0;
26117}
26118_ACEOF
26119rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026120if { (ac_try="$ac_link"
26121case "(($ac_try" in
26122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26123 *) ac_try_echo=$ac_try;;
26124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026126 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026128 grep -v '^ *+' conftest.er1 >conftest.err
26129 rm -f conftest.er1
26130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026132 (exit $ac_status); } && {
26133 test -z "$ac_c_werror_flag" ||
26134 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026135 } && test -s conftest$ac_exeext &&
26136 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026137 ac_cv_lib_readline_rl_callback_handler_install=yes
26138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026139 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026140sed 's/^/| /' conftest.$ac_ext >&5
26141
Martin v. Löwiseba40652007-08-30 20:10:57 +000026142 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026144
26145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026146 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026147LIBS=$ac_check_lib_save_LIBS
26148fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026149{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26150echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26151if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026152
26153cat >>confdefs.h <<\_ACEOF
26154#define HAVE_RL_CALLBACK 1
26155_ACEOF
26156
26157fi
26158
26159
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026160# check for readline 2.2
26161cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026162/* confdefs.h. */
26163_ACEOF
26164cat confdefs.h >>conftest.$ac_ext
26165cat >>conftest.$ac_ext <<_ACEOF
26166/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026167#include <readline/readline.h>
26168_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026169if { (ac_try="$ac_cpp conftest.$ac_ext"
26170case "(($ac_try" in
26171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26172 *) ac_try_echo=$ac_try;;
26173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026175 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026176 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026177 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026178 rm -f conftest.er1
26179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026181 (exit $ac_status); } >/dev/null && {
26182 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26183 test ! -s conftest.err
26184 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026185 have_readline=yes
26186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026188sed 's/^/| /' conftest.$ac_ext >&5
26189
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026190 have_readline=no
26191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026192
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026193rm -f conftest.err conftest.$ac_ext
26194if test $have_readline = yes
26195then
26196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026197/* confdefs.h. */
26198_ACEOF
26199cat confdefs.h >>conftest.$ac_ext
26200cat >>conftest.$ac_ext <<_ACEOF
26201/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026202#include <readline/readline.h>
26203
26204_ACEOF
26205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026206 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026207
26208cat >>confdefs.h <<\_ACEOF
26209#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26210_ACEOF
26211
26212fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000026213rm -f -r conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026214
26215 cat >conftest.$ac_ext <<_ACEOF
26216/* confdefs.h. */
26217_ACEOF
26218cat confdefs.h >>conftest.$ac_ext
26219cat >>conftest.$ac_ext <<_ACEOF
26220/* end confdefs.h. */
26221#include <readline/readline.h>
26222
26223_ACEOF
26224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26225 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26226
26227cat >>confdefs.h <<\_ACEOF
26228#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26229_ACEOF
26230
26231fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000026232rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026233
26234fi
26235
Martin v. Löwis0daad592001-09-30 21:09:59 +000026236# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026237{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26238echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026239if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026241else
Martin v. Löwis11437992002-04-12 09:54:03 +000026242 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026243LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026244cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026245/* confdefs.h. */
26246_ACEOF
26247cat confdefs.h >>conftest.$ac_ext
26248cat >>conftest.$ac_ext <<_ACEOF
26249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026250
Martin v. Löwiseba40652007-08-30 20:10:57 +000026251/* Override any GCC internal prototype to avoid an error.
26252 Use char because int might match the return type of a GCC
26253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026254#ifdef __cplusplus
26255extern "C"
26256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026257char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026258int
26259main ()
26260{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026261return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026262 ;
26263 return 0;
26264}
26265_ACEOF
26266rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026267if { (ac_try="$ac_link"
26268case "(($ac_try" in
26269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26270 *) ac_try_echo=$ac_try;;
26271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026273 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026275 grep -v '^ *+' conftest.er1 >conftest.err
26276 rm -f conftest.er1
26277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279 (exit $ac_status); } && {
26280 test -z "$ac_c_werror_flag" ||
26281 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026282 } && test -s conftest$ac_exeext &&
26283 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026284 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026287sed 's/^/| /' conftest.$ac_ext >&5
26288
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026291
26292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026293 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026294LIBS=$ac_check_lib_save_LIBS
26295fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026296{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26297echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26298if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026299
Martin v. Löwis11437992002-04-12 09:54:03 +000026300cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026301#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026302_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026303
Martin v. Löwis0daad592001-09-30 21:09:59 +000026304fi
26305
Michael W. Hudson54241132001-12-07 15:38:26 +000026306
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026307# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026308{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26309echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026310if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026311 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026312else
26313 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026314LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026315cat >conftest.$ac_ext <<_ACEOF
26316/* confdefs.h. */
26317_ACEOF
26318cat confdefs.h >>conftest.$ac_ext
26319cat >>conftest.$ac_ext <<_ACEOF
26320/* end confdefs.h. */
26321
26322/* Override any GCC internal prototype to avoid an error.
26323 Use char because int might match the return type of a GCC
26324 builtin and then its argument prototype would still apply. */
26325#ifdef __cplusplus
26326extern "C"
26327#endif
26328char rl_completion_display_matches_hook ();
26329int
26330main ()
26331{
26332return rl_completion_display_matches_hook ();
26333 ;
26334 return 0;
26335}
26336_ACEOF
26337rm -f conftest.$ac_objext conftest$ac_exeext
26338if { (ac_try="$ac_link"
26339case "(($ac_try" in
26340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26341 *) ac_try_echo=$ac_try;;
26342esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026344 (eval "$ac_link") 2>conftest.er1
26345 ac_status=$?
26346 grep -v '^ *+' conftest.er1 >conftest.err
26347 rm -f conftest.er1
26348 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026350 (exit $ac_status); } && {
26351 test -z "$ac_c_werror_flag" ||
26352 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026353 } && test -s conftest$ac_exeext &&
26354 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026355 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026357 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026358sed 's/^/| /' conftest.$ac_ext >&5
26359
26360 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26361fi
26362
26363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26364 conftest$ac_exeext conftest.$ac_ext
26365LIBS=$ac_check_lib_save_LIBS
26366fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026367{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26368echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26369if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026370
26371cat >>confdefs.h <<\_ACEOF
26372#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26373_ACEOF
26374
26375fi
26376
26377
Martin v. Löwis0daad592001-09-30 21:09:59 +000026378# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026379{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26380echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026381if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026383else
Martin v. Löwis11437992002-04-12 09:54:03 +000026384 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026385LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026386cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026387/* confdefs.h. */
26388_ACEOF
26389cat confdefs.h >>conftest.$ac_ext
26390cat >>conftest.$ac_ext <<_ACEOF
26391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026392
Martin v. Löwiseba40652007-08-30 20:10:57 +000026393/* Override any GCC internal prototype to avoid an error.
26394 Use char because int might match the return type of a GCC
26395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026396#ifdef __cplusplus
26397extern "C"
26398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026399char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026400int
26401main ()
26402{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026403return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026404 ;
26405 return 0;
26406}
26407_ACEOF
26408rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026409if { (ac_try="$ac_link"
26410case "(($ac_try" in
26411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26412 *) ac_try_echo=$ac_try;;
26413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026417 grep -v '^ *+' conftest.er1 >conftest.err
26418 rm -f conftest.er1
26419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026421 (exit $ac_status); } && {
26422 test -z "$ac_c_werror_flag" ||
26423 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026424 } && test -s conftest$ac_exeext &&
26425 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026426 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026427else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026429sed 's/^/| /' conftest.$ac_ext >&5
26430
Martin v. Löwiseba40652007-08-30 20:10:57 +000026431 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026433
26434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026436LIBS=$ac_check_lib_save_LIBS
26437fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026438{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26439echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26440if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026441
Martin v. Löwis11437992002-04-12 09:54:03 +000026442cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026443#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026444_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026445
Guido van Rossum353ae582001-07-10 16:45:32 +000026446fi
26447
Jack Jansendd19cf82001-12-06 22:36:17 +000026448
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026449# also in readline 4.2
26450cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026451/* confdefs.h. */
26452_ACEOF
26453cat confdefs.h >>conftest.$ac_ext
26454cat >>conftest.$ac_ext <<_ACEOF
26455/* end confdefs.h. */
26456#include <readline/readline.h>
26457_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026458if { (ac_try="$ac_cpp conftest.$ac_ext"
26459case "(($ac_try" in
26460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26461 *) ac_try_echo=$ac_try;;
26462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026464 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026465 ac_status=$?
26466 grep -v '^ *+' conftest.er1 >conftest.err
26467 rm -f conftest.er1
26468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026470 (exit $ac_status); } >/dev/null && {
26471 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26472 test ! -s conftest.err
26473 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026474 have_readline=yes
26475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026476 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026477sed 's/^/| /' conftest.$ac_ext >&5
26478
26479 have_readline=no
26480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026481
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026482rm -f conftest.err conftest.$ac_ext
26483if test $have_readline = yes
26484then
26485 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026486/* confdefs.h. */
26487_ACEOF
26488cat confdefs.h >>conftest.$ac_ext
26489cat >>conftest.$ac_ext <<_ACEOF
26490/* end confdefs.h. */
26491#include <readline/readline.h>
26492
26493_ACEOF
26494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26495 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26496
26497cat >>confdefs.h <<\_ACEOF
26498#define HAVE_RL_CATCH_SIGNAL 1
26499_ACEOF
26500
26501fi
Ronald Oussorena55af9a2010-01-17 16:25:57 +000026502rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026503
26504fi
26505
Martin v. Löwis82bca632006-02-10 20:49:30 +000026506# End of readline checks: restore LIBS
26507LIBS=$LIBS_no_readline
26508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026509{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26510echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026511if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026512 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026513else
Martin v. Löwis11437992002-04-12 09:54:03 +000026514
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026515if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026516 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026517else
Martin v. Löwis11437992002-04-12 09:54:03 +000026518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026519/* confdefs.h. */
26520_ACEOF
26521cat confdefs.h >>conftest.$ac_ext
26522cat >>conftest.$ac_ext <<_ACEOF
26523/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026524
26525int main()
26526{
26527 int val1 = nice(1);
26528 if (val1 != -1 && val1 == nice(2))
26529 exit(0);
26530 exit(1);
26531}
26532
Martin v. Löwis11437992002-04-12 09:54:03 +000026533_ACEOF
26534rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026535if { (ac_try="$ac_link"
26536case "(($ac_try" in
26537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26538 *) ac_try_echo=$ac_try;;
26539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026541 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026542 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545 { (case "(($ac_try" in
26546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26547 *) ac_try_echo=$ac_try;;
26548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026550 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026551 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026553 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026554 ac_cv_broken_nice=yes
26555else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026556 echo "$as_me: program exited with status $ac_status" >&5
26557echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026558sed 's/^/| /' conftest.$ac_ext >&5
26559
Martin v. Löwis11437992002-04-12 09:54:03 +000026560( exit $ac_status )
26561ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026563rm -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 +000026564fi
26565
Martin v. Löwiseba40652007-08-30 20:10:57 +000026566
26567fi
26568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026569{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26570echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026571if test "$ac_cv_broken_nice" = yes
26572then
Martin v. Löwis11437992002-04-12 09:54:03 +000026573
26574cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026575#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026576_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026577
26578fi
26579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026580{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26581echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026582if test "${ac_cv_broken_poll+set}" = set; then
26583 echo $ECHO_N "(cached) $ECHO_C" >&6
26584else
26585 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026586 ac_cv_broken_poll=no
26587else
26588 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026589/* confdefs.h. */
26590_ACEOF
26591cat confdefs.h >>conftest.$ac_ext
26592cat >>conftest.$ac_ext <<_ACEOF
26593/* end confdefs.h. */
26594
26595#include <poll.h>
26596
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026597int main()
26598{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026599 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026600 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026601
26602 close (42);
26603
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026604 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026605 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026606 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026607 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026608 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026609 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026610 return 1;
26611}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026612
26613_ACEOF
26614rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026615if { (ac_try="$ac_link"
26616case "(($ac_try" in
26617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26618 *) ac_try_echo=$ac_try;;
26619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026621 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026622 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026625 { (case "(($ac_try" in
26626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26627 *) ac_try_echo=$ac_try;;
26628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026630 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026631 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026633 (exit $ac_status); }; }; then
26634 ac_cv_broken_poll=yes
26635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026636 echo "$as_me: program exited with status $ac_status" >&5
26637echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026638sed 's/^/| /' conftest.$ac_ext >&5
26639
26640( exit $ac_status )
26641ac_cv_broken_poll=no
26642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026643rm -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 +000026644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026645
26646
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026647fi
26648
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026649{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26650echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026651if test "$ac_cv_broken_poll" = yes
26652then
26653
26654cat >>confdefs.h <<\_ACEOF
26655#define HAVE_BROKEN_POLL 1
26656_ACEOF
26657
26658fi
26659
Brett Cannon43802422005-02-10 20:48:03 +000026660# 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 +000026661# (which is not required by ISO C or UNIX spec) and/or if we support
26662# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026663{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26664echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026665if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026666 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026667else
26668 cat >conftest.$ac_ext <<_ACEOF
26669/* confdefs.h. */
26670_ACEOF
26671cat confdefs.h >>conftest.$ac_ext
26672cat >>conftest.$ac_ext <<_ACEOF
26673/* end confdefs.h. */
26674#include <sys/types.h>
26675#include <$ac_cv_struct_tm>
26676
26677
26678int
26679main ()
26680{
26681static struct tm ac_aggr;
26682if (ac_aggr.tm_zone)
26683return 0;
26684 ;
26685 return 0;
26686}
26687_ACEOF
26688rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026689if { (ac_try="$ac_compile"
26690case "(($ac_try" in
26691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26692 *) ac_try_echo=$ac_try;;
26693esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026695 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026696 ac_status=$?
26697 grep -v '^ *+' conftest.er1 >conftest.err
26698 rm -f conftest.er1
26699 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026701 (exit $ac_status); } && {
26702 test -z "$ac_c_werror_flag" ||
26703 test ! -s conftest.err
26704 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026705 ac_cv_member_struct_tm_tm_zone=yes
26706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026707 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026708sed 's/^/| /' conftest.$ac_ext >&5
26709
Martin v. Löwiseba40652007-08-30 20:10:57 +000026710 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026711/* confdefs.h. */
26712_ACEOF
26713cat confdefs.h >>conftest.$ac_ext
26714cat >>conftest.$ac_ext <<_ACEOF
26715/* end confdefs.h. */
26716#include <sys/types.h>
26717#include <$ac_cv_struct_tm>
26718
26719
26720int
26721main ()
26722{
26723static struct tm ac_aggr;
26724if (sizeof ac_aggr.tm_zone)
26725return 0;
26726 ;
26727 return 0;
26728}
26729_ACEOF
26730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026731if { (ac_try="$ac_compile"
26732case "(($ac_try" in
26733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26734 *) ac_try_echo=$ac_try;;
26735esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026737 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026738 ac_status=$?
26739 grep -v '^ *+' conftest.er1 >conftest.err
26740 rm -f conftest.er1
26741 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026743 (exit $ac_status); } && {
26744 test -z "$ac_c_werror_flag" ||
26745 test ! -s conftest.err
26746 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026747 ac_cv_member_struct_tm_tm_zone=yes
26748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026749 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026750sed 's/^/| /' conftest.$ac_ext >&5
26751
Martin v. Löwiseba40652007-08-30 20:10:57 +000026752 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026754
26755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026757
26758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026759fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026760{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26761echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26762if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026763
26764cat >>confdefs.h <<_ACEOF
26765#define HAVE_STRUCT_TM_TM_ZONE 1
26766_ACEOF
26767
26768
26769fi
26770
26771if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26772
26773cat >>confdefs.h <<\_ACEOF
26774#define HAVE_TM_ZONE 1
26775_ACEOF
26776
26777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026778 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26779echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026780if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026781 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026782else
26783 cat >conftest.$ac_ext <<_ACEOF
26784/* confdefs.h. */
26785_ACEOF
26786cat confdefs.h >>conftest.$ac_ext
26787cat >>conftest.$ac_ext <<_ACEOF
26788/* end confdefs.h. */
26789#include <time.h>
26790
26791int
26792main ()
26793{
26794#ifndef tzname
26795 (void) tzname;
26796#endif
26797
26798 ;
26799 return 0;
26800}
26801_ACEOF
26802rm -f conftest.$ac_objext
26803if { (ac_try="$ac_compile"
26804case "(($ac_try" in
26805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26806 *) ac_try_echo=$ac_try;;
26807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026809 (eval "$ac_compile") 2>conftest.er1
26810 ac_status=$?
26811 grep -v '^ *+' conftest.er1 >conftest.err
26812 rm -f conftest.er1
26813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026815 (exit $ac_status); } && {
26816 test -z "$ac_c_werror_flag" ||
26817 test ! -s conftest.err
26818 } && test -s conftest.$ac_objext; then
26819 ac_cv_have_decl_tzname=yes
26820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026821 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026822sed 's/^/| /' conftest.$ac_ext >&5
26823
26824 ac_cv_have_decl_tzname=no
26825fi
26826
26827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26828fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026829{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26830echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26831if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026832
26833cat >>confdefs.h <<_ACEOF
26834#define HAVE_DECL_TZNAME 1
26835_ACEOF
26836
26837
26838else
26839 cat >>confdefs.h <<_ACEOF
26840#define HAVE_DECL_TZNAME 0
26841_ACEOF
26842
26843
26844fi
26845
26846
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026847 { echo "$as_me:$LINENO: checking for tzname" >&5
26848echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026849if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026850 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026851else
26852 cat >conftest.$ac_ext <<_ACEOF
26853/* confdefs.h. */
26854_ACEOF
26855cat confdefs.h >>conftest.$ac_ext
26856cat >>conftest.$ac_ext <<_ACEOF
26857/* end confdefs.h. */
26858#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026859#if !HAVE_DECL_TZNAME
26860extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026861#endif
26862
26863int
26864main ()
26865{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026866return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026867 ;
26868 return 0;
26869}
26870_ACEOF
26871rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026872if { (ac_try="$ac_link"
26873case "(($ac_try" in
26874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26875 *) ac_try_echo=$ac_try;;
26876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026878 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026879 ac_status=$?
26880 grep -v '^ *+' conftest.er1 >conftest.err
26881 rm -f conftest.er1
26882 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026884 (exit $ac_status); } && {
26885 test -z "$ac_c_werror_flag" ||
26886 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026887 } && test -s conftest$ac_exeext &&
26888 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026889 ac_cv_var_tzname=yes
26890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026891 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026892sed 's/^/| /' conftest.$ac_ext >&5
26893
Martin v. Löwiseba40652007-08-30 20:10:57 +000026894 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026896
26897rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026898 conftest$ac_exeext conftest.$ac_ext
26899fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026900{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26901echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026902 if test $ac_cv_var_tzname = yes; then
26903
26904cat >>confdefs.h <<\_ACEOF
26905#define HAVE_TZNAME 1
26906_ACEOF
26907
26908 fi
26909fi
26910
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026911
Martin v. Löwis1d459062005-03-14 21:23:33 +000026912# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026913{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26914echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026915if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026917else
26918
26919if test "$cross_compiling" = yes; then
26920 ac_cv_working_tzset=no
26921else
26922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026923/* confdefs.h. */
26924_ACEOF
26925cat confdefs.h >>conftest.$ac_ext
26926cat >>conftest.$ac_ext <<_ACEOF
26927/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026928
26929#include <stdlib.h>
26930#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026931#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026932
26933#if HAVE_TZNAME
26934extern char *tzname[];
26935#endif
26936
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026937int main()
26938{
Brett Cannon18367812003-09-19 00:59:16 +000026939 /* Note that we need to ensure that not only does tzset(3)
26940 do 'something' with localtime, but it works as documented
26941 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026942 This includes making sure that tzname is set properly if
26943 tm->tm_zone does not exist since it is the alternative way
26944 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026945
26946 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026947 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026948 */
26949
Martin v. Löwis1d459062005-03-14 21:23:33 +000026950 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026951 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26952
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026953 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026954 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026955 if (localtime(&groundhogday)->tm_hour != 0)
26956 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026957#if HAVE_TZNAME
26958 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26959 if (strcmp(tzname[0], "UTC") ||
26960 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26961 exit(1);
26962#endif
Brett Cannon18367812003-09-19 00:59:16 +000026963
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026964 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026965 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026966 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026967 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026968#if HAVE_TZNAME
26969 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26970 exit(1);
26971#endif
Brett Cannon18367812003-09-19 00:59:16 +000026972
26973 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26974 tzset();
26975 if (localtime(&groundhogday)->tm_hour != 11)
26976 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026977#if HAVE_TZNAME
26978 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26979 exit(1);
26980#endif
26981
26982#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026983 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26984 exit(1);
26985 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26986 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026987#endif
Brett Cannon18367812003-09-19 00:59:16 +000026988
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026989 exit(0);
26990}
26991
26992_ACEOF
26993rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026994if { (ac_try="$ac_link"
26995case "(($ac_try" in
26996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26997 *) ac_try_echo=$ac_try;;
26998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027000 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027001 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027004 { (case "(($ac_try" in
27005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27006 *) ac_try_echo=$ac_try;;
27007esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027009 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027010 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027012 (exit $ac_status); }; }; then
27013 ac_cv_working_tzset=yes
27014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027015 echo "$as_me: program exited with status $ac_status" >&5
27016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027017sed 's/^/| /' conftest.$ac_ext >&5
27018
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027019( exit $ac_status )
27020ac_cv_working_tzset=no
27021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027022rm -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 +000027023fi
27024
Martin v. Löwiseba40652007-08-30 20:10:57 +000027025
27026fi
27027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027028{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27029echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027030if test "$ac_cv_working_tzset" = yes
27031then
27032
27033cat >>confdefs.h <<\_ACEOF
27034#define HAVE_WORKING_TZSET 1
27035_ACEOF
27036
27037fi
27038
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027039# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027040{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27041echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027042if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027044else
27045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027046/* confdefs.h. */
27047_ACEOF
27048cat confdefs.h >>conftest.$ac_ext
27049cat >>conftest.$ac_ext <<_ACEOF
27050/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027051#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027052int
27053main ()
27054{
27055
27056struct stat st;
27057st.st_mtim.tv_nsec = 1;
27058
27059 ;
27060 return 0;
27061}
27062_ACEOF
27063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027064if { (ac_try="$ac_compile"
27065case "(($ac_try" in
27066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27067 *) ac_try_echo=$ac_try;;
27068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027072 grep -v '^ *+' conftest.er1 >conftest.err
27073 rm -f conftest.er1
27074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027076 (exit $ac_status); } && {
27077 test -z "$ac_c_werror_flag" ||
27078 test ! -s conftest.err
27079 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027080 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027083sed 's/^/| /' conftest.$ac_ext >&5
27084
Martin v. Löwiseba40652007-08-30 20:10:57 +000027085 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027086fi
27087
Martin v. Löwiseba40652007-08-30 20:10:57 +000027088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27089fi
27090
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027091{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27092echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027093if test "$ac_cv_stat_tv_nsec" = yes
27094then
27095
27096cat >>confdefs.h <<\_ACEOF
27097#define HAVE_STAT_TV_NSEC 1
27098_ACEOF
27099
27100fi
27101
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027102# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027103{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27104echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027105if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027106 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027107else
27108 cat >conftest.$ac_ext <<_ACEOF
27109/* confdefs.h. */
27110_ACEOF
27111cat confdefs.h >>conftest.$ac_ext
27112cat >>conftest.$ac_ext <<_ACEOF
27113/* end confdefs.h. */
27114#include <sys/stat.h>
27115int
27116main ()
27117{
27118
27119struct stat st;
27120st.st_mtimespec.tv_nsec = 1;
27121
27122 ;
27123 return 0;
27124}
27125_ACEOF
27126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027127if { (ac_try="$ac_compile"
27128case "(($ac_try" in
27129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27130 *) ac_try_echo=$ac_try;;
27131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027134 ac_status=$?
27135 grep -v '^ *+' conftest.er1 >conftest.err
27136 rm -f conftest.er1
27137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027139 (exit $ac_status); } && {
27140 test -z "$ac_c_werror_flag" ||
27141 test ! -s conftest.err
27142 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027143 ac_cv_stat_tv_nsec2=yes
27144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027145 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027146sed 's/^/| /' conftest.$ac_ext >&5
27147
Martin v. Löwiseba40652007-08-30 20:10:57 +000027148 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027149fi
27150
Martin v. Löwiseba40652007-08-30 20:10:57 +000027151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27152fi
27153
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027154{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27155echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027156if test "$ac_cv_stat_tv_nsec2" = yes
27157then
27158
27159cat >>confdefs.h <<\_ACEOF
27160#define HAVE_STAT_TV_NSEC2 1
27161_ACEOF
27162
27163fi
27164
Jack Jansen666b1e72001-10-31 12:11:48 +000027165# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027166{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27167echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027168if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027169 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027170else
Martin v. Löwis11437992002-04-12 09:54:03 +000027171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027172/* confdefs.h. */
27173_ACEOF
27174cat confdefs.h >>conftest.$ac_ext
27175cat >>conftest.$ac_ext <<_ACEOF
27176/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027177#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027178int
27179main ()
27180{
Jack Jansen666b1e72001-10-31 12:11:48 +000027181
27182 int rtn;
27183 rtn = mvwdelch(0,0,0);
27184
Martin v. Löwis11437992002-04-12 09:54:03 +000027185 ;
27186 return 0;
27187}
27188_ACEOF
27189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027190if { (ac_try="$ac_compile"
27191case "(($ac_try" in
27192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27193 *) ac_try_echo=$ac_try;;
27194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027198 grep -v '^ *+' conftest.er1 >conftest.err
27199 rm -f conftest.er1
27200 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027202 (exit $ac_status); } && {
27203 test -z "$ac_c_werror_flag" ||
27204 test ! -s conftest.err
27205 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027206 ac_cv_mvwdelch_is_expression=yes
27207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027209sed 's/^/| /' conftest.$ac_ext >&5
27210
Martin v. Löwiseba40652007-08-30 20:10:57 +000027211 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027212fi
27213
Martin v. Löwiseba40652007-08-30 20:10:57 +000027214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27215fi
27216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027217{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27218echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027219
27220if test "$ac_cv_mvwdelch_is_expression" = yes
27221then
Martin v. Löwis11437992002-04-12 09:54:03 +000027222
27223cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027224#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027225_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027226
27227fi
27228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027229{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27230echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027231if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027232 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027233else
Martin v. Löwis11437992002-04-12 09:54:03 +000027234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027235/* confdefs.h. */
27236_ACEOF
27237cat confdefs.h >>conftest.$ac_ext
27238cat >>conftest.$ac_ext <<_ACEOF
27239/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027240#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027241int
27242main ()
27243{
Jack Jansen666b1e72001-10-31 12:11:48 +000027244
27245 WINDOW *w;
27246 w->_flags = 0;
27247
Martin v. Löwis11437992002-04-12 09:54:03 +000027248 ;
27249 return 0;
27250}
27251_ACEOF
27252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027253if { (ac_try="$ac_compile"
27254case "(($ac_try" in
27255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27256 *) ac_try_echo=$ac_try;;
27257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027261 grep -v '^ *+' conftest.er1 >conftest.err
27262 rm -f conftest.er1
27263 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027265 (exit $ac_status); } && {
27266 test -z "$ac_c_werror_flag" ||
27267 test ! -s conftest.err
27268 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027269 ac_cv_window_has_flags=yes
27270else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027272sed 's/^/| /' conftest.$ac_ext >&5
27273
Martin v. Löwiseba40652007-08-30 20:10:57 +000027274 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027275fi
27276
Martin v. Löwiseba40652007-08-30 20:10:57 +000027277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27278fi
27279
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027280{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27281echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027282
Jack Jansen666b1e72001-10-31 12:11:48 +000027283
27284if test "$ac_cv_window_has_flags" = yes
27285then
Martin v. Löwis11437992002-04-12 09:54:03 +000027286
27287cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027288#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027289_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027290
27291fi
27292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027293{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27294echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027295cat >conftest.$ac_ext <<_ACEOF
27296/* confdefs.h. */
27297_ACEOF
27298cat confdefs.h >>conftest.$ac_ext
27299cat >>conftest.$ac_ext <<_ACEOF
27300/* end confdefs.h. */
27301#include <curses.h>
27302int
27303main ()
27304{
27305void *x=is_term_resized
27306 ;
27307 return 0;
27308}
27309_ACEOF
27310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027311if { (ac_try="$ac_compile"
27312case "(($ac_try" in
27313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27314 *) ac_try_echo=$ac_try;;
27315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027317 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027318 ac_status=$?
27319 grep -v '^ *+' conftest.er1 >conftest.err
27320 rm -f conftest.er1
27321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027323 (exit $ac_status); } && {
27324 test -z "$ac_c_werror_flag" ||
27325 test ! -s conftest.err
27326 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027327
27328cat >>confdefs.h <<\_ACEOF
27329#define HAVE_CURSES_IS_TERM_RESIZED 1
27330_ACEOF
27331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027332 { echo "$as_me:$LINENO: result: yes" >&5
27333echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027335 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027336sed 's/^/| /' conftest.$ac_ext >&5
27337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027338 { echo "$as_me:$LINENO: result: no" >&5
27339echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027340
27341fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027342
Martin v. Löwiseba40652007-08-30 20:10:57 +000027343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027345{ echo "$as_me:$LINENO: checking for resize_term" >&5
27346echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027347cat >conftest.$ac_ext <<_ACEOF
27348/* confdefs.h. */
27349_ACEOF
27350cat confdefs.h >>conftest.$ac_ext
27351cat >>conftest.$ac_ext <<_ACEOF
27352/* end confdefs.h. */
27353#include <curses.h>
27354int
27355main ()
27356{
27357void *x=resize_term
27358 ;
27359 return 0;
27360}
27361_ACEOF
27362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027363if { (ac_try="$ac_compile"
27364case "(($ac_try" in
27365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27366 *) ac_try_echo=$ac_try;;
27367esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027369 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027370 ac_status=$?
27371 grep -v '^ *+' conftest.er1 >conftest.err
27372 rm -f conftest.er1
27373 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027375 (exit $ac_status); } && {
27376 test -z "$ac_c_werror_flag" ||
27377 test ! -s conftest.err
27378 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027379
27380cat >>confdefs.h <<\_ACEOF
27381#define HAVE_CURSES_RESIZE_TERM 1
27382_ACEOF
27383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027384 { echo "$as_me:$LINENO: result: yes" >&5
27385echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027387 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027388sed 's/^/| /' conftest.$ac_ext >&5
27389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027390 { echo "$as_me:$LINENO: result: no" >&5
27391echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027392
27393fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027394
Martin v. Löwiseba40652007-08-30 20:10:57 +000027395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027397{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27398echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027399cat >conftest.$ac_ext <<_ACEOF
27400/* confdefs.h. */
27401_ACEOF
27402cat confdefs.h >>conftest.$ac_ext
27403cat >>conftest.$ac_ext <<_ACEOF
27404/* end confdefs.h. */
27405#include <curses.h>
27406int
27407main ()
27408{
27409void *x=resizeterm
27410 ;
27411 return 0;
27412}
27413_ACEOF
27414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027415if { (ac_try="$ac_compile"
27416case "(($ac_try" in
27417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27418 *) ac_try_echo=$ac_try;;
27419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027421 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027422 ac_status=$?
27423 grep -v '^ *+' conftest.er1 >conftest.err
27424 rm -f conftest.er1
27425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027427 (exit $ac_status); } && {
27428 test -z "$ac_c_werror_flag" ||
27429 test ! -s conftest.err
27430 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027431
27432cat >>confdefs.h <<\_ACEOF
27433#define HAVE_CURSES_RESIZETERM 1
27434_ACEOF
27435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027436 { echo "$as_me:$LINENO: result: yes" >&5
27437echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027439 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027440sed 's/^/| /' conftest.$ac_ext >&5
27441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027442 { echo "$as_me:$LINENO: result: no" >&5
27443echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027444
27445fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027446
Martin v. Löwiseba40652007-08-30 20:10:57 +000027447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27448
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027449{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27450echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027451
27452if test -r /dev/ptmx
27453then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027454 { echo "$as_me:$LINENO: result: yes" >&5
27455echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027456
27457cat >>confdefs.h <<\_ACEOF
27458#define HAVE_DEV_PTMX 1
27459_ACEOF
27460
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027461else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027462 { echo "$as_me:$LINENO: result: no" >&5
27463echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027464fi
27465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027466{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27467echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027468
27469if test -r /dev/ptc
27470then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027471 { echo "$as_me:$LINENO: result: yes" >&5
27472echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027473
27474cat >>confdefs.h <<\_ACEOF
27475#define HAVE_DEV_PTC 1
27476_ACEOF
27477
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027479 { echo "$as_me:$LINENO: result: no" >&5
27480echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027481fi
27482
Mark Dickinson82864d12009-11-15 16:18:58 +000027483if test "$have_long_long" = yes
27484then
27485 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27486echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27487 if test "${ac_cv_have_long_long_format+set}" = set; then
27488 echo $ECHO_N "(cached) $ECHO_C" >&6
27489else
27490 if test "$cross_compiling" = yes; then
27491 ac_cv_have_long_long_format=no
27492else
27493 cat >conftest.$ac_ext <<_ACEOF
27494/* confdefs.h. */
27495_ACEOF
27496cat confdefs.h >>conftest.$ac_ext
27497cat >>conftest.$ac_ext <<_ACEOF
27498/* end confdefs.h. */
27499
27500 #include <stdio.h>
27501 #include <stddef.h>
27502 #include <string.h>
27503
27504 #ifdef HAVE_SYS_TYPES_H
27505 #include <sys/types.h>
27506 #endif
27507
27508 int main()
27509 {
27510 char buffer[256];
27511
27512 if (sprintf(buffer, "%lld", (long long)123) < 0)
27513 return 1;
27514 if (strcmp(buffer, "123"))
27515 return 1;
27516
27517 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27518 return 1;
27519 if (strcmp(buffer, "-123"))
27520 return 1;
27521
27522 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27523 return 1;
27524 if (strcmp(buffer, "123"))
27525 return 1;
27526
27527 return 0;
27528 }
27529
27530_ACEOF
27531rm -f conftest$ac_exeext
27532if { (ac_try="$ac_link"
27533case "(($ac_try" in
27534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27535 *) ac_try_echo=$ac_try;;
27536esac
27537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27538 (eval "$ac_link") 2>&5
27539 ac_status=$?
27540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27541 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27542 { (case "(($ac_try" in
27543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27544 *) ac_try_echo=$ac_try;;
27545esac
27546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27547 (eval "$ac_try") 2>&5
27548 ac_status=$?
27549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27550 (exit $ac_status); }; }; then
27551 ac_cv_have_long_long_format=yes
27552else
27553 echo "$as_me: program exited with status $ac_status" >&5
27554echo "$as_me: failed program was:" >&5
27555sed 's/^/| /' conftest.$ac_ext >&5
27556
27557( exit $ac_status )
27558ac_cv_have_long_long_format=no
27559fi
27560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27561fi
27562
27563
27564
27565fi
27566
27567 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27568echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27569fi
27570
Mark Dickinson5ce84742009-12-31 20:48:04 +000027571if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027572then
27573
27574cat >>confdefs.h <<\_ACEOF
27575#define PY_FORMAT_LONG_LONG "ll"
27576_ACEOF
27577
27578fi
27579
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027580if test $ac_sys_system = Darwin
27581then
27582 LIBS="$LIBS -framework CoreFoundation"
27583fi
27584
Mark Dickinson82864d12009-11-15 16:18:58 +000027585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027586{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27587echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027588if test "${ac_cv_have_size_t_format+set}" = set; then
27589 echo $ECHO_N "(cached) $ECHO_C" >&6
27590else
27591 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027592 ac_cv_have_size_t_format="cross -- assuming yes"
27593
Brett Cannon09d12362006-05-11 05:11:33 +000027594else
27595 cat >conftest.$ac_ext <<_ACEOF
27596/* confdefs.h. */
27597_ACEOF
27598cat confdefs.h >>conftest.$ac_ext
27599cat >>conftest.$ac_ext <<_ACEOF
27600/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027601
Brett Cannon09d12362006-05-11 05:11:33 +000027602#include <stdio.h>
27603#include <stddef.h>
27604#include <string.h>
27605
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027606#ifdef HAVE_SYS_TYPES_H
27607#include <sys/types.h>
27608#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027609
27610#ifdef HAVE_SSIZE_T
27611typedef ssize_t Py_ssize_t;
27612#elif SIZEOF_VOID_P == SIZEOF_LONG
27613typedef long Py_ssize_t;
27614#else
27615typedef int Py_ssize_t;
27616#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027617
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027618int main()
27619{
27620 char buffer[256];
27621
Brett Cannon09d12362006-05-11 05:11:33 +000027622 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27623 return 1;
27624
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027625 if (strcmp(buffer, "123"))
27626 return 1;
27627
27628 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27629 return 1;
27630
27631 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027632 return 1;
27633
27634 return 0;
27635}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027636
Brett Cannon09d12362006-05-11 05:11:33 +000027637_ACEOF
27638rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027639if { (ac_try="$ac_link"
27640case "(($ac_try" in
27641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27642 *) ac_try_echo=$ac_try;;
27643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027645 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027646 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027649 { (case "(($ac_try" in
27650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27651 *) ac_try_echo=$ac_try;;
27652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027654 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027655 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027657 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027658 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027659else
27660 echo "$as_me: program exited with status $ac_status" >&5
27661echo "$as_me: failed program was:" >&5
27662sed 's/^/| /' conftest.$ac_ext >&5
27663
27664( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027665ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027666fi
27667rm -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 +000027668fi
27669
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027670
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027671fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027672{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27673echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027674if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027675
27676cat >>confdefs.h <<\_ACEOF
27677#define PY_FORMAT_SIZE_T "z"
27678_ACEOF
27679
27680fi
27681
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027682{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27683echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027684if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027686else
Martin v. Löwis11437992002-04-12 09:54:03 +000027687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027688/* confdefs.h. */
27689_ACEOF
27690cat confdefs.h >>conftest.$ac_ext
27691cat >>conftest.$ac_ext <<_ACEOF
27692/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027693
27694#ifdef HAVE_SYS_TYPES_H
27695#include <sys/types.h>
27696#endif
27697#ifdef HAVE_SYS_SOCKET_H
27698#include <sys/socket.h>
27699#endif
27700
27701
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027702typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027703int
27704main ()
27705{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027706if ((ac__type_new_ *) 0)
27707 return 0;
27708if (sizeof (ac__type_new_))
27709 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027710 ;
27711 return 0;
27712}
27713_ACEOF
27714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027715if { (ac_try="$ac_compile"
27716case "(($ac_try" in
27717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27718 *) ac_try_echo=$ac_try;;
27719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027723 grep -v '^ *+' conftest.er1 >conftest.err
27724 rm -f conftest.er1
27725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027727 (exit $ac_status); } && {
27728 test -z "$ac_c_werror_flag" ||
27729 test ! -s conftest.err
27730 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027731 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027734sed 's/^/| /' conftest.$ac_ext >&5
27735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027736 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027738
27739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027741{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27742echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27743if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027744 :
27745else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027746
Martin v. Löwis01c04012002-11-11 14:58:44 +000027747cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027748#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027749_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027750
27751fi
27752
Michael W. Hudson54241132001-12-07 15:38:26 +000027753
Michael W. Hudson54241132001-12-07 15:38:26 +000027754
27755
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027756for h in `(cd $srcdir;echo Python/thread_*.h)`
27757do
27758 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27759done
27760
Michael W. Hudson54241132001-12-07 15:38:26 +000027761
Neal Norwitzd24499d2005-12-18 21:36:39 +000027762SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027763{ echo "$as_me:$LINENO: checking for build directories" >&5
27764echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027765for dir in $SRCDIRS; do
27766 if test ! -d $dir; then
27767 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027768 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027769done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027770{ echo "$as_me:$LINENO: result: done" >&5
27771echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027772
Guido van Rossum627b2d71993-12-24 10:39:16 +000027773# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027774ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027775
Martin v. Löwis11437992002-04-12 09:54:03 +000027776cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027777# This file is a shell script that caches the results of configure
27778# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027779# scripts and configure runs, see configure's option --config-cache.
27780# It is not useful on other systems. If it contains results you don't
27781# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027782#
Martin v. Löwis11437992002-04-12 09:54:03 +000027783# config.status only pays attention to the cache file if you give it
27784# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027785#
Skip Montanaro6dead952003-09-25 14:50:04 +000027786# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027787# loading this file, other *unset* `ac_cv_foo' will be assigned the
27788# following values.
27789
27790_ACEOF
27791
Guido van Rossumf78abae1997-01-21 22:02:36 +000027792# The following way of writing the cache mishandles newlines in values,
27793# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027794# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027795# Ultrix sh set writes to stderr and can't be redirected directly,
27796# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027797(
27798 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27799 eval ac_val=\$$ac_var
27800 case $ac_val in #(
27801 *${as_nl}*)
27802 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027803 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27804echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027805 esac
27806 case $ac_var in #(
27807 _ | IFS | as_nl) ;; #(
27808 *) $as_unset $ac_var ;;
27809 esac ;;
27810 esac
27811 done
27812
Martin v. Löwis11437992002-04-12 09:54:03 +000027813 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027814 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27815 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027816 # `set' does not quote correctly, so add quotes (double-quote
27817 # substitution turns \\\\ into \\, and sed turns \\ into \).
27818 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027819 "s/'/'\\\\''/g;
27820 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027821 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027822 *)
27823 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027824 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027825 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027826 esac |
27827 sort
27828) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027829 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027830 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027831 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027832 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027833 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27834 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027835 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27836 :end' >>confcache
27837if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27838 if test -w "$cache_file"; then
27839 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027840 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27841echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027842 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027843 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027844 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27845echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027846 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027847fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027848rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027850test "x$prefix" = xNONE && prefix=$ac_default_prefix
27851# Let make expand exec_prefix.
27852test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027854DEFS=-DHAVE_CONFIG_H
27855
Skip Montanaro6dead952003-09-25 14:50:04 +000027856ac_libobjs=
27857ac_ltlibobjs=
27858for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27859 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027860 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027861 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027862 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27863 # will be set to the directory where LIBOBJS objects are built.
27864 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27865 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027866done
27867LIBOBJS=$ac_libobjs
27868
27869LTLIBOBJS=$ac_ltlibobjs
27870
27871
Martin v. Löwis11437992002-04-12 09:54:03 +000027872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027873: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027874ac_clean_files_save=$ac_clean_files
27875ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027876{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27877echo "$as_me: creating $CONFIG_STATUS" >&6;}
27878cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027879#! $SHELL
27880# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027881# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027882# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027883# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027884
Martin v. Löwis11437992002-04-12 09:54:03 +000027885debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027886ac_cs_recheck=false
27887ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027888SHELL=\${CONFIG_SHELL-$SHELL}
27889_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027890
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027891cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027892## --------------------- ##
27893## M4sh Initialization. ##
27894## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027895
Martin v. Löwiseba40652007-08-30 20:10:57 +000027896# Be more Bourne compatible
27897DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027898if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27899 emulate sh
27900 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027901 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027902 # is contrary to our usage. Disable this feature.
27903 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027904 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027905else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027906 case `(set -o) 2>/dev/null` in
27907 *posix*) set -o posix ;;
27908esac
27909
Martin v. Löwis11437992002-04-12 09:54:03 +000027910fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027911
Skip Montanaro6dead952003-09-25 14:50:04 +000027912
Martin v. Löwis11437992002-04-12 09:54:03 +000027913
27914
Martin v. Löwiseba40652007-08-30 20:10:57 +000027915# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027916# Avoid depending upon Character Ranges.
27917as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27918as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27919as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27920as_cr_digits='0123456789'
27921as_cr_alnum=$as_cr_Letters$as_cr_digits
27922
27923# The user is always right.
27924if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027925 echo "#! /bin/sh" >conf$$.sh
27926 echo "exit 0" >>conf$$.sh
27927 chmod +x conf$$.sh
27928 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27929 PATH_SEPARATOR=';'
27930 else
27931 PATH_SEPARATOR=:
27932 fi
27933 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027934fi
27935
Martin v. Löwiseba40652007-08-30 20:10:57 +000027936# Support unset when possible.
27937if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27938 as_unset=unset
27939else
27940 as_unset=false
27941fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027942
Martin v. Löwiseba40652007-08-30 20:10:57 +000027943
27944# IFS
27945# We need space, tab and new line, in precisely that order. Quoting is
27946# there to prevent editors from complaining about space-tab.
27947# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27948# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027949as_nl='
27950'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027951IFS=" "" $as_nl"
27952
27953# Find who we are. Look in the path if we contain no directory separator.
27954case $0 in
27955 *[\\/]* ) as_myself=$0 ;;
27956 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027957for as_dir in $PATH
27958do
27959 IFS=$as_save_IFS
27960 test -z "$as_dir" && as_dir=.
27961 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27962done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027963IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027964
Martin v. Löwiseba40652007-08-30 20:10:57 +000027965 ;;
27966esac
27967# We did not find ourselves, most probably we were run as `sh COMMAND'
27968# in which case we are not to be found in the path.
27969if test "x$as_myself" = x; then
27970 as_myself=$0
27971fi
27972if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027973 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027974 { (exit 1); exit 1; }
27975fi
27976
27977# Work around bugs in pre-3.0 UWIN ksh.
27978for as_var in ENV MAIL MAILPATH
27979do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27980done
27981PS1='$ '
27982PS2='> '
27983PS4='+ '
27984
27985# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027986for as_var in \
27987 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27988 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27989 LC_TELEPHONE LC_TIME
27990do
27991 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27992 eval $as_var=C; export $as_var
27993 else
27994 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27995 fi
27996done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027997
27998# Required to use basename.
27999if expr a : '\(a\)' >/dev/null 2>&1 &&
28000 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28001 as_expr=expr
28002else
28003 as_expr=false
28004fi
28005
28006if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28007 as_basename=basename
28008else
28009 as_basename=false
28010fi
28011
28012
28013# Name of the executable.
28014as_me=`$as_basename -- "$0" ||
28015$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28016 X"$0" : 'X\(//\)$' \| \
28017 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028018echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028019 sed '/^.*\/\([^/][^/]*\)\/*$/{
28020 s//\1/
28021 q
28022 }
28023 /^X\/\(\/\/\)$/{
28024 s//\1/
28025 q
28026 }
28027 /^X\/\(\/\).*/{
28028 s//\1/
28029 q
28030 }
28031 s/.*/./; q'`
28032
28033# CDPATH.
28034$as_unset CDPATH
28035
28036
28037
Martin v. Löwis11437992002-04-12 09:54:03 +000028038 as_lineno_1=$LINENO
28039 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028040 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028041 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028042
Martin v. Löwis11437992002-04-12 09:54:03 +000028043 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28044 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028045 # line-number line after each line using $LINENO; the second 'sed'
28046 # does the real work. The second script uses 'N' to pair each
28047 # line-number line with the line containing $LINENO, and appends
28048 # trailing '-' during substitution so that $LINENO is not a special
28049 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028050 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028051 # scripts with optimization help from Paolo Bonzini. Blame Lee
28052 # E. McMahon (1931-1989) for sed's syntax. :-)
28053 sed -n '
28054 p
28055 /[$]LINENO/=
28056 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028057 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028058 s/[$]LINENO.*/&-/
28059 t lineno
28060 b
28061 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028062 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028063 :loop
28064 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028065 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028066 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028067 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028068 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028069 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028070 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028071
Martin v. Löwis11437992002-04-12 09:54:03 +000028072 # Don't try to exec as it changes $[0], causing all sort of problems
28073 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028074 # original and so on. Autoconf is especially sensitive to this).
28075 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028076 # Exit status is that of the last command.
28077 exit
28078}
28079
28080
Martin v. Löwiseba40652007-08-30 20:10:57 +000028081if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28082 as_dirname=dirname
28083else
28084 as_dirname=false
28085fi
28086
28087ECHO_C= ECHO_N= ECHO_T=
28088case `echo -n x` in
28089-n*)
28090 case `echo 'x\c'` in
28091 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28092 *) ECHO_C='\c';;
28093 esac;;
28094*)
28095 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028097
Martin v. Löwiseba40652007-08-30 20:10:57 +000028098if expr a : '\(a\)' >/dev/null 2>&1 &&
28099 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028100 as_expr=expr
28101else
28102 as_expr=false
28103fi
28104
28105rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028106if test -d conf$$.dir; then
28107 rm -f conf$$.dir/conf$$.file
28108else
28109 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028110 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028111fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028112echo >conf$$.file
28113if ln -s conf$$.file conf$$ 2>/dev/null; then
28114 as_ln_s='ln -s'
28115 # ... but there are two gotchas:
28116 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28117 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28118 # In both cases, we have to default to `cp -p'.
28119 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028120 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028121elif ln conf$$.file conf$$ 2>/dev/null; then
28122 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028123else
28124 as_ln_s='cp -p'
28125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028126rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28127rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028128
Skip Montanaro6dead952003-09-25 14:50:04 +000028129if mkdir -p . 2>/dev/null; then
28130 as_mkdir_p=:
28131else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028132 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028133 as_mkdir_p=false
28134fi
28135
Martin v. Löwiseba40652007-08-30 20:10:57 +000028136if test -x / >/dev/null 2>&1; then
28137 as_test_x='test -x'
28138else
28139 if ls -dL / >/dev/null 2>&1; then
28140 as_ls_L_option=L
28141 else
28142 as_ls_L_option=
28143 fi
28144 as_test_x='
28145 eval sh -c '\''
28146 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028147 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028148 else
28149 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028150 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028151 esac;
28152 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28153 ???[sx]*):;;*)false;;esac;fi
28154 '\'' sh
28155 '
28156fi
28157as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028158
28159# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028160as_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 +000028161
28162# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028163as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028164
28165
Martin v. Löwis11437992002-04-12 09:54:03 +000028166exec 6>&1
28167
Martin v. Löwiseba40652007-08-30 20:10:57 +000028168# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028169# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028170# values after options handling.
28171ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028172This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028173generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028174
28175 CONFIG_FILES = $CONFIG_FILES
28176 CONFIG_HEADERS = $CONFIG_HEADERS
28177 CONFIG_LINKS = $CONFIG_LINKS
28178 CONFIG_COMMANDS = $CONFIG_COMMANDS
28179 $ $0 $@
28180
Martin v. Löwiseba40652007-08-30 20:10:57 +000028181on `(hostname || uname -n) 2>/dev/null | sed 1q`
28182"
28183
Martin v. Löwis11437992002-04-12 09:54:03 +000028184_ACEOF
28185
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028186cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028187# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028188config_files="$ac_config_files"
28189config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028190
Martin v. Löwiseba40652007-08-30 20:10:57 +000028191_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028192
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028193cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028194ac_cs_usage="\
28195\`$as_me' instantiates files from templates according to the
28196current configuration.
28197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028198Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028199
28200 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028201 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028202 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028203 -d, --debug don't remove temporary files
28204 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028205 --file=FILE[:TEMPLATE]
28206 instantiate the configuration file FILE
28207 --header=FILE[:TEMPLATE]
28208 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028209
28210Configuration files:
28211$config_files
28212
28213Configuration headers:
28214$config_headers
28215
28216Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028217
Martin v. Löwiseba40652007-08-30 20:10:57 +000028218_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028219cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028220ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028221python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028222configured by $0, generated by GNU Autoconf 2.61,
28223 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028225Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028226This config.status script is free software; the Free Software Foundation
28227gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028228
28229ac_pwd='$ac_pwd'
28230srcdir='$srcdir'
28231INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028232_ACEOF
28233
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028234cat >>$CONFIG_STATUS <<\_ACEOF
28235# If no file are specified by the user, then we need to provide default
28236# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028237ac_need_defaults=:
28238while test $# != 0
28239do
28240 case $1 in
28241 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028242 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28243 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028244 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028245 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028246 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028247 ac_option=$1
28248 ac_optarg=$2
28249 ac_shift=shift
28250 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028251 esac
28252
Skip Montanaro6dead952003-09-25 14:50:04 +000028253 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028254 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028255 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28256 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028257 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028258 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028259 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028260 debug=: ;;
28261 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028262 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028263 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028264 ac_need_defaults=false;;
28265 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028266 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028267 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028268 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028269 --he | --h)
28270 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028271 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028272Try \`$0 --help' for more information." >&2
28273 { (exit 1); exit 1; }; };;
28274 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028275 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028276 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28277 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28278 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028279
28280 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028281 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028282Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028283 { (exit 1); exit 1; }; } ;;
28284
Martin v. Löwiseba40652007-08-30 20:10:57 +000028285 *) ac_config_targets="$ac_config_targets $1"
28286 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028287
28288 esac
28289 shift
28290done
28291
Skip Montanaro6dead952003-09-25 14:50:04 +000028292ac_configure_extra_args=
28293
28294if $ac_cs_silent; then
28295 exec 6>/dev/null
28296 ac_configure_extra_args="$ac_configure_extra_args --silent"
28297fi
28298
28299_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028300cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028301if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028302 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28303 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028304 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028305 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028306fi
28307
Martin v. Löwis11437992002-04-12 09:54:03 +000028308_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028309cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028310exec 5>>config.log
28311{
28312 echo
28313 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28314## Running $as_me. ##
28315_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028316 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028317} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028318
Martin v. Löwiseba40652007-08-30 20:10:57 +000028319_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028320cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028321_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028322
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028323cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028324
28325# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028326for ac_config_target in $ac_config_targets
28327do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028328 case $ac_config_target in
28329 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28330 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28331 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28332 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028333 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28334 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028335 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28336 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028337 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028339 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28340echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028341 { (exit 1); exit 1; }; };;
28342 esac
28343done
28344
Martin v. Löwiseba40652007-08-30 20:10:57 +000028345
Martin v. Löwis11437992002-04-12 09:54:03 +000028346# If the user did not use the arguments to specify the items to instantiate,
28347# then the envvar interface is used. Set only those that are not.
28348# We use the long form for the default assignment because of an extremely
28349# bizarre bug on SunOS 4.1.3.
28350if $ac_need_defaults; then
28351 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28352 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28353fi
28354
Skip Montanaro6dead952003-09-25 14:50:04 +000028355# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028356# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028357# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028358# Hook for its removal unless debugging.
28359# Note that there is a small window in which the directory will not be cleaned:
28360# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028361$debug ||
28362{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028363 tmp=
28364 trap 'exit_status=$?
28365 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28366' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028367 trap '{ (exit 1); exit 1; }' 1 2 13 15
28368}
Martin v. Löwis11437992002-04-12 09:54:03 +000028369# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028370
Martin v. Löwis11437992002-04-12 09:54:03 +000028371{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028372 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028373 test -n "$tmp" && test -d "$tmp"
28374} ||
28375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028376 tmp=./conf$$-$RANDOM
28377 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028378} ||
28379{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028380 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028381 { (exit 1); exit 1; }
28382}
28383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028384#
28385# Set up the sed scripts for CONFIG_FILES section.
28386#
28387
28388# No need to generate the scripts if there are no CONFIG_FILES.
28389# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028390if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028391
28392_ACEOF
28393
Martin v. Löwiseba40652007-08-30 20:10:57 +000028394
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028395
Martin v. Löwiseba40652007-08-30 20:10:57 +000028396ac_delim='%!_!# '
28397for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028398 cat >conf$$subs.sed <<_ACEOF
28399SHELL!$SHELL$ac_delim
28400PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28401PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28402PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28403PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28404PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28405PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28406exec_prefix!$exec_prefix$ac_delim
28407prefix!$prefix$ac_delim
28408program_transform_name!$program_transform_name$ac_delim
28409bindir!$bindir$ac_delim
28410sbindir!$sbindir$ac_delim
28411libexecdir!$libexecdir$ac_delim
28412datarootdir!$datarootdir$ac_delim
28413datadir!$datadir$ac_delim
28414sysconfdir!$sysconfdir$ac_delim
28415sharedstatedir!$sharedstatedir$ac_delim
28416localstatedir!$localstatedir$ac_delim
28417includedir!$includedir$ac_delim
28418oldincludedir!$oldincludedir$ac_delim
28419docdir!$docdir$ac_delim
28420infodir!$infodir$ac_delim
28421htmldir!$htmldir$ac_delim
28422dvidir!$dvidir$ac_delim
28423pdfdir!$pdfdir$ac_delim
28424psdir!$psdir$ac_delim
28425libdir!$libdir$ac_delim
28426localedir!$localedir$ac_delim
28427mandir!$mandir$ac_delim
28428DEFS!$DEFS$ac_delim
28429ECHO_C!$ECHO_C$ac_delim
28430ECHO_N!$ECHO_N$ac_delim
28431ECHO_T!$ECHO_T$ac_delim
28432LIBS!$LIBS$ac_delim
28433build_alias!$build_alias$ac_delim
28434host_alias!$host_alias$ac_delim
28435target_alias!$target_alias$ac_delim
28436VERSION!$VERSION$ac_delim
28437SOVERSION!$SOVERSION$ac_delim
28438CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28439UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28440ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028441LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028442PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28443PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28444PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28445PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28446PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28447FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28448FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28449FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28450FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28451FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28452MACHDEP!$MACHDEP$ac_delim
28453SGI_ABI!$SGI_ABI$ac_delim
28454EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28455EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28456CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28457EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28458CC!$CC$ac_delim
28459CFLAGS!$CFLAGS$ac_delim
28460LDFLAGS!$LDFLAGS$ac_delim
28461CPPFLAGS!$CPPFLAGS$ac_delim
28462ac_ct_CC!$ac_ct_CC$ac_delim
28463EXEEXT!$EXEEXT$ac_delim
28464OBJEXT!$OBJEXT$ac_delim
28465CXX!$CXX$ac_delim
28466MAINCC!$MAINCC$ac_delim
28467CPP!$CPP$ac_delim
28468GREP!$GREP$ac_delim
28469EGREP!$EGREP$ac_delim
28470BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28471LIBRARY!$LIBRARY$ac_delim
28472LDLIBRARY!$LDLIBRARY$ac_delim
28473DLLLIBRARY!$DLLLIBRARY$ac_delim
28474BLDLIBRARY!$BLDLIBRARY$ac_delim
28475LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28476INSTSONAME!$INSTSONAME$ac_delim
28477RUNSHARED!$RUNSHARED$ac_delim
28478LINKCC!$LINKCC$ac_delim
28479GNULD!$GNULD$ac_delim
28480RANLIB!$RANLIB$ac_delim
28481AR!$AR$ac_delim
28482ARFLAGS!$ARFLAGS$ac_delim
28483SVNVERSION!$SVNVERSION$ac_delim
28484INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28485INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28486INSTALL_DATA!$INSTALL_DATA$ac_delim
28487LN!$LN$ac_delim
28488OPT!$OPT$ac_delim
28489BASECFLAGS!$BASECFLAGS$ac_delim
28490UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28491OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28492LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28493SO!$SO$ac_delim
28494LDSHARED!$LDSHARED$ac_delim
28495BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028497
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028498 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 +000028499 break
28500 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028501 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28502echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028503 { (exit 1); exit 1; }; }
28504 else
28505 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028506 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028507done
28508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028509ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28510if test -n "$ac_eof"; then
28511 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28512 ac_eof=`expr $ac_eof + 1`
28513fi
28514
28515cat >>$CONFIG_STATUS <<_ACEOF
28516cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28517/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028518_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028519sed '
28520s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28521s/^/s,@/; s/!/@,|#_!!_#|/
28522:n
28523t n
28524s/'"$ac_delim"'$/,g/; t
28525s/$/\\/; p
28526N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28527' >>$CONFIG_STATUS <conf$$subs.sed
28528rm -f conf$$subs.sed
28529cat >>$CONFIG_STATUS <<_ACEOF
28530CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028531_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028532
28533
28534ac_delim='%!_!# '
28535for ac_last_try in false false false false false :; do
28536 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028537CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028538LINKFORSHARED!$LINKFORSHARED$ac_delim
28539CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28540SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028541PKG_CONFIG!$PKG_CONFIG$ac_delim
28542LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028543USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28544SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28545USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28546LDLAST!$LDLAST$ac_delim
28547THREADOBJ!$THREADOBJ$ac_delim
28548DLINCLDIR!$DLINCLDIR$ac_delim
28549DYNLOADFILE!$DYNLOADFILE$ac_delim
28550MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28551TRUE!$TRUE$ac_delim
28552LIBOBJS!$LIBOBJS$ac_delim
28553HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28554HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28555HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28556HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28557HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28558LIBM!$LIBM$ac_delim
28559LIBC!$LIBC$ac_delim
28560UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28561THREADHEADERS!$THREADHEADERS$ac_delim
28562SRCDIRS!$SRCDIRS$ac_delim
28563LTLIBOBJS!$LTLIBOBJS$ac_delim
28564_ACEOF
28565
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028566 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028567 break
28568 elif $ac_last_try; then
28569 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28570echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028571 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028572 else
28573 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28574 fi
28575done
28576
28577ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28578if test -n "$ac_eof"; then
28579 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28580 ac_eof=`expr $ac_eof + 1`
28581fi
28582
28583cat >>$CONFIG_STATUS <<_ACEOF
28584cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28585/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028586_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028587sed '
28588s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28589s/^/s,@/; s/!/@,|#_!!_#|/
28590:n
28591t n
28592s/'"$ac_delim"'$/,g/; t
28593s/$/\\/; p
28594N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28595' >>$CONFIG_STATUS <conf$$subs.sed
28596rm -f conf$$subs.sed
28597cat >>$CONFIG_STATUS <<_ACEOF
28598:end
28599s/|#_!!_#|//g
28600CEOF$ac_eof
28601_ACEOF
28602
Martin v. Löwiseba40652007-08-30 20:10:57 +000028603
28604# VPATH may cause trouble with some makes, so we remove $(srcdir),
28605# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28606# trailing colons and then remove the whole line if VPATH becomes empty
28607# (actually we leave an empty line to preserve line numbers).
28608if test "x$srcdir" = x.; then
28609 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28610s/:*\$(srcdir):*/:/
28611s/:*\${srcdir}:*/:/
28612s/:*@srcdir@:*/:/
28613s/^\([^=]*=[ ]*\):*/\1/
28614s/:*$//
28615s/^[^=]*=[ ]*$//
28616}'
28617fi
28618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028619cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028620fi # test -n "$CONFIG_FILES"
28621
Martin v. Löwiseba40652007-08-30 20:10:57 +000028622
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028623for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028624do
28625 case $ac_tag in
28626 :[FHLC]) ac_mode=$ac_tag; continue;;
28627 esac
28628 case $ac_mode$ac_tag in
28629 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028630 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28631echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028632 { (exit 1); exit 1; }; };;
28633 :[FH]-) ac_tag=-:-;;
28634 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28635 esac
28636 ac_save_IFS=$IFS
28637 IFS=:
28638 set x $ac_tag
28639 IFS=$ac_save_IFS
28640 shift
28641 ac_file=$1
28642 shift
28643
28644 case $ac_mode in
28645 :L) ac_source=$1;;
28646 :[FH])
28647 ac_file_inputs=
28648 for ac_f
28649 do
28650 case $ac_f in
28651 -) ac_f="$tmp/stdin";;
28652 *) # Look for the file first in the build tree, then in the source tree
28653 # (if the path is not absolute). The absolute path cannot be DOS-style,
28654 # because $ac_f cannot contain `:'.
28655 test -f "$ac_f" ||
28656 case $ac_f in
28657 [\\/$]*) false;;
28658 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28659 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028660 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28661echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028662 { (exit 1); exit 1; }; };;
28663 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028664 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028665 done
28666
28667 # Let's still pretend it is `configure' which instantiates (i.e., don't
28668 # use $as_me), people would be surprised to read:
28669 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028670 configure_input="Generated from "`IFS=:
28671 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028672 if test x"$ac_file" != x-; then
28673 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028674 { echo "$as_me:$LINENO: creating $ac_file" >&5
28675echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028676 fi
28677
28678 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028679 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028680 esac
28681 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028682 esac
28683
Martin v. Löwiseba40652007-08-30 20:10:57 +000028684 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028685$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028686 X"$ac_file" : 'X\(//\)[^/]' \| \
28687 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028688 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028689echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028690 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28691 s//\1/
28692 q
28693 }
28694 /^X\(\/\/\)[^/].*/{
28695 s//\1/
28696 q
28697 }
28698 /^X\(\/\/\)$/{
28699 s//\1/
28700 q
28701 }
28702 /^X\(\/\).*/{
28703 s//\1/
28704 q
28705 }
28706 s/.*/./; q'`
28707 { as_dir="$ac_dir"
28708 case $as_dir in #(
28709 -*) as_dir=./$as_dir;;
28710 esac
28711 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028712 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028713 while :; do
28714 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028715 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028716 *) as_qdir=$as_dir;;
28717 esac
28718 as_dirs="'$as_qdir' $as_dirs"
28719 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028720$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028721 X"$as_dir" : 'X\(//\)[^/]' \| \
28722 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028723 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028724echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028725 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28726 s//\1/
28727 q
28728 }
28729 /^X\(\/\/\)[^/].*/{
28730 s//\1/
28731 q
28732 }
28733 /^X\(\/\/\)$/{
28734 s//\1/
28735 q
28736 }
28737 /^X\(\/\).*/{
28738 s//\1/
28739 q
28740 }
28741 s/.*/./; q'`
28742 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028743 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028744 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028745 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28746echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028747 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028748 ac_builddir=.
28749
Martin v. Löwiseba40652007-08-30 20:10:57 +000028750case "$ac_dir" in
28751.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28752*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028753 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028754 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028755 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028756 case $ac_top_builddir_sub in
28757 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28758 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28759 esac ;;
28760esac
28761ac_abs_top_builddir=$ac_pwd
28762ac_abs_builddir=$ac_pwd$ac_dir_suffix
28763# for backward compatibility:
28764ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028765
28766case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028767 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028768 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028769 ac_top_srcdir=$ac_top_builddir_sub
28770 ac_abs_top_srcdir=$ac_pwd ;;
28771 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028772 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028773 ac_top_srcdir=$srcdir
28774 ac_abs_top_srcdir=$srcdir ;;
28775 *) # Relative name.
28776 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28777 ac_top_srcdir=$ac_top_build_prefix$srcdir
28778 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028779esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028780ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028781
Martin v. Löwis11437992002-04-12 09:54:03 +000028782
Martin v. Löwiseba40652007-08-30 20:10:57 +000028783 case $ac_mode in
28784 :F)
28785 #
28786 # CONFIG_FILE
28787 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028788
28789 case $INSTALL in
28790 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028791 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028792 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028793_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028794
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028795cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028796# If the template does not know about datarootdir, expand it.
28797# FIXME: This hack should be removed a few years after 2.60.
28798ac_datarootdir_hack=; ac_datarootdir_seen=
28799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028800case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028801 p
28802 q
28803}
28804/@datadir@/p
28805/@docdir@/p
28806/@infodir@/p
28807/@localedir@/p
28808/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028809' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028810*datarootdir*) ac_datarootdir_seen=yes;;
28811*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028812 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28813echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028814_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028815cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028816 ac_datarootdir_hack='
28817 s&@datadir@&$datadir&g
28818 s&@docdir@&$docdir&g
28819 s&@infodir@&$infodir&g
28820 s&@localedir@&$localedir&g
28821 s&@mandir@&$mandir&g
28822 s&\\\${datarootdir}&$datarootdir&g' ;;
28823esac
28824_ACEOF
28825
28826# Neutralize VPATH when `$srcdir' = `.'.
28827# Shell code in configure.ac might set extrasub.
28828# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028829cat >>$CONFIG_STATUS <<_ACEOF
28830 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028831$extrasub
28832_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028833cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028834:t
28835/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028836s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028837s&@top_builddir@&$ac_top_builddir_sub&;t t
28838s&@srcdir@&$ac_srcdir&;t t
28839s&@abs_srcdir@&$ac_abs_srcdir&;t t
28840s&@top_srcdir@&$ac_top_srcdir&;t t
28841s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28842s&@builddir@&$ac_builddir&;t t
28843s&@abs_builddir@&$ac_abs_builddir&;t t
28844s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28845s&@INSTALL@&$ac_INSTALL&;t t
28846$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028847" $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 +000028848
Martin v. Löwiseba40652007-08-30 20:10:57 +000028849test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28850 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28851 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028852 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028853which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028854echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028855which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028856
Martin v. Löwiseba40652007-08-30 20:10:57 +000028857 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028858 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028859 -) cat "$tmp/out"; rm -f "$tmp/out";;
28860 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28861 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028862 ;;
28863 :H)
28864 #
28865 # CONFIG_HEADER
28866 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028867_ACEOF
28868
28869# Transform confdefs.h into a sed script `conftest.defines', that
28870# substitutes the proper values into config.h.in to produce config.h.
28871rm -f conftest.defines conftest.tail
28872# First, append a space to every undef/define line, to ease matching.
28873echo 's/$/ /' >conftest.defines
28874# Then, protect against being on the right side of a sed subst, or in
28875# an unquoted here document, in config.status. If some macros were
28876# called several times there might be several #defines for the same
28877# symbol, which is useless. But do not sort them, since the last
28878# AC_DEFINE must be honored.
28879ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28880# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28881# NAME is the cpp macro being defined, VALUE is the value it is being given.
28882# PARAMS is the parameter list in the macro definition--in most cases, it's
28883# just an empty string.
28884ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28885ac_dB='\\)[ (].*,\\1define\\2'
28886ac_dC=' '
28887ac_dD=' ,'
28888
28889uniq confdefs.h |
28890 sed -n '
28891 t rset
28892 :rset
28893 s/^[ ]*#[ ]*define[ ][ ]*//
28894 t ok
28895 d
28896 :ok
28897 s/[\\&,]/\\&/g
28898 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28899 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28900 ' >>conftest.defines
28901
28902# Remove the space that was appended to ease matching.
28903# Then replace #undef with comments. This is necessary, for
28904# example, in the case of _POSIX_SOURCE, which is predefined and required
28905# on some systems where configure will not decide to define it.
28906# (The regexp can be short, since the line contains either #define or #undef.)
28907echo 's/ $//
28908s,^[ #]*u.*,/* & */,' >>conftest.defines
28909
28910# Break up conftest.defines:
28911ac_max_sed_lines=50
28912
28913# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28914# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28915# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28916# et cetera.
28917ac_in='$ac_file_inputs'
28918ac_out='"$tmp/out1"'
28919ac_nxt='"$tmp/out2"'
28920
28921while :
28922do
28923 # Write a here document:
28924 cat >>$CONFIG_STATUS <<_ACEOF
28925 # First, check the format of the line:
28926 cat >"\$tmp/defines.sed" <<\\CEOF
28927/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28928/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28929b
28930:def
28931_ACEOF
28932 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28933 echo 'CEOF
28934 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28935 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28936 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28937 grep . conftest.tail >/dev/null || break
28938 rm -f conftest.defines
28939 mv conftest.tail conftest.defines
28940done
28941rm -f conftest.defines conftest.tail
28942
28943echo "ac_result=$ac_in" >>$CONFIG_STATUS
28944cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028945 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028946 echo "/* $configure_input */" >"$tmp/config.h"
28947 cat "$ac_result" >>"$tmp/config.h"
28948 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28949 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28950echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028951 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028952 rm -f $ac_file
28953 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028954 fi
28955 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028956 echo "/* $configure_input */"
28957 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028958 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028959 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028960 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028961
Martin v. Löwiseba40652007-08-30 20:10:57 +000028962
28963 esac
28964
28965done # for ac_tag
28966
Guido van Rossum627b2d71993-12-24 10:39:16 +000028967
Martin v. Löwis11437992002-04-12 09:54:03 +000028968{ (exit 0); exit 0; }
28969_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028970chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028971ac_clean_files=$ac_clean_files_save
28972
28973
28974# configure is writing to config.log, and then calls config.status.
28975# config.status does its own redirection, appending to config.log.
28976# Unfortunately, on DOS this fails, as config.log is still kept open
28977# by configure, so config.status won't be able to write to it; its
28978# output is simply discarded. So we exec the FD to /dev/null,
28979# effectively closing config.log, so it can be properly (re)opened and
28980# appended to by config.status. When coming back to configure, we
28981# need to make the FD available again.
28982if test "$no_create" != yes; then
28983 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028984 ac_config_status_args=
28985 test "$silent" = yes &&
28986 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028987 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028988 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028989 exec 5>>config.log
28990 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28991 # would make configure fail if this is the last instruction.
28992 $ac_cs_success || { (exit 1); exit 1; }
28993fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028994
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028995
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028996echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028997if test ! -f Modules/Setup
28998then
28999 cp $srcdir/Modules/Setup.dist Modules/Setup
29000fi
29001
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029002echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029003if test ! -f Modules/Setup.local
29004then
29005 echo "# Edit this file for local setup changes" >Modules/Setup.local
29006fi
29007
29008echo "creating Makefile"
29009$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29010 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029011 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029012
29013case $ac_sys_system in
29014BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029015 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029016
29017 Support for BeOS is deprecated as of Python 2.6.
29018 See PEP 11 for the gory details.
29019 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029020echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029021
29022 Support for BeOS is deprecated as of Python 2.6.
29023 See PEP 11 for the gory details.
29024 " >&2;}
29025 ;;
29026*) ;;
29027esac
29028
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029029mv config.c Modules