blob: fc18e069bc7a4238fce95de7746a5cfede1b530d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorend5736812010-02-07 12:04:41 +00002# From configure.in Revision: 78068 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004# Generated by GNU Autoconf 2.61 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10: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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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=:
Ronald Oussoren5644eb72009-09-20 20:10: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+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10: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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +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.
Ronald Oussoren5644eb72009-09-20 20:10: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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +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=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +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=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10: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+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +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.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10: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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren5644eb72009-09-20 20:10: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'
Ronald Oussoren5644eb72009-09-20 20:10: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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +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'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000578PACKAGE_VERSION='3.1'
579PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +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>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000619ac_subst_vars='SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +0000620PATH_SEPARATOR
Ronald Oussoren5644eb72009-09-20 20:10: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
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001158 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 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001249\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001310 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001441python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Christian Heimes70e5cab2008-12-03 18:18:23 +00001455It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$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 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# 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 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$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 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Christian Heimes70e5cab2008-12-03 18:18:23 +00001829VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Ronald Oussorend5736812010-02-07 12:04:41 +00001884{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1885echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001888 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001889 case $enableval in
1890 yes)
1891 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00001892 if test ! -d "${enableval}"
1893 then
1894 enableval=/
1895 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001896 ;;
1897 esac
1898 case $enableval in
1899 no)
1900 UNIVERSALSDK=
1901 enable_universalsdk=
1902 ;;
1903 *)
1904 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00001905 if test ! -d "${UNIVERSALSDK}"
1906 then
1907 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1908echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1909 { (exit 1); exit 1; }; }
1910 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001911 ;;
1912 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001913
Ronald Oussorend5736812010-02-07 12:04:41 +00001914
Thomas Wouters477c8d52006-05-27 19:21:47 +00001915else
1916
1917 UNIVERSALSDK=
1918 enable_universalsdk=
1919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001920fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921
Ronald Oussorend5736812010-02-07 12:04:41 +00001922if test -n "${UNIVERSALSDK}"
1923then
1924 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1925echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1926else
1927 { echo "$as_me:$LINENO: result: no" >&5
1928echo "${ECHO_T}no" >&6; }
1929fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001931
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001932
1933
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001934UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001935{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1936echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001937
1938# Check whether --with-universal-archs was given.
1939if test "${with_universal_archs+set}" = set; then
1940 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001941 { echo "$as_me:$LINENO: result: $withval" >&5
1942echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943 UNIVERSAL_ARCHS="$withval"
1944
1945else
1946
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001947 { echo "$as_me:$LINENO: result: 32-bit" >&5
1948echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949
1950fi
1951
1952
1953
1954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001955
1956# Check whether --with-framework-name was given.
1957if test "${with_framework_name+set}" = set; then
1958 withval=$with_framework_name;
1959 PYTHONFRAMEWORK=${withval}
1960 PYTHONFRAMEWORKDIR=${withval}.framework
1961 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1962
1963else
1964
1965 PYTHONFRAMEWORK=Python
1966 PYTHONFRAMEWORKDIR=Python.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1968
1969fi
1970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001971# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001972if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001973 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001974 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001975 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001976 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001977 esac
1978 case $enableval in
1979 no)
1980 PYTHONFRAMEWORK=
1981 PYTHONFRAMEWORKDIR=no-framework
1982 PYTHONFRAMEWORKPREFIX=
1983 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001984 FRAMEWORKINSTALLFIRST=
1985 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001986 FRAMEWORKALTINSTALLFIRST=
1987 FRAMEWORKALTINSTALLLAST=
1988 if test "x${prefix}" = "xNONE"; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001994 ;;
1995 *)
1996 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001999 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002000 if test "$UNIVERSAL_ARCHS" = "all"
2001 then
2002 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002003 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002004 else
Ronald Oussorene3918352009-03-30 18:00:28 +00002005 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002006 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2007 fi
2008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045 if test "$UNIVERSAL_ARCHS" = "all"
2046 then
2047 FRAMEWORKINSTALLLAST=update4wayuniversal
2048 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2049 fi
2050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002051fi
2052
Thomas Wouters477c8d52006-05-27 19:21:47 +00002053
2054
Michael W. Hudson54241132001-12-07 15:38:26 +00002055
2056
2057
2058
Jack Jansene578a632001-08-15 01:27:14 +00002059
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002060
2061
2062
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002063
Jack Jansene578a632001-08-15 01:27:14 +00002064##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002065## AC_HELP_STRING(--with-dyld,
2066## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002067##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002068# Set name for machine-dependent library files
2069
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002070{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2071echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072if test -z "$MACHDEP"
2073then
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002075 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002076 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002080 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002081 ac_md_system=`echo $ac_sys_system |
2082 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2083 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002084 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002085 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002086
Guido van Rossum07397971997-04-29 21:49:50 +00002087 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002088 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002089 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002090 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002091 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002092 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002093 esac
2094fi
Guido van Rossum91922671997-10-09 20:24:13 +00002095
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002096# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2097# disable features if it is defined, without any means to access these
2098# features as extensions. For these systems, we skip the definition of
2099# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2100# some feature, make sure there is no alternative way to access this
2101# feature. Also, when using wildcards, make sure you have verified the
2102# need for not defining _XOPEN_SOURCE on all systems matching the
2103# wildcard, and that the wildcard does not include future systems
2104# (which may remove their limitations).
2105case $ac_sys_system/$ac_sys_release in
2106 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2107 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002108 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002109 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002110 define_xopen_source=no
2111 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2112 # also defined. This can be overridden by defining _BSD_SOURCE
2113 # As this has a different meaning on Linux, only define it on OpenBSD
2114
2115cat >>confdefs.h <<\_ACEOF
2116#define _BSD_SOURCE 1
2117_ACEOF
2118
2119 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002120 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2121 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2122 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002123 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002124 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002125 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2126 # of union __?sigval. Reported by Stuart Bishop.
2127 SunOS/5.6)
2128 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002129 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2130 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002131 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002132 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002133 define_xopen_source=no;;
2134 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002135 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002136 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002137 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002138 # On FreeBSD 4, the math functions C89 does not cover are never defined
2139 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2140 FreeBSD/4.*)
2141 define_xopen_source=no;;
2142 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2143 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2144 # identifies itself as Darwin/7.*
2145 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2146 # disables platform specific features beyond repair.
2147 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2148 # has no effect, don't bother defining them
2149 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002150 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002151 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2152 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2153 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002154 AIX/4)
2155 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002156 AIX/5)
2157 if test `uname -r` -eq 1; then
2158 define_xopen_source=no
2159 fi
2160 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002161 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2162 # defining NI_NUMERICHOST.
2163 QNX/6.3.2)
2164 define_xopen_source=no
2165 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002166
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002167esac
2168
2169if test $define_xopen_source = yes
2170then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002171 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2172 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2174 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002175 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002176 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002177
2178cat >>confdefs.h <<\_ACEOF
2179#define _XOPEN_SOURCE 500
2180_ACEOF
2181
2182 ;;
2183 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002184
2185cat >>confdefs.h <<\_ACEOF
2186#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187_ACEOF
2188
Skip Montanarof0d5f792004-08-15 14:08:23 +00002189 ;;
2190 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002191
2192 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2193 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2194 # several APIs are not declared. Since this is also needed in some
2195 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002196 # except for Solaris 10, where it must not be defined,
2197 # as it implies XPG4.2
2198 case $ac_sys_system/$ac_sys_release in
2199 SunOS/5.10)
2200 ;;
2201 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002202
2203cat >>confdefs.h <<\_ACEOF
2204#define _XOPEN_SOURCE_EXTENDED 1
2205_ACEOF
2206
Martin v. Löwis7dece662005-11-26 11:38:24 +00002207 ;;
2208 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002209
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002210
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211cat >>confdefs.h <<\_ACEOF
2212#define _POSIX_C_SOURCE 200112L
2213_ACEOF
2214
2215
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002216fi
2217
Guido van Rossum91922671997-10-09 20:24:13 +00002218#
2219# SGI compilers allow the specification of the both the ABI and the
2220# ISA on the command line. Depending on the values of these switches,
2221# different and often incompatable code will be generated.
2222#
2223# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2224# thus supply support for various ABI/ISA combinations. The MACHDEP
2225# variable is also adjusted.
2226#
2227
2228if test ! -z "$SGI_ABI"
2229then
2230 CC="cc $SGI_ABI"
2231 LDFLAGS="$SGI_ABI $LDFLAGS"
2232 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2233fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002234{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2235echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002236
Jack Jansen6b08a402004-06-03 12:41:45 +00002237# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2238# it may influence the way we can build extensions, so distutils
2239# needs to check it
2240
Thomas Wouters477c8d52006-05-27 19:21:47 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002243EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002244
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002245{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2246echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002247ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002248{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2249echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002250
Guido van Rossum627b2d71993-12-24 10:39:16 +00002251# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002252
2253# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2254# for debug/optimization stuff. BASECFLAGS is for flags that are required
2255# just to get things to compile and link. Users are free to override OPT
2256# when running configure or make. The build should not break if they do.
2257# BASECFLAGS should generally not be messed with, however.
2258
2259# XXX shouldn't some/most/all of this code be merged with the stuff later
2260# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002261{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2262echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002264# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002265if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002266 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002268 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002269 without_gcc=yes;;
2270 yes) CC=gcc
2271 without_gcc=no;;
2272 *) CC=$withval
2273 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002274 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275else
Martin v. Löwis11437992002-04-12 09:54:03 +00002276
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002277 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002278 AIX*) CC=cc_r
2279 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002280 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002281 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002282fi
2283
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002284{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2285echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002286
Guido van Rossum8b131c51995-03-09 14:10:13 +00002287# If the user switches compilers, we can't believe the cache
2288if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2289then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002290 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002291(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002292echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002293(it is also a good idea to do 'make clean' before compiling)" >&2;}
2294 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002295fi
2296
Martin v. Löwis11437992002-04-12 09:54:03 +00002297ac_ext=c
2298ac_cpp='$CPP $CPPFLAGS'
2299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2301ac_compiler_gnu=$ac_cv_c_compiler_gnu
2302if test -n "$ac_tool_prefix"; then
2303 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2304set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002305{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002309else
2310 if test -n "$CC"; then
2311 ac_cv_prog_CC="$CC" # Let the user override the test.
2312else
Martin v. Löwis11437992002-04-12 09:54:03 +00002313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2314for as_dir in $PATH
2315do
2316 IFS=$as_save_IFS
2317 test -z "$as_dir" && as_dir=.
2318 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002319 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 +00002320 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002321 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002322 break 2
2323 fi
2324done
2325done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002326IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002327
Jack Jansendd19cf82001-12-06 22:36:17 +00002328fi
2329fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002330CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002332 { echo "$as_me:$LINENO: result: $CC" >&5
2333echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002334else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002335 { echo "$as_me:$LINENO: result: no" >&5
2336echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337fi
2338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339
Martin v. Löwis11437992002-04-12 09:54:03 +00002340fi
2341if test -z "$ac_cv_prog_CC"; then
2342 ac_ct_CC=$CC
2343 # Extract the first word of "gcc", so it can be a program name with args.
2344set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002345{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002348 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002349else
2350 if test -n "$ac_ct_CC"; then
2351 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2352else
2353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2354for as_dir in $PATH
2355do
2356 IFS=$as_save_IFS
2357 test -z "$as_dir" && as_dir=.
2358 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359 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 +00002360 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002361 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002362 break 2
2363 fi
2364done
2365done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002367
2368fi
2369fi
2370ac_ct_CC=$ac_cv_prog_ac_ct_CC
2371if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002372 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2373echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002374else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002375 { echo "$as_me:$LINENO: result: no" >&5
2376echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377fi
2378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379 if test "x$ac_ct_CC" = x; then
2380 CC=""
2381 else
2382 case $cross_compiling:$ac_tool_warned in
2383yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002384{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2385whose name does not start with the host triplet. If you think this
2386configuration is useful to you, please write to autoconf@gnu.org." >&5
2387echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2388whose name does not start with the host triplet. If you think this
2389configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390ac_tool_warned=yes ;;
2391esac
2392 CC=$ac_ct_CC
2393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002394else
2395 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002396fi
2397
Jack Jansendd19cf82001-12-06 22:36:17 +00002398if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399 if test -n "$ac_tool_prefix"; then
2400 # 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 +00002401set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002402{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002404if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002405 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002406else
2407 if test -n "$CC"; then
2408 ac_cv_prog_CC="$CC" # Let the user override the test.
2409else
Martin v. Löwis11437992002-04-12 09:54:03 +00002410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2411for as_dir in $PATH
2412do
2413 IFS=$as_save_IFS
2414 test -z "$as_dir" && as_dir=.
2415 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416 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 +00002417 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002418 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002419 break 2
2420 fi
2421done
2422done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002424
2425fi
2426fi
2427CC=$ac_cv_prog_CC
2428if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002429 { echo "$as_me:$LINENO: result: $CC" >&5
2430echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002431else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002432 { echo "$as_me:$LINENO: result: no" >&5
2433echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002434fi
2435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002438fi
2439if test -z "$CC"; then
2440 # Extract the first word of "cc", so it can be a program name with args.
2441set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002442{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2443echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002445 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002446else
2447 if test -n "$CC"; then
2448 ac_cv_prog_CC="$CC" # Let the user override the test.
2449else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002450 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2452for as_dir in $PATH
2453do
2454 IFS=$as_save_IFS
2455 test -z "$as_dir" && as_dir=.
2456 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 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 +00002458 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2459 ac_prog_rejected=yes
2460 continue
2461 fi
2462 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002463 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 break 2
2465 fi
2466done
2467done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002469
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470if test $ac_prog_rejected = yes; then
2471 # We found a bogon in the path, so make sure we never use it.
2472 set dummy $ac_cv_prog_CC
2473 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002475 # We chose a different compiler from the bogus one.
2476 # However, it has the same basename, so the bogon will be chosen
2477 # first if we set CC to just the basename; use the full file name.
2478 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002480 fi
2481fi
2482fi
2483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002484CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002485if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002486 { echo "$as_me:$LINENO: result: $CC" >&5
2487echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002489 { echo "$as_me:$LINENO: result: no" >&5
2490echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002491fi
2492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493
Martin v. Löwis11437992002-04-12 09:54:03 +00002494fi
2495if test -z "$CC"; then
2496 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 do
2499 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002501{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2502echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002503if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002505else
2506 if test -n "$CC"; then
2507 ac_cv_prog_CC="$CC" # Let the user override the test.
2508else
Martin v. Löwis11437992002-04-12 09:54:03 +00002509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2510for as_dir in $PATH
2511do
2512 IFS=$as_save_IFS
2513 test -z "$as_dir" && as_dir=.
2514 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 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 +00002516 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002517 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002519 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002520done
2521done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002523
2524fi
2525fi
2526CC=$ac_cv_prog_CC
2527if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002528 { echo "$as_me:$LINENO: result: $CC" >&5
2529echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002530else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002531 { echo "$as_me:$LINENO: result: no" >&5
2532echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002533fi
2534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 test -n "$CC" && break
2537 done
2538fi
2539if test -z "$CC"; then
2540 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002542do
2543 # Extract the first word of "$ac_prog", so it can be a program name with args.
2544set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002545{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2546echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002549else
2550 if test -n "$ac_ct_CC"; then
2551 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2552else
2553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2554for as_dir in $PATH
2555do
2556 IFS=$as_save_IFS
2557 test -z "$as_dir" && as_dir=.
2558 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 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 +00002560 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002561 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 break 2
2563 fi
2564done
2565done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568fi
2569fi
2570ac_ct_CC=$ac_cv_prog_ac_ct_CC
2571if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002572 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2573echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002574else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002575 { echo "$as_me:$LINENO: result: no" >&5
2576echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 test -n "$ac_ct_CC" && break
2581done
Michael W. Hudson54241132001-12-07 15:38:26 +00002582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 if test "x$ac_ct_CC" = x; then
2584 CC=""
2585 else
2586 case $cross_compiling:$ac_tool_warned in
2587yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002588{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2589whose name does not start with the host triplet. If you think this
2590configuration is useful to you, please write to autoconf@gnu.org." >&5
2591echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2592whose name does not start with the host triplet. If you think this
2593configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594ac_tool_warned=yes ;;
2595esac
2596 CC=$ac_ct_CC
2597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002598fi
2599
2600fi
2601
2602
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002603test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002604See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002605echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002606See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002607 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002608
2609# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002610echo "$as_me:$LINENO: checking for C compiler version" >&5
2611ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612{ (ac_try="$ac_compiler --version >&5"
2613case "(($ac_try" in
2614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2615 *) ac_try_echo=$ac_try;;
2616esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622{ (ac_try="$ac_compiler -v >&5"
2623case "(($ac_try" in
2624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2625 *) ac_try_echo=$ac_try;;
2626esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler -V >&5"
2633case "(($ac_try" in
2634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635 *) ac_try_echo=$ac_try;;
2636esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 (exit $ac_status); }
2642
2643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002644/* confdefs.h. */
2645_ACEOF
2646cat confdefs.h >>conftest.$ac_ext
2647cat >>conftest.$ac_ext <<_ACEOF
2648/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650int
2651main ()
2652{
2653
2654 ;
2655 return 0;
2656}
2657_ACEOF
2658ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002659ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002660# Try to create an executable without -o first, disregard a.out.
2661# It will help us diagnose broken compilers, and finding out an intuition
2662# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002663{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2664echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2665ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2666#
2667# List of possible output files, starting from the most likely.
2668# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2669# only as a last resort. b.out is created by i960 compilers.
2670ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2671#
2672# The IRIX 6 linker writes into existing files which may not be
2673# executable, retaining their permissions. Remove them first so a
2674# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675ac_rmfiles=
2676for ac_file in $ac_files
2677do
2678 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002679 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2681 esac
2682done
2683rm -f $ac_rmfiles
2684
2685if { (ac_try="$ac_link_default"
2686case "(($ac_try" in
2687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688 *) ac_try_echo=$ac_try;;
2689esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2696# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2697# in a Makefile. We should not override ac_cv_exeext if it was cached,
2698# so that the user can short-circuit this test for compilers unknown to
2699# Autoconf.
2700for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002701do
2702 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002704 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002705 ;;
2706 [ab].out )
2707 # We found the default executable, but exeext='' is most
2708 # certainly right.
2709 break;;
2710 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2712 then :; else
2713 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2714 fi
2715 # We set ac_cv_exeext here because the later test for it is not
2716 # safe: cross compilers may not add the suffix if given an `-o'
2717 # argument, so we may need to know it at that point already.
2718 # Even if this section looks crufty: it has the advantage of
2719 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002720 break;;
2721 * )
2722 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 esac
2724done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725test "$ac_cv_exeext" = no && ac_cv_exeext=
2726
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002727else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728 ac_file=''
2729fi
2730
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002731{ echo "$as_me:$LINENO: result: $ac_file" >&5
2732echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002735sed 's/^/| /' conftest.$ac_ext >&5
2736
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002737{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002738See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002739echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002740See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002741 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002742fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002743
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002744ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002747# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002748{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2749echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002750# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2751# If not cross compiling, check that we can run a simple program.
2752if test "$cross_compiling" != yes; then
2753 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754 { (case "(($ac_try" in
2755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756 *) ac_try_echo=$ac_try;;
2757esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002762 (exit $ac_status); }; }; then
2763 cross_compiling=no
2764 else
2765 if test "$cross_compiling" = maybe; then
2766 cross_compiling=yes
2767 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002768 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002769If you meant to cross compile, use \`--host'.
2770See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002771echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002772If you meant to cross compile, use \`--host'.
2773See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002774 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 fi
2776 fi
2777fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002778{ echo "$as_me:$LINENO: result: yes" >&5
2779echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002780
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002781rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002782ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002783# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002784# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002785{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2786echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2787{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2788echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002789
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002790{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2791echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792if { (ac_try="$ac_link"
2793case "(($ac_try" in
2794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2795 *) ac_try_echo=$ac_try;;
2796esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002799 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002801 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2803# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2804# work properly (i.e., refer to `conftest.exe'), while it won't with
2805# `rm'.
2806for ac_file in conftest.exe conftest conftest.*; do
2807 test -f "$ac_file" || continue
2808 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002809 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002810 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2811 break;;
2812 * ) break;;
2813 esac
2814done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002816 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002817See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002818echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002819See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002820 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002821fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002822
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002823rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002824{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2825echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002826
2827rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002828EXEEXT=$ac_cv_exeext
2829ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002830{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2831echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002832if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002833 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002834else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002835 cat >conftest.$ac_ext <<_ACEOF
2836/* confdefs.h. */
2837_ACEOF
2838cat confdefs.h >>conftest.$ac_ext
2839cat >>conftest.$ac_ext <<_ACEOF
2840/* end confdefs.h. */
2841
2842int
2843main ()
2844{
2845
2846 ;
2847 return 0;
2848}
2849_ACEOF
2850rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851if { (ac_try="$ac_compile"
2852case "(($ac_try" in
2853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2854 *) ac_try_echo=$ac_try;;
2855esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861 for ac_file in conftest.o conftest.obj conftest.*; do
2862 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002863 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002864 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2866 break;;
2867 esac
2868done
2869else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002871sed 's/^/| /' conftest.$ac_ext >&5
2872
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002873{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002874See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002875echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002876See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002877 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878fi
2879
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002880rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002881fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002882{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2883echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002884OBJEXT=$ac_cv_objext
2885ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002886{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2887echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002888if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002890else
2891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002892/* confdefs.h. */
2893_ACEOF
2894cat confdefs.h >>conftest.$ac_ext
2895cat >>conftest.$ac_ext <<_ACEOF
2896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898int
2899main ()
2900{
2901#ifndef __GNUC__
2902 choke me
2903#endif
2904
2905 ;
2906 return 0;
2907}
2908_ACEOF
2909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910if { (ac_try="$ac_compile"
2911case "(($ac_try" in
2912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2913 *) ac_try_echo=$ac_try;;
2914esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002918 grep -v '^ *+' conftest.er1 >conftest.err
2919 rm -f conftest.er1
2920 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002922 (exit $ac_status); } && {
2923 test -z "$ac_c_werror_flag" ||
2924 test ! -s conftest.err
2925 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002926 ac_compiler_gnu=yes
2927else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002929sed 's/^/| /' conftest.$ac_ext >&5
2930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002933
2934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002935ac_cv_c_compiler_gnu=$ac_compiler_gnu
2936
2937fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002938{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2939echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2940GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002941ac_test_CFLAGS=${CFLAGS+set}
2942ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002943{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2944echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002945if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002946 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002948 ac_save_c_werror_flag=$ac_c_werror_flag
2949 ac_c_werror_flag=yes
2950 ac_cv_prog_cc_g=no
2951 CFLAGS="-g"
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
2963 ;
2964 return 0;
2965}
2966_ACEOF
2967rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968if { (ac_try="$ac_compile"
2969case "(($ac_try" in
2970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2971 *) ac_try_echo=$ac_try;;
2972esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002974 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002976 grep -v '^ *+' conftest.er1 >conftest.err
2977 rm -f conftest.er1
2978 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002980 (exit $ac_status); } && {
2981 test -z "$ac_c_werror_flag" ||
2982 test ! -s conftest.err
2983 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002984 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002985else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002987sed 's/^/| /' conftest.$ac_ext >&5
2988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 CFLAGS=""
2990 cat >conftest.$ac_ext <<_ACEOF
2991/* confdefs.h. */
2992_ACEOF
2993cat confdefs.h >>conftest.$ac_ext
2994cat >>conftest.$ac_ext <<_ACEOF
2995/* end confdefs.h. */
2996
2997int
2998main ()
2999{
3000
3001 ;
3002 return 0;
3003}
3004_ACEOF
3005rm -f conftest.$ac_objext
3006if { (ac_try="$ac_compile"
3007case "(($ac_try" in
3008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3009 *) ac_try_echo=$ac_try;;
3010esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003012 (eval "$ac_compile") 2>conftest.er1
3013 ac_status=$?
3014 grep -v '^ *+' conftest.er1 >conftest.err
3015 rm -f conftest.er1
3016 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 (exit $ac_status); } && {
3019 test -z "$ac_c_werror_flag" ||
3020 test ! -s conftest.err
3021 } && test -s conftest.$ac_objext; then
3022 :
3023else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003024 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003025sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 ac_c_werror_flag=$ac_save_c_werror_flag
3028 CFLAGS="-g"
3029 cat >conftest.$ac_ext <<_ACEOF
3030/* confdefs.h. */
3031_ACEOF
3032cat confdefs.h >>conftest.$ac_ext
3033cat >>conftest.$ac_ext <<_ACEOF
3034/* end confdefs.h. */
3035
3036int
3037main ()
3038{
3039
3040 ;
3041 return 0;
3042}
3043_ACEOF
3044rm -f conftest.$ac_objext
3045if { (ac_try="$ac_compile"
3046case "(($ac_try" in
3047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3048 *) ac_try_echo=$ac_try;;
3049esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051 (eval "$ac_compile") 2>conftest.er1
3052 ac_status=$?
3053 grep -v '^ *+' conftest.er1 >conftest.err
3054 rm -f conftest.er1
3055 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057 (exit $ac_status); } && {
3058 test -z "$ac_c_werror_flag" ||
3059 test ! -s conftest.err
3060 } && test -s conftest.$ac_objext; then
3061 ac_cv_prog_cc_g=yes
3062else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003063 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003064sed 's/^/| /' conftest.$ac_ext >&5
3065
3066
Guido van Rossum627b2d71993-12-24 10:39:16 +00003067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071
3072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3073fi
3074
3075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3076 ac_c_werror_flag=$ac_save_c_werror_flag
3077fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003078{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3079echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003080if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003081 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003082elif test $ac_cv_prog_cc_g = yes; then
3083 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003084 CFLAGS="-g -O2"
3085 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003086 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003087 fi
3088else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003089 if test "$GCC" = yes; then
3090 CFLAGS="-O2"
3091 else
3092 CFLAGS=
3093 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003094fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003095{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3096echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003098 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003099else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003100 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003101ac_save_CC=$CC
3102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003103/* confdefs.h. */
3104_ACEOF
3105cat confdefs.h >>conftest.$ac_ext
3106cat >>conftest.$ac_ext <<_ACEOF
3107/* end confdefs.h. */
3108#include <stdarg.h>
3109#include <stdio.h>
3110#include <sys/types.h>
3111#include <sys/stat.h>
3112/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3113struct buf { int x; };
3114FILE * (*rcsopen) (struct buf *, struct stat *, int);
3115static char *e (p, i)
3116 char **p;
3117 int i;
3118{
3119 return p[i];
3120}
3121static char *f (char * (*g) (char **, int), char **p, ...)
3122{
3123 char *s;
3124 va_list v;
3125 va_start (v,p);
3126 s = g (p, va_arg (v,int));
3127 va_end (v);
3128 return s;
3129}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003130
3131/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3132 function prototypes and stuff, but not '\xHH' hex character constants.
3133 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003134 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003135 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3136 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003138int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3141 inside strings and character constants. */
3142#define FOO(x) 'x'
3143int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3144
Skip Montanaro6dead952003-09-25 14:50:04 +00003145int test (int i, double x);
3146struct s1 {int (*f) (int a);};
3147struct s2 {int (*f) (double a);};
3148int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3149int argc;
3150char **argv;
3151int
3152main ()
3153{
3154return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3155 ;
3156 return 0;
3157}
3158_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3160 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003161do
3162 CC="$ac_save_CC $ac_arg"
3163 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164if { (ac_try="$ac_compile"
3165case "(($ac_try" in
3166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3167 *) ac_try_echo=$ac_try;;
3168esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003172 grep -v '^ *+' conftest.er1 >conftest.err
3173 rm -f conftest.er1
3174 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176 (exit $ac_status); } && {
3177 test -z "$ac_c_werror_flag" ||
3178 test ! -s conftest.err
3179 } && test -s conftest.$ac_objext; then
3180 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003181else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003183sed 's/^/| /' conftest.$ac_ext >&5
3184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185
Skip Montanaro6dead952003-09-25 14:50:04 +00003186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187
3188rm -f core conftest.err conftest.$ac_objext
3189 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003190done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003192CC=$ac_save_CC
3193
3194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195# AC_CACHE_VAL
3196case "x$ac_cv_prog_cc_c89" in
3197 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003198 { echo "$as_me:$LINENO: result: none needed" >&5
3199echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003201 { echo "$as_me:$LINENO: result: unsupported" >&5
3202echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003203 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003205 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3206echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003207esac
3208
Skip Montanaro6dead952003-09-25 14:50:04 +00003209
Martin v. Löwis11437992002-04-12 09:54:03 +00003210ac_ext=c
3211ac_cpp='$CPP $CPPFLAGS'
3212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3214ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003215
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003216
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003217
3218
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003219{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3220echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003223if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
3226 case $withval in
3227 no) with_cxx_main=no
3228 MAINCC='$(CC)';;
3229 yes) with_cxx_main=yes
3230 MAINCC='$(CXX)';;
3231 *) with_cxx_main=yes
3232 MAINCC=$withval
3233 if test -z "$CXX"
3234 then
3235 CXX=$withval
3236 fi;;
3237 esac
3238else
3239
3240 with_cxx_main=no
3241 MAINCC='$(CC)'
3242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243fi
3244
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003245{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3246echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003247
3248preset_cxx="$CXX"
3249if test -z "$CXX"
3250then
3251 case "$CC" in
3252 gcc) # Extract the first word of "g++", so it can be a program name with args.
3253set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003254{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3255echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003256if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003257 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003258else
3259 case $CXX in
3260 [\\/]* | ?:[\\/]*)
3261 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3262 ;;
3263 *)
3264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3265for as_dir in notfound
3266do
3267 IFS=$as_save_IFS
3268 test -z "$as_dir" && as_dir=.
3269 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003271 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003273 break 2
3274 fi
3275done
3276done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278
3279 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3280 ;;
3281esac
3282fi
3283CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003284if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003285 { echo "$as_me:$LINENO: result: $CXX" >&5
3286echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003287else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003288 { echo "$as_me:$LINENO: result: no" >&5
3289echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292 ;;
3293 cc) # Extract the first word of "c++", so it can be a program name with args.
3294set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003295{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003297if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003298 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003299else
3300 case $CXX in
3301 [\\/]* | ?:[\\/]*)
3302 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3303 ;;
3304 *)
3305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306for as_dir in notfound
3307do
3308 IFS=$as_save_IFS
3309 test -z "$as_dir" && as_dir=.
3310 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003313 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003314 break 2
3315 fi
3316done
3317done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003318IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319
3320 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3321 ;;
3322esac
3323fi
3324CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003325if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003326 { echo "$as_me:$LINENO: result: $CXX" >&5
3327echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003328else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003329 { echo "$as_me:$LINENO: result: no" >&5
3330echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003333 ;;
3334 esac
3335 if test "$CXX" = "notfound"
3336 then
3337 CXX=""
3338 fi
3339fi
3340if test -z "$CXX"
3341then
3342 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3343do
3344 # Extract the first word of "$ac_prog", so it can be a program name with args.
3345set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003346{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003348if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003349 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003350else
3351 if test -n "$CXX"; then
3352 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3353else
3354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 test -z "$as_dir" && as_dir=.
3359 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003361 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003363 break 2
3364 fi
3365done
3366done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003368
3369fi
3370fi
3371CXX=$ac_cv_prog_CXX
3372if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003373 { echo "$as_me:$LINENO: result: $CXX" >&5
3374echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003376 { echo "$as_me:$LINENO: result: no" >&5
3377echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003378fi
3379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003381 test -n "$CXX" && break
3382done
3383test -n "$CXX" || CXX="notfound"
3384
3385 if test "$CXX" = "notfound"
3386 then
3387 CXX=""
3388 fi
3389fi
3390if test "$preset_cxx" != "$CXX"
3391then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003392 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003393
3394 By default, distutils will build C++ extension modules with \"$CXX\".
3395 If this is not intended, then set CXX on the configure command line.
3396 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003397echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003398
3399 By default, distutils will build C++ extension modules with \"$CXX\".
3400 If this is not intended, then set CXX on the configure command line.
3401 " >&2;}
3402fi
3403
3404
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003405# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003406
3407ac_ext=c
3408ac_cpp='$CPP $CPPFLAGS'
3409ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3410ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3411ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003412{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3413echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003414# On Suns, sometimes $CPP names a directory.
3415if test -n "$CPP" && test -d "$CPP"; then
3416 CPP=
3417fi
3418if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003420 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003421else
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 # Double quotes because CPP needs to be expanded
3423 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3424 do
3425 ac_preproc_ok=false
3426for ac_c_preproc_warn_flag in '' yes
3427do
3428 # Use a header file that comes with gcc, so configuring glibc
3429 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003430 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3431 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003432 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # not just through cpp. "Syntax error" is here to catch this case.
3434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003435/* confdefs.h. */
3436_ACEOF
3437cat confdefs.h >>conftest.$ac_ext
3438cat >>conftest.$ac_ext <<_ACEOF
3439/* end confdefs.h. */
3440#ifdef __STDC__
3441# include <limits.h>
3442#else
3443# include <assert.h>
3444#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003445 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003446_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447if { (ac_try="$ac_cpp conftest.$ac_ext"
3448case "(($ac_try" in
3449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3450 *) ac_try_echo=$ac_try;;
3451esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003455 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003456 rm -f conftest.er1
3457 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459 (exit $ac_status); } >/dev/null && {
3460 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3461 test ! -s conftest.err
3462 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003463 :
3464else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003466sed 's/^/| /' conftest.$ac_ext >&5
3467
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 # Broken: fails on valid input.
3469continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 # can be detected and how.
3476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003477/* confdefs.h. */
3478_ACEOF
3479cat confdefs.h >>conftest.$ac_ext
3480cat >>conftest.$ac_ext <<_ACEOF
3481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003482#include <ac_nonexistent.h>
3483_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484if { (ac_try="$ac_cpp conftest.$ac_ext"
3485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003492 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 rm -f conftest.er1
3494 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003496 (exit $ac_status); } >/dev/null && {
3497 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3498 test ! -s conftest.err
3499 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 # Broken: success on invalid input.
3501continue
3502else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Passes both tests.
3507ac_preproc_ok=:
3508break
3509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511rm -f conftest.err conftest.$ac_ext
3512
3513done
3514# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3515rm -f conftest.err conftest.$ac_ext
3516if $ac_preproc_ok; then
3517 break
3518fi
3519
3520 done
3521 ac_cv_prog_CPP=$CPP
3522
3523fi
3524 CPP=$ac_cv_prog_CPP
3525else
3526 ac_cv_prog_CPP=$CPP
3527fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003528{ echo "$as_me:$LINENO: result: $CPP" >&5
3529echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003530ac_preproc_ok=false
3531for ac_c_preproc_warn_flag in '' yes
3532do
3533 # Use a header file that comes with gcc, so configuring glibc
3534 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003535 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3536 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 # On the NeXT, cc -E runs the code through the compiler's parser,
3538 # not just through cpp. "Syntax error" is here to catch this case.
3539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003540/* confdefs.h. */
3541_ACEOF
3542cat confdefs.h >>conftest.$ac_ext
3543cat >>conftest.$ac_ext <<_ACEOF
3544/* end confdefs.h. */
3545#ifdef __STDC__
3546# include <limits.h>
3547#else
3548# include <assert.h>
3549#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003550 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552if { (ac_try="$ac_cpp conftest.$ac_ext"
3553case "(($ac_try" in
3554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555 *) ac_try_echo=$ac_try;;
3556esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003560 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 rm -f conftest.er1
3562 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 (exit $ac_status); } >/dev/null && {
3565 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3566 test ! -s conftest.err
3567 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 :
3569else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003571sed 's/^/| /' conftest.$ac_ext >&5
3572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 # Broken: fails on valid input.
3574continue
3575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576
Martin v. Löwis11437992002-04-12 09:54:03 +00003577rm -f conftest.err conftest.$ac_ext
3578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 # can be detected and how.
3581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003582/* confdefs.h. */
3583_ACEOF
3584cat confdefs.h >>conftest.$ac_ext
3585cat >>conftest.$ac_ext <<_ACEOF
3586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003587#include <ac_nonexistent.h>
3588_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589if { (ac_try="$ac_cpp conftest.$ac_ext"
3590case "(($ac_try" in
3591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592 *) ac_try_echo=$ac_try;;
3593esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003597 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 rm -f conftest.er1
3599 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601 (exit $ac_status); } >/dev/null && {
3602 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3603 test ! -s conftest.err
3604 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 # Broken: success on invalid input.
3606continue
3607else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003609sed 's/^/| /' conftest.$ac_ext >&5
3610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 # Passes both tests.
3612ac_preproc_ok=:
3613break
3614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616rm -f conftest.err conftest.$ac_ext
3617
3618done
3619# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3620rm -f conftest.err conftest.$ac_ext
3621if $ac_preproc_ok; then
3622 :
3623else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003624 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003625See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003626echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003627See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003628 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003629fi
3630
3631ac_ext=c
3632ac_cpp='$CPP $CPPFLAGS'
3633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635ac_compiler_gnu=$ac_cv_c_compiler_gnu
3636
3637
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003638{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3639echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003641 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003642else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003643 # Extract the first word of "grep ggrep" to use in msg output
3644if test -z "$GREP"; then
3645set dummy grep ggrep; ac_prog_name=$2
3646if test "${ac_cv_path_GREP+set}" = set; then
3647 echo $ECHO_N "(cached) $ECHO_C" >&6
3648else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003650# Loop through the user's path and test for each of PROGNAME-LIST
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
3656 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003657 for ac_exec_ext in '' $ac_executable_extensions; do
3658 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3659 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3660 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 # Check for GNU $ac_path_GREP
3662case `"$ac_path_GREP" --version 2>&1` in
3663*GNU*)
3664 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3665*)
3666 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003667 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 while :
3669 do
3670 cat "conftest.in" "conftest.in" >"conftest.tmp"
3671 mv "conftest.tmp" "conftest.in"
3672 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003673 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3675 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3676 ac_count=`expr $ac_count + 1`
3677 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3678 # Best one so far, save it but keep looking for a better one
3679 ac_cv_path_GREP="$ac_path_GREP"
3680 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003681 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 # 10*(2^10) chars as input seems more than enough
3683 test $ac_count -gt 10 && break
3684 done
3685 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3686esac
3687
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003688
3689 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 done
3691done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003692
3693done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003695
3696
3697fi
3698
3699GREP="$ac_cv_path_GREP"
3700if test -z "$GREP"; then
3701 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3702echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003704fi
3705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706else
3707 ac_cv_path_GREP=$GREP
3708fi
3709
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003712{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3713echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714 GREP="$ac_cv_path_GREP"
3715
3716
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003717{ echo "$as_me:$LINENO: checking for egrep" >&5
3718echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003720 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721else
3722 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3723 then ac_cv_path_EGREP="$GREP -E"
3724 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003725 # Extract the first word of "egrep" to use in msg output
3726if test -z "$EGREP"; then
3727set dummy egrep; ac_prog_name=$2
3728if test "${ac_cv_path_EGREP+set}" = set; then
3729 echo $ECHO_N "(cached) $ECHO_C" >&6
3730else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003732# Loop through the user's path and test for each of PROGNAME-LIST
3733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
3738 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003739 for ac_exec_ext in '' $ac_executable_extensions; do
3740 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3741 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3742 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 # Check for GNU $ac_path_EGREP
3744case `"$ac_path_EGREP" --version 2>&1` in
3745*GNU*)
3746 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3747*)
3748 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003749 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 while :
3751 do
3752 cat "conftest.in" "conftest.in" >"conftest.tmp"
3753 mv "conftest.tmp" "conftest.in"
3754 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003755 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3757 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3758 ac_count=`expr $ac_count + 1`
3759 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3760 # Best one so far, save it but keep looking for a better one
3761 ac_cv_path_EGREP="$ac_path_EGREP"
3762 ac_path_EGREP_max=$ac_count
3763 fi
3764 # 10*(2^10) chars as input seems more than enough
3765 test $ac_count -gt 10 && break
3766 done
3767 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3768esac
3769
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003770
3771 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 done
3773done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003774
3775done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003777
3778
3779fi
3780
3781EGREP="$ac_cv_path_EGREP"
3782if test -z "$EGREP"; then
3783 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3784echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003786fi
3787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788else
3789 ac_cv_path_EGREP=$EGREP
3790fi
3791
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 fi
3794fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003795{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3796echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003798
3799
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003800
3801{ echo "$as_me:$LINENO: checking for AIX" >&5
3802echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3803cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003804/* confdefs.h. */
3805_ACEOF
3806cat confdefs.h >>conftest.$ac_ext
3807cat >>conftest.$ac_ext <<_ACEOF
3808/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003809#ifdef _AIX
3810 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003811#endif
3812
Benjamin Petersona8332062009-09-11 22:36:27 +00003813_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3815 $EGREP "yes" >/dev/null 2>&1; then
3816 { echo "$as_me:$LINENO: result: yes" >&5
3817echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003818cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003819#define _ALL_SOURCE 1
3820_ACEOF
3821
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003822else
3823 { echo "$as_me:$LINENO: result: no" >&5
3824echo "${ECHO_T}no" >&6; }
3825fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00003826rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003827
3828
3829
3830# Check for unsupported systems
3831case $ac_sys_system/$ac_sys_release in
3832atheos*|Linux*/1*)
3833 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3834 echo See README for details.
3835 exit 1;;
3836esac
3837
3838
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003839{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3840echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003841
3842# Check whether --with-suffix was given.
3843if test "${with_suffix+set}" = set; then
3844 withval=$with_suffix;
3845 case $withval in
3846 no) EXEEXT=;;
3847 yes) EXEEXT=.exe;;
3848 *) EXEEXT=$withval;;
3849 esac
3850fi
3851
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003852{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3853echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003854
3855# Test whether we're running on a non-case-sensitive system, in which
3856# case we give a warning if no ext is given
3857
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003858{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3859echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003860if test ! -d CaseSensitiveTestDir; then
3861mkdir CaseSensitiveTestDir
3862fi
3863
3864if test -d casesensitivetestdir
3865then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003866 { echo "$as_me:$LINENO: result: yes" >&5
3867echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003868 BUILDEXEEXT=.exe
3869else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003870 { echo "$as_me:$LINENO: result: no" >&5
3871echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003872 BUILDEXEEXT=$EXEEXT
3873fi
3874rmdir CaseSensitiveTestDir
3875
3876case $MACHDEP in
3877bsdos*)
3878 case $CC in
3879 gcc) CC="$CC -D_HAVE_BSDI";;
3880 esac;;
3881esac
3882
3883case $ac_sys_system in
3884hp*|HP*)
3885 case $CC in
3886 cc|*/cc) CC="$CC -Ae";;
3887 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003888SunOS*)
3889 # Some functions have a prototype only with that define, e.g. confstr
3890
3891cat >>confdefs.h <<\_ACEOF
3892#define __EXTENSIONS__ 1
3893_ACEOF
3894
3895 ;;
3896esac
3897
3898
3899
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003900{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3901echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003902if test -z "$LIBRARY"
3903then
3904 LIBRARY='libpython$(VERSION).a'
3905fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003906{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3907echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003908
3909# LDLIBRARY is the name of the library to link against (as opposed to the
3910# name of the library into which to insert object files). BLDLIBRARY is also
3911# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3912# is blank as the main program is not linked directly against LDLIBRARY.
3913# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3914# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3915# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3916# DLLLIBRARY is the shared (i.e., DLL) library.
3917#
3918# RUNSHARED is used to run shared python without installed libraries
3919#
3920# INSTSONAME is the name of the shared library that will be use to install
3921# on the system - some systems like version suffix, others don't
3922
3923
3924
3925
3926
3927
3928LDLIBRARY="$LIBRARY"
3929BLDLIBRARY='$(LDLIBRARY)'
3930INSTSONAME='$(LDLIBRARY)'
3931DLLLIBRARY=''
3932LDLIBRARYDIR=''
3933RUNSHARED=''
3934
3935# LINKCC is the command that links the python executable -- default is $(CC).
3936# If CXX is set, and if it is needed to link a main function that was
3937# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3938# python might then depend on the C++ runtime
3939# This is altered for AIX in order to build the export list before
3940# linking.
3941
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003942{ echo "$as_me:$LINENO: checking LINKCC" >&5
3943echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003944if test -z "$LINKCC"
3945then
3946 LINKCC='$(PURIFY) $(MAINCC)'
3947 case $ac_sys_system in
3948 AIX*)
3949 exp_extra="\"\""
3950 if test $ac_sys_release -ge 5 -o \
3951 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3952 exp_extra="."
3953 fi
3954 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003955 QNX*)
3956 # qcc must be used because the other compilers do not
3957 # support -N.
3958 LINKCC=qcc;;
3959 esac
3960fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003961{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3962echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003963
3964# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3965# make sure we default having it set to "no": this is used by
3966# distutils.unixccompiler to know if it should add --enable-new-dtags
3967# to linker command lines, and failing to detect GNU ld simply results
3968# in the same bahaviour as before.
3969
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003970{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3971echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003972ac_prog=ld
3973if test "$GCC" = yes; then
3974 ac_prog=`$CC -print-prog-name=ld`
3975fi
3976case `"$ac_prog" -V 2>&1 < /dev/null` in
3977 *GNU*)
3978 GNULD=yes;;
3979 *)
3980 GNULD=no;;
3981esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003982{ echo "$as_me:$LINENO: result: $GNULD" >&5
3983echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003984
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003985{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3986echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003987# Check whether --enable-shared was given.
3988if test "${enable_shared+set}" = set; then
3989 enableval=$enable_shared;
3990fi
3991
3992
3993if test -z "$enable_shared"
3994then
3995 case $ac_sys_system in
3996 CYGWIN* | atheos*)
3997 enable_shared="yes";;
3998 *)
3999 enable_shared="no";;
4000 esac
4001fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004002{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4003echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004005{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4006echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004007# Check whether --enable-profiling was given.
4008if test "${enable_profiling+set}" = set; then
4009 enableval=$enable_profiling; ac_save_cc="$CC"
4010 CC="$CC -pg"
4011 if test "$cross_compiling" = yes; then
4012 ac_enable_profiling="no"
4013else
4014 cat >conftest.$ac_ext <<_ACEOF
4015/* confdefs.h. */
4016_ACEOF
4017cat confdefs.h >>conftest.$ac_ext
4018cat >>conftest.$ac_ext <<_ACEOF
4019/* end confdefs.h. */
4020int main() { return 0; }
4021_ACEOF
4022rm -f conftest$ac_exeext
4023if { (ac_try="$ac_link"
4024case "(($ac_try" in
4025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4026 *) ac_try_echo=$ac_try;;
4027esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004029 (eval "$ac_link") 2>&5
4030 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4033 { (case "(($ac_try" in
4034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4035 *) ac_try_echo=$ac_try;;
4036esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004038 (eval "$ac_try") 2>&5
4039 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004041 (exit $ac_status); }; }; then
4042 ac_enable_profiling="yes"
4043else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004044 echo "$as_me: program exited with status $ac_status" >&5
4045echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004046sed 's/^/| /' conftest.$ac_ext >&5
4047
4048( exit $ac_status )
4049ac_enable_profiling="no"
4050fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4052fi
4053
4054
4055 CC="$ac_save_cc"
4056fi
4057
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004058{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4059echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004060
4061case "$ac_enable_profiling" in
4062 "yes")
4063 BASECFLAGS="-pg $BASECFLAGS"
4064 LDFLAGS="-pg $LDFLAGS"
4065 ;;
4066esac
4067
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004068{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4069echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004070
4071# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4072# library that we build, but we do not want to link against it (we
4073# will find it with a -framework option). For this reason there is an
4074# extra variable BLDLIBRARY against which Python and the extension
4075# modules are linked, BLDLIBRARY. This is normally the same as
4076# LDLIBRARY, but empty for MacOSX framework builds.
4077if test "$enable_framework"
4078then
4079 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4080 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4081 BLDLIBRARY=''
4082else
4083 BLDLIBRARY='$(LDLIBRARY)'
4084fi
4085
4086# Other platforms follow
4087if test $enable_shared = "yes"; then
4088
4089cat >>confdefs.h <<\_ACEOF
4090#define Py_ENABLE_SHARED 1
4091_ACEOF
4092
4093 case $ac_sys_system in
4094 CYGWIN*)
4095 LDLIBRARY='libpython$(VERSION).dll.a'
4096 DLLLIBRARY='libpython$(VERSION).dll'
4097 ;;
4098 SunOS*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4101 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4102 INSTSONAME="$LDLIBRARY".$SOVERSION
4103 ;;
4104 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4105 LDLIBRARY='libpython$(VERSION).so'
4106 BLDLIBRARY='-L. -lpython$(VERSION)'
4107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4108 case $ac_sys_system in
4109 FreeBSD*)
4110 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4111 ;;
4112 esac
4113 INSTSONAME="$LDLIBRARY".$SOVERSION
4114 ;;
4115 hp*|HP*)
4116 case `uname -m` in
4117 ia64)
4118 LDLIBRARY='libpython$(VERSION).so'
4119 ;;
4120 *)
4121 LDLIBRARY='libpython$(VERSION).sl'
4122 ;;
4123 esac
4124 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4125 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4126 ;;
4127 OSF*)
4128 LDLIBRARY='libpython$(VERSION).so'
4129 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4130 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4131 ;;
4132 atheos*)
4133 LDLIBRARY='libpython$(VERSION).so'
4134 BLDLIBRARY='-L. -lpython$(VERSION)'
4135 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4136 ;;
4137 Darwin*)
4138 LDLIBRARY='libpython$(VERSION).dylib'
4139 BLDLIBRARY='-L. -lpython$(VERSION)'
4140 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4141 ;;
4142
4143 esac
4144else # shared is disabled
4145 case $ac_sys_system in
4146 CYGWIN*)
4147 BLDLIBRARY='$(LIBRARY)'
4148 LDLIBRARY='libpython$(VERSION).dll.a'
4149 ;;
4150 esac
4151fi
4152
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004153{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4154echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004155
4156if test -n "$ac_tool_prefix"; then
4157 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4158set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004159{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4160echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004161if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004162 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004163else
4164 if test -n "$RANLIB"; then
4165 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4166else
4167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168for as_dir in $PATH
4169do
4170 IFS=$as_save_IFS
4171 test -z "$as_dir" && as_dir=.
4172 for ac_exec_ext in '' $ac_executable_extensions; do
4173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4174 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004175 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004176 break 2
4177 fi
4178done
4179done
4180IFS=$as_save_IFS
4181
4182fi
4183fi
4184RANLIB=$ac_cv_prog_RANLIB
4185if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004186 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4187echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004188else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004189 { echo "$as_me:$LINENO: result: no" >&5
4190echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004191fi
4192
4193
4194fi
4195if test -z "$ac_cv_prog_RANLIB"; then
4196 ac_ct_RANLIB=$RANLIB
4197 # Extract the first word of "ranlib", so it can be a program name with args.
4198set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004199{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4200echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004201if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004202 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004203else
4204 if test -n "$ac_ct_RANLIB"; then
4205 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4206else
4207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4208for as_dir in $PATH
4209do
4210 IFS=$as_save_IFS
4211 test -z "$as_dir" && as_dir=.
4212 for ac_exec_ext in '' $ac_executable_extensions; do
4213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4214 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004215 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004216 break 2
4217 fi
4218done
4219done
4220IFS=$as_save_IFS
4221
4222fi
4223fi
4224ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4225if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004226 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4227echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004228else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004229 { echo "$as_me:$LINENO: result: no" >&5
4230echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004231fi
4232
4233 if test "x$ac_ct_RANLIB" = x; then
4234 RANLIB=":"
4235 else
4236 case $cross_compiling:$ac_tool_warned in
4237yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004238{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4239whose name does not start with the host triplet. If you think this
4240configuration is useful to you, please write to autoconf@gnu.org." >&5
4241echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4242whose name does not start with the host triplet. If you think this
4243configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004244ac_tool_warned=yes ;;
4245esac
4246 RANLIB=$ac_ct_RANLIB
4247 fi
4248else
4249 RANLIB="$ac_cv_prog_RANLIB"
4250fi
4251
4252
4253for ac_prog in ar aal
4254do
4255 # Extract the first word of "$ac_prog", so it can be a program name with args.
4256set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004257{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004259if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004260 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004261else
4262 if test -n "$AR"; then
4263 ac_cv_prog_AR="$AR" # Let the user override the test.
4264else
4265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266for as_dir in $PATH
4267do
4268 IFS=$as_save_IFS
4269 test -z "$as_dir" && as_dir=.
4270 for ac_exec_ext in '' $ac_executable_extensions; do
4271 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4272 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004273 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004274 break 2
4275 fi
4276done
4277done
4278IFS=$as_save_IFS
4279
4280fi
4281fi
4282AR=$ac_cv_prog_AR
4283if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004284 { echo "$as_me:$LINENO: result: $AR" >&5
4285echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004286else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004287 { echo "$as_me:$LINENO: result: no" >&5
4288echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004289fi
4290
4291
4292 test -n "$AR" && break
4293done
4294test -n "$AR" || AR="ar"
4295
4296
4297# tweak ARFLAGS only if the user didn't set it on the command line
4298
4299if test -z "$ARFLAGS"
4300then
4301 ARFLAGS="rc"
4302fi
4303
4304
4305# Extract the first word of "svnversion", so it can be a program name with args.
4306set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004307{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004309if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004310 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004311else
4312 if test -n "$SVNVERSION"; then
4313 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4314else
4315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316for as_dir in $PATH
4317do
4318 IFS=$as_save_IFS
4319 test -z "$as_dir" && as_dir=.
4320 for ac_exec_ext in '' $ac_executable_extensions; do
4321 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4322 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004324 break 2
4325 fi
4326done
4327done
4328IFS=$as_save_IFS
4329
4330 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4331fi
4332fi
4333SVNVERSION=$ac_cv_prog_SVNVERSION
4334if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004335 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4336echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004337else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004338 { echo "$as_me:$LINENO: result: no" >&5
4339echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004340fi
4341
4342
4343if test $SVNVERSION = found
4344then
4345 SVNVERSION="svnversion \$(srcdir)"
4346else
4347 SVNVERSION="echo Unversioned directory"
4348fi
4349
4350case $MACHDEP in
4351bsdos*|hp*|HP*)
4352 # install -d does not work on BSDI or HP-UX
4353 if test -z "$INSTALL"
4354 then
4355 INSTALL="${srcdir}/install-sh -c"
4356 fi
4357esac
4358ac_aux_dir=
4359for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4360 if test -f "$ac_dir/install-sh"; then
4361 ac_aux_dir=$ac_dir
4362 ac_install_sh="$ac_aux_dir/install-sh -c"
4363 break
4364 elif test -f "$ac_dir/install.sh"; then
4365 ac_aux_dir=$ac_dir
4366 ac_install_sh="$ac_aux_dir/install.sh -c"
4367 break
4368 elif test -f "$ac_dir/shtool"; then
4369 ac_aux_dir=$ac_dir
4370 ac_install_sh="$ac_aux_dir/shtool install -c"
4371 break
4372 fi
4373done
4374if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004375 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4376echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004377 { (exit 1); exit 1; }; }
4378fi
4379
4380# These three variables are undocumented and unsupported,
4381# and are intended to be withdrawn in a future Autoconf release.
4382# They can cause serious problems if a builder's source tree is in a directory
4383# whose full name contains unusual characters.
4384ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4385ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4386ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4387
4388
4389# Find a good install program. We prefer a C program (faster),
4390# so one script is as good as another. But avoid the broken or
4391# incompatible versions:
4392# SysV /etc/install, /usr/sbin/install
4393# SunOS /usr/etc/install
4394# IRIX /sbin/install
4395# AIX /bin/install
4396# AmigaOS /C/install, which installs bootblocks on floppy discs
4397# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4398# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4399# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4400# OS/2's system install, which has a completely different semantic
4401# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004402{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4403echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004404if test -z "$INSTALL"; then
4405if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004406 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004407else
4408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4409for as_dir in $PATH
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
4413 # Account for people who put trailing slashes in PATH elements.
4414case $as_dir/ in
4415 ./ | .// | /cC/* | \
4416 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4417 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4418 /usr/ucb/* ) ;;
4419 *)
4420 # OSF1 and SCO ODT 3.0 have their own names for install.
4421 # Don't use installbsd from OSF since it installs stuff as root
4422 # by default.
4423 for ac_prog in ginstall scoinst install; do
4424 for ac_exec_ext in '' $ac_executable_extensions; do
4425 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4426 if test $ac_prog = install &&
4427 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4428 # AIX install. It has an incompatible calling convention.
4429 :
4430 elif test $ac_prog = install &&
4431 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4432 # program-specific install script used by HP pwplus--don't use.
4433 :
4434 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004435 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4436 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004437 fi
4438 fi
4439 done
4440 done
4441 ;;
4442esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004443done
4444IFS=$as_save_IFS
4445
Antoine Pitrou20327222009-05-24 20:39:11 +00004446
4447fi
4448 if test "${ac_cv_path_install+set}" = set; then
4449 INSTALL=$ac_cv_path_install
4450 else
4451 # As a last resort, use the slow shell script. Don't cache a
4452 # value for INSTALL within a source directory, because that will
4453 # break other packages using the cache if that directory is
4454 # removed, or if the value is a relative name.
4455 INSTALL=$ac_install_sh
4456 fi
4457fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004458{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4459echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004460
4461# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4462# It thinks the first close brace ends the variable substitution.
4463test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4464
4465test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4466
4467test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4468
4469
4470# Not every filesystem supports hard links
4471
4472if test -z "$LN" ; then
4473 case $ac_sys_system in
4474 CYGWIN*) LN="ln -s";;
4475 atheos*) LN="ln -s";;
4476 *) LN=ln;;
4477 esac
4478fi
4479
4480# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004481{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4482echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004483
4484# Check whether --with-pydebug was given.
4485if test "${with_pydebug+set}" = set; then
4486 withval=$with_pydebug;
4487if test "$withval" != no
4488then
4489
4490cat >>confdefs.h <<\_ACEOF
4491#define Py_DEBUG 1
4492_ACEOF
4493
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004494 { echo "$as_me:$LINENO: result: yes" >&5
4495echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004496 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004497else { echo "$as_me:$LINENO: result: no" >&5
4498echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004499fi
4500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004501 { echo "$as_me:$LINENO: result: no" >&5
4502echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004503fi
4504
4505
4506# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4507# merged with this chunk of code?
4508
4509# Optimizer/debugger flags
4510# ------------------------
4511# (The following bit of code is complicated enough - please keep things
4512# indented properly. Just pretend you're editing Python code. ;-)
4513
4514# There are two parallel sets of case statements below, one that checks to
4515# see if OPT was set and one that does BASECFLAGS setting based upon
4516# compiler and platform. BASECFLAGS tweaks need to be made even if the
4517# user set OPT.
4518
4519# tweak OPT based on compiler and platform, only if the user didn't set
4520# it on the command line
4521
4522if test -z "$OPT"
4523then
4524 case $GCC in
4525 yes)
4526 if test "$CC" != 'g++' ; then
4527 STRICT_PROTO="-Wstrict-prototypes"
4528 fi
4529 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4530 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4531 WRAP="-fwrapv"
4532 fi
4533 case $ac_cv_prog_cc_g in
4534 yes)
4535 if test "$Py_DEBUG" = 'true' ; then
4536 # Optimization messes up debuggers, so turn it off for
4537 # debug builds.
4538 OPT="-g -Wall $STRICT_PROTO"
4539 else
4540 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4541 fi
4542 ;;
4543 *)
4544 OPT="-O3 -Wall $STRICT_PROTO"
4545 ;;
4546 esac
4547 case $ac_sys_system in
4548 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4549 ;;
4550 esac
4551 ;;
4552
4553 *)
4554 OPT="-O"
4555 ;;
4556 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004557fi
4558
4559
4560
4561# The -arch flags for universal builds on OSX
4562UNIVERSAL_ARCH_FLAGS=
4563
4564
4565# tweak BASECFLAGS based on compiler and platform
4566case $GCC in
4567yes)
4568 # Python violates C99 rules, by casting between incompatible
4569 # pointer types. GCC may generate bad code as a result of that,
4570 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004571 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4572echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004573 ac_save_cc="$CC"
4574 CC="$CC -fno-strict-aliasing"
4575 if test "$cross_compiling" = yes; then
4576 ac_cv_no_strict_aliasing_ok=no
4577else
4578 cat >conftest.$ac_ext <<_ACEOF
4579/* confdefs.h. */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h. */
4584int main() { return 0; }
4585_ACEOF
4586rm -f conftest$ac_exeext
4587if { (ac_try="$ac_link"
4588case "(($ac_try" in
4589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4590 *) ac_try_echo=$ac_try;;
4591esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004593 (eval "$ac_link") 2>&5
4594 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4597 { (case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004602 (eval "$ac_try") 2>&5
4603 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004605 (exit $ac_status); }; }; then
4606 ac_cv_no_strict_aliasing_ok=yes
4607else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004608 echo "$as_me: program exited with status $ac_status" >&5
4609echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004610sed 's/^/| /' conftest.$ac_ext >&5
4611
4612( exit $ac_status )
4613ac_cv_no_strict_aliasing_ok=no
4614fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4616fi
4617
4618
4619 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004620 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4621echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004622 if test $ac_cv_no_strict_aliasing_ok = yes
4623 then
4624 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4625 fi
4626
4627 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4628 # support. Without this, treatment of subnormals doesn't follow
4629 # the standard.
4630 case $ac_sys_machine in
4631 alpha*)
4632 BASECFLAGS="$BASECFLAGS -mieee"
4633 ;;
4634 esac
4635
4636 case $ac_sys_system in
4637 SCO_SV*)
4638 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4639 ;;
4640 # is there any other compiler on Darwin besides gcc?
4641 Darwin*)
4642 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4643 # used to be here, but non-Apple gcc doesn't accept them.
4644
4645
4646 if test "${enable_universalsdk}"; then
4647 UNIVERSAL_ARCH_FLAGS=""
4648 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4649 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4650 ARCH_RUN_32BIT=""
4651
4652 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4653 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004654 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004655
4656 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4657 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4658 ARCH_RUN_32BIT="arch -i386 -ppc"
4659
Ronald Oussoren856624d2009-09-08 07:13:53 +00004660 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4661 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4662 ARCH_RUN_32BIT="arch -i386"
4663
4664 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4665 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4666 ARCH_RUN_32BIT="arch -i386 -ppc"
4667
Antoine Pitrou20327222009-05-24 20:39:11 +00004668 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004669 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4670echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004671 { (exit 1); exit 1; }; }
4672
4673 fi
4674
4675
4676 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4677 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4678 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4679 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4680 fi
4681 fi
4682
4683 # Calculate the right deployment target for this build.
4684 #
4685 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4686 if test ${cur_target} '>' 10.2; then
4687 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004688 if test ${enable_universalsdk}; then
4689 if test "${UNIVERSAL_ARCHS}" = "all"; then
4690 # Ensure that the default platform for a
4691 # 4-way universal build is OSX 10.5,
4692 # that's the first OS release where
4693 # 4-way builds make sense.
4694 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004695
4696 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4697 cur_target='10.5'
4698
4699 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4700 cur_target='10.5'
4701
4702 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4703 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004704 fi
4705 else
4706 if test `arch` = "i386"; then
4707 # On Intel macs default to a deployment
4708 # target of 10.4, that's the first OSX
4709 # release with Intel support.
4710 cur_target="10.4"
4711 fi
4712 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004713 fi
4714 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4715
4716 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4717 # environment with a value that is the same as what we'll use
4718 # in the Makefile to ensure that we'll get the same compiler
4719 # environment during configure and build time.
4720 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4721 export MACOSX_DEPLOYMENT_TARGET
4722 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4723
4724 ;;
4725 OSF*)
4726 BASECFLAGS="$BASECFLAGS -mieee"
4727 ;;
4728 esac
4729 ;;
4730
4731*)
4732 case $ac_sys_system in
4733 OpenUNIX*|UnixWare*)
4734 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4735 ;;
4736 OSF*)
4737 BASECFLAGS="$BASECFLAGS -ieee -std"
4738 ;;
4739 SCO_SV*)
4740 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4741 ;;
4742 esac
4743 ;;
4744esac
4745
4746if test "$Py_DEBUG" = 'true'; then
4747 :
4748else
4749 OPT="-DNDEBUG $OPT"
4750fi
4751
4752if test "$ac_arch_flags"
4753then
4754 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4755fi
4756
4757# disable check for icc since it seems to pass, but generates a warning
4758if test "$CC" = icc
4759then
4760 ac_cv_opt_olimit_ok=no
4761fi
4762
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004763{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4764echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004765if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004766 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004767else
4768 ac_save_cc="$CC"
4769CC="$CC -OPT:Olimit=0"
4770if test "$cross_compiling" = yes; then
4771 ac_cv_opt_olimit_ok=no
4772else
4773 cat >conftest.$ac_ext <<_ACEOF
4774/* confdefs.h. */
4775_ACEOF
4776cat confdefs.h >>conftest.$ac_ext
4777cat >>conftest.$ac_ext <<_ACEOF
4778/* end confdefs.h. */
4779int main() { return 0; }
4780_ACEOF
4781rm -f conftest$ac_exeext
4782if { (ac_try="$ac_link"
4783case "(($ac_try" in
4784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4785 *) ac_try_echo=$ac_try;;
4786esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004788 (eval "$ac_link") 2>&5
4789 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4792 { (case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004797 (eval "$ac_try") 2>&5
4798 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004800 (exit $ac_status); }; }; then
4801 ac_cv_opt_olimit_ok=yes
4802else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004803 echo "$as_me: program exited with status $ac_status" >&5
4804echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004805sed 's/^/| /' conftest.$ac_ext >&5
4806
4807( exit $ac_status )
4808ac_cv_opt_olimit_ok=no
4809fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4811fi
4812
4813
4814CC="$ac_save_cc"
4815fi
4816
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004817{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4818echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004819if test $ac_cv_opt_olimit_ok = yes; then
4820 case $ac_sys_system in
4821 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4822 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4823 # environment?
4824 Darwin*)
4825 ;;
4826 *)
4827 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4828 ;;
4829 esac
4830else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004831 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4832echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004833 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004834 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004835else
4836 ac_save_cc="$CC"
4837 CC="$CC -Olimit 1500"
4838 if test "$cross_compiling" = yes; then
4839 ac_cv_olimit_ok=no
4840else
4841 cat >conftest.$ac_ext <<_ACEOF
4842/* confdefs.h. */
4843_ACEOF
4844cat confdefs.h >>conftest.$ac_ext
4845cat >>conftest.$ac_ext <<_ACEOF
4846/* end confdefs.h. */
4847int main() { return 0; }
4848_ACEOF
4849rm -f conftest$ac_exeext
4850if { (ac_try="$ac_link"
4851case "(($ac_try" in
4852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4853 *) ac_try_echo=$ac_try;;
4854esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004856 (eval "$ac_link") 2>&5
4857 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4860 { (case "(($ac_try" in
4861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4862 *) ac_try_echo=$ac_try;;
4863esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004865 (eval "$ac_try") 2>&5
4866 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004868 (exit $ac_status); }; }; then
4869 ac_cv_olimit_ok=yes
4870else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004871 echo "$as_me: program exited with status $ac_status" >&5
4872echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004873sed 's/^/| /' conftest.$ac_ext >&5
4874
4875( exit $ac_status )
4876ac_cv_olimit_ok=no
4877fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4879fi
4880
4881
4882 CC="$ac_save_cc"
4883fi
4884
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004885 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4886echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004887 if test $ac_cv_olimit_ok = yes; then
4888 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4889 fi
4890fi
4891
4892# Check whether GCC supports PyArg_ParseTuple format
4893if test "$GCC" = "yes"
4894then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004895 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4896echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004897 save_CFLAGS=$CFLAGS
4898 CFLAGS="$CFLAGS -Werror"
4899 cat >conftest.$ac_ext <<_ACEOF
4900/* confdefs.h. */
4901_ACEOF
4902cat confdefs.h >>conftest.$ac_ext
4903cat >>conftest.$ac_ext <<_ACEOF
4904/* end confdefs.h. */
4905
4906 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4907
4908int
4909main ()
4910{
4911
4912 ;
4913 return 0;
4914}
4915_ACEOF
4916rm -f conftest.$ac_objext
4917if { (ac_try="$ac_compile"
4918case "(($ac_try" in
4919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4920 *) ac_try_echo=$ac_try;;
4921esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004923 (eval "$ac_compile") 2>conftest.er1
4924 ac_status=$?
4925 grep -v '^ *+' conftest.er1 >conftest.err
4926 rm -f conftest.er1
4927 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004929 (exit $ac_status); } && {
4930 test -z "$ac_c_werror_flag" ||
4931 test ! -s conftest.err
4932 } && test -s conftest.$ac_objext; then
4933
4934cat >>confdefs.h <<\_ACEOF
4935#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4936_ACEOF
4937
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004938 { echo "$as_me:$LINENO: result: yes" >&5
4939echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004940else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004941 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004942sed 's/^/| /' conftest.$ac_ext >&5
4943
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004944 { echo "$as_me:$LINENO: result: no" >&5
4945echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004946
4947fi
4948
4949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4950 CFLAGS=$save_CFLAGS
4951fi
4952
4953# On some compilers, pthreads are available without further options
4954# (e.g. MacOS X). On some of these systems, the compiler will not
4955# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4956# So we have to see first whether pthreads are available without
4957# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004958{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4959echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004960if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004961 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004962else
4963 if test "$cross_compiling" = yes; then
4964 ac_cv_pthread_is_default=no
4965else
4966 cat >conftest.$ac_ext <<_ACEOF
4967/* confdefs.h. */
4968_ACEOF
4969cat confdefs.h >>conftest.$ac_ext
4970cat >>conftest.$ac_ext <<_ACEOF
4971/* end confdefs.h. */
4972
4973#include <pthread.h>
4974
4975void* routine(void* p){return NULL;}
4976
4977int main(){
4978 pthread_t p;
4979 if(pthread_create(&p,NULL,routine,NULL)!=0)
4980 return 1;
4981 (void)pthread_detach(p);
4982 return 0;
4983}
4984
4985_ACEOF
4986rm -f conftest$ac_exeext
4987if { (ac_try="$ac_link"
4988case "(($ac_try" in
4989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4990 *) ac_try_echo=$ac_try;;
4991esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004993 (eval "$ac_link") 2>&5
4994 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4997 { (case "(($ac_try" in
4998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4999 *) ac_try_echo=$ac_try;;
5000esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005002 (eval "$ac_try") 2>&5
5003 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005005 (exit $ac_status); }; }; then
5006
5007 ac_cv_pthread_is_default=yes
5008 ac_cv_kthread=no
5009 ac_cv_pthread=no
5010
5011else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005012 echo "$as_me: program exited with status $ac_status" >&5
5013echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005014sed 's/^/| /' conftest.$ac_ext >&5
5015
5016( exit $ac_status )
5017ac_cv_pthread_is_default=no
5018fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5020fi
5021
5022
5023
5024fi
5025
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005026{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5027echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005028
5029
5030if test $ac_cv_pthread_is_default = yes
5031then
5032 ac_cv_kpthread=no
5033else
5034# -Kpthread, if available, provides the right #defines
5035# and linker options to make pthread_create available
5036# Some compilers won't report that they do not support -Kpthread,
5037# so we need to run a program to see whether it really made the
5038# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005039{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5040echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005041if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005042 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005043else
5044 ac_save_cc="$CC"
5045CC="$CC -Kpthread"
5046if test "$cross_compiling" = yes; then
5047 ac_cv_kpthread=no
5048else
5049 cat >conftest.$ac_ext <<_ACEOF
5050/* confdefs.h. */
5051_ACEOF
5052cat confdefs.h >>conftest.$ac_ext
5053cat >>conftest.$ac_ext <<_ACEOF
5054/* end confdefs.h. */
5055
5056#include <pthread.h>
5057
5058void* routine(void* p){return NULL;}
5059
5060int main(){
5061 pthread_t p;
5062 if(pthread_create(&p,NULL,routine,NULL)!=0)
5063 return 1;
5064 (void)pthread_detach(p);
5065 return 0;
5066}
5067
5068_ACEOF
5069rm -f conftest$ac_exeext
5070if { (ac_try="$ac_link"
5071case "(($ac_try" in
5072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5073 *) ac_try_echo=$ac_try;;
5074esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005076 (eval "$ac_link") 2>&5
5077 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5080 { (case "(($ac_try" in
5081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5082 *) ac_try_echo=$ac_try;;
5083esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005085 (eval "$ac_try") 2>&5
5086 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005088 (exit $ac_status); }; }; then
5089 ac_cv_kpthread=yes
5090else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005091 echo "$as_me: program exited with status $ac_status" >&5
5092echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005093sed 's/^/| /' conftest.$ac_ext >&5
5094
5095( exit $ac_status )
5096ac_cv_kpthread=no
5097fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5099fi
5100
5101
5102CC="$ac_save_cc"
5103fi
5104
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005105{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5106echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005107fi
5108
5109if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5110then
5111# -Kthread, if available, provides the right #defines
5112# and linker options to make pthread_create available
5113# Some compilers won't report that they do not support -Kthread,
5114# so we need to run a program to see whether it really made the
5115# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005116{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5117echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005118if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005119 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005120else
5121 ac_save_cc="$CC"
5122CC="$CC -Kthread"
5123if test "$cross_compiling" = yes; then
5124 ac_cv_kthread=no
5125else
5126 cat >conftest.$ac_ext <<_ACEOF
5127/* confdefs.h. */
5128_ACEOF
5129cat confdefs.h >>conftest.$ac_ext
5130cat >>conftest.$ac_ext <<_ACEOF
5131/* end confdefs.h. */
5132
5133#include <pthread.h>
5134
5135void* routine(void* p){return NULL;}
5136
5137int main(){
5138 pthread_t p;
5139 if(pthread_create(&p,NULL,routine,NULL)!=0)
5140 return 1;
5141 (void)pthread_detach(p);
5142 return 0;
5143}
5144
5145_ACEOF
5146rm -f conftest$ac_exeext
5147if { (ac_try="$ac_link"
5148case "(($ac_try" in
5149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5150 *) ac_try_echo=$ac_try;;
5151esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005153 (eval "$ac_link") 2>&5
5154 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5157 { (case "(($ac_try" in
5158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5159 *) ac_try_echo=$ac_try;;
5160esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005162 (eval "$ac_try") 2>&5
5163 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005165 (exit $ac_status); }; }; then
5166 ac_cv_kthread=yes
5167else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005168 echo "$as_me: program exited with status $ac_status" >&5
5169echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005170sed 's/^/| /' conftest.$ac_ext >&5
5171
5172( exit $ac_status )
5173ac_cv_kthread=no
5174fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5176fi
5177
5178
5179CC="$ac_save_cc"
5180fi
5181
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005182{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5183echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005184fi
5185
5186if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5187then
5188# -pthread, if available, provides the right #defines
5189# and linker options to make pthread_create available
5190# Some compilers won't report that they do not support -pthread,
5191# so we need to run a program to see whether it really made the
5192# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005193{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5194echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005195if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005196 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005197else
5198 ac_save_cc="$CC"
5199CC="$CC -pthread"
5200if test "$cross_compiling" = yes; then
5201 ac_cv_pthread=no
5202else
5203 cat >conftest.$ac_ext <<_ACEOF
5204/* confdefs.h. */
5205_ACEOF
5206cat confdefs.h >>conftest.$ac_ext
5207cat >>conftest.$ac_ext <<_ACEOF
5208/* end confdefs.h. */
5209
5210#include <pthread.h>
5211
5212void* routine(void* p){return NULL;}
5213
5214int main(){
5215 pthread_t p;
5216 if(pthread_create(&p,NULL,routine,NULL)!=0)
5217 return 1;
5218 (void)pthread_detach(p);
5219 return 0;
5220}
5221
5222_ACEOF
5223rm -f conftest$ac_exeext
5224if { (ac_try="$ac_link"
5225case "(($ac_try" in
5226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5227 *) ac_try_echo=$ac_try;;
5228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005230 (eval "$ac_link") 2>&5
5231 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5234 { (case "(($ac_try" in
5235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5236 *) ac_try_echo=$ac_try;;
5237esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005239 (eval "$ac_try") 2>&5
5240 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005242 (exit $ac_status); }; }; then
5243 ac_cv_pthread=yes
5244else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005245 echo "$as_me: program exited with status $ac_status" >&5
5246echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005247sed 's/^/| /' conftest.$ac_ext >&5
5248
5249( exit $ac_status )
5250ac_cv_pthread=no
5251fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5253fi
5254
5255
5256CC="$ac_save_cc"
5257fi
5258
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005259{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5260echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005261fi
5262
5263# If we have set a CC compiler flag for thread support then
5264# check if it works for CXX, too.
5265ac_cv_cxx_thread=no
5266if test ! -z "$CXX"
5267then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005268{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5269echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005270ac_save_cxx="$CXX"
5271
5272if test "$ac_cv_kpthread" = "yes"
5273then
5274 CXX="$CXX -Kpthread"
5275 ac_cv_cxx_thread=yes
5276elif test "$ac_cv_kthread" = "yes"
5277then
5278 CXX="$CXX -Kthread"
5279 ac_cv_cxx_thread=yes
5280elif test "$ac_cv_pthread" = "yes"
5281then
5282 CXX="$CXX -pthread"
5283 ac_cv_cxx_thread=yes
5284fi
5285
5286if test $ac_cv_cxx_thread = yes
5287then
5288 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5289 $CXX -c conftest.$ac_ext 2>&5
5290 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5291 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5292 then
5293 ac_cv_cxx_thread=yes
5294 else
5295 ac_cv_cxx_thread=no
5296 fi
5297 rm -fr conftest*
5298fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005299{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5300echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005301fi
5302CXX="$ac_save_cxx"
5303
5304
5305# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005306{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5307echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005308if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005309 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005310else
5311 cat >conftest.$ac_ext <<_ACEOF
5312/* confdefs.h. */
5313_ACEOF
5314cat confdefs.h >>conftest.$ac_ext
5315cat >>conftest.$ac_ext <<_ACEOF
5316/* end confdefs.h. */
5317#include <stdlib.h>
5318#include <stdarg.h>
5319#include <string.h>
5320#include <float.h>
5321
5322int
5323main ()
5324{
5325
5326 ;
5327 return 0;
5328}
5329_ACEOF
5330rm -f conftest.$ac_objext
5331if { (ac_try="$ac_compile"
5332case "(($ac_try" in
5333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5334 *) ac_try_echo=$ac_try;;
5335esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005337 (eval "$ac_compile") 2>conftest.er1
5338 ac_status=$?
5339 grep -v '^ *+' conftest.er1 >conftest.err
5340 rm -f conftest.er1
5341 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005343 (exit $ac_status); } && {
5344 test -z "$ac_c_werror_flag" ||
5345 test ! -s conftest.err
5346 } && test -s conftest.$ac_objext; then
5347 ac_cv_header_stdc=yes
5348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005349 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005350sed 's/^/| /' conftest.$ac_ext >&5
5351
5352 ac_cv_header_stdc=no
5353fi
5354
5355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5356
5357if test $ac_cv_header_stdc = yes; then
5358 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5359 cat >conftest.$ac_ext <<_ACEOF
5360/* confdefs.h. */
5361_ACEOF
5362cat confdefs.h >>conftest.$ac_ext
5363cat >>conftest.$ac_ext <<_ACEOF
5364/* end confdefs.h. */
5365#include <string.h>
5366
5367_ACEOF
5368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5369 $EGREP "memchr" >/dev/null 2>&1; then
5370 :
5371else
5372 ac_cv_header_stdc=no
5373fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00005374rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005375
5376fi
5377
5378if test $ac_cv_header_stdc = yes; then
5379 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5380 cat >conftest.$ac_ext <<_ACEOF
5381/* confdefs.h. */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h. */
5386#include <stdlib.h>
5387
5388_ACEOF
5389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5390 $EGREP "free" >/dev/null 2>&1; then
5391 :
5392else
5393 ac_cv_header_stdc=no
5394fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00005395rm -f -r conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005396
5397fi
5398
5399if test $ac_cv_header_stdc = yes; then
5400 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5401 if test "$cross_compiling" = yes; then
5402 :
5403else
5404 cat >conftest.$ac_ext <<_ACEOF
5405/* confdefs.h. */
5406_ACEOF
5407cat confdefs.h >>conftest.$ac_ext
5408cat >>conftest.$ac_ext <<_ACEOF
5409/* end confdefs.h. */
5410#include <ctype.h>
5411#include <stdlib.h>
5412#if ((' ' & 0x0FF) == 0x020)
5413# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5414# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5415#else
5416# define ISLOWER(c) \
5417 (('a' <= (c) && (c) <= 'i') \
5418 || ('j' <= (c) && (c) <= 'r') \
5419 || ('s' <= (c) && (c) <= 'z'))
5420# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5421#endif
5422
5423#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5424int
5425main ()
5426{
5427 int i;
5428 for (i = 0; i < 256; i++)
5429 if (XOR (islower (i), ISLOWER (i))
5430 || toupper (i) != TOUPPER (i))
5431 return 2;
5432 return 0;
5433}
5434_ACEOF
5435rm -f conftest$ac_exeext
5436if { (ac_try="$ac_link"
5437case "(($ac_try" in
5438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5439 *) ac_try_echo=$ac_try;;
5440esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005442 (eval "$ac_link") 2>&5
5443 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5446 { (case "(($ac_try" in
5447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5448 *) ac_try_echo=$ac_try;;
5449esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005451 (eval "$ac_try") 2>&5
5452 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005454 (exit $ac_status); }; }; then
5455 :
5456else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005457 echo "$as_me: program exited with status $ac_status" >&5
5458echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005459sed 's/^/| /' conftest.$ac_ext >&5
5460
5461( exit $ac_status )
5462ac_cv_header_stdc=no
5463fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5465fi
5466
5467
5468fi
5469fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005470{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5471echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005472if test $ac_cv_header_stdc = yes; then
5473
5474cat >>confdefs.h <<\_ACEOF
5475#define STDC_HEADERS 1
5476_ACEOF
5477
5478fi
5479
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005480# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5491 inttypes.h stdint.h unistd.h
5492do
5493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5494{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5495echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5496if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5497 echo $ECHO_N "(cached) $ECHO_C" >&6
5498else
5499 cat >conftest.$ac_ext <<_ACEOF
5500/* confdefs.h. */
5501_ACEOF
5502cat confdefs.h >>conftest.$ac_ext
5503cat >>conftest.$ac_ext <<_ACEOF
5504/* end confdefs.h. */
5505$ac_includes_default
5506
5507#include <$ac_header>
5508_ACEOF
5509rm -f conftest.$ac_objext
5510if { (ac_try="$ac_compile"
5511case "(($ac_try" in
5512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5513 *) ac_try_echo=$ac_try;;
5514esac
5515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5516 (eval "$ac_compile") 2>conftest.er1
5517 ac_status=$?
5518 grep -v '^ *+' conftest.er1 >conftest.err
5519 rm -f conftest.er1
5520 cat conftest.err >&5
5521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5522 (exit $ac_status); } && {
5523 test -z "$ac_c_werror_flag" ||
5524 test ! -s conftest.err
5525 } && test -s conftest.$ac_objext; then
5526 eval "$as_ac_Header=yes"
5527else
5528 echo "$as_me: failed program was:" >&5
5529sed 's/^/| /' conftest.$ac_ext >&5
5530
5531 eval "$as_ac_Header=no"
5532fi
5533
5534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535fi
5536ac_res=`eval echo '${'$as_ac_Header'}'`
5537 { echo "$as_me:$LINENO: result: $ac_res" >&5
5538echo "${ECHO_T}$ac_res" >&6; }
5539if test `eval echo '${'$as_ac_Header'}'` = yes; then
5540 cat >>confdefs.h <<_ACEOF
5541#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5542_ACEOF
5543
5544fi
5545
5546done
5547
5548
Antoine Pitrou20327222009-05-24 20:39:11 +00005549
Martin v. Löwis11437992002-04-12 09:54:03 +00005550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
Anthony Baxter8a560de2004-10-13 15:30:56 +00005585
Martin v. Löwisc3001752005-01-23 09:27:24 +00005586
Martin v. Löwis11017b12006-01-14 18:12:57 +00005587
Thomas Wouters477c8d52006-05-27 19:21:47 +00005588
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005589
5590
5591
5592
5593
5594
5595
5596
Thomas Wouters89f507f2006-12-13 04:49:30 +00005597
Christian Heimes043d6f62008-01-07 17:19:16 +00005598
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005599
5600
Christian Heimesbbe741d2008-03-28 10:53:29 +00005601
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005602
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005603for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5604fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005605ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005606shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005607unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005608sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5609sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005610sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005611sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005612sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005613sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005614bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005615do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005616as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005617if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005618 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5619echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005620if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005621 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005622fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005623ac_res=`eval echo '${'$as_ac_Header'}'`
5624 { echo "$as_me:$LINENO: result: $ac_res" >&5
5625echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005626else
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005628{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5629echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005631/* confdefs.h. */
5632_ACEOF
5633cat confdefs.h >>conftest.$ac_ext
5634cat >>conftest.$ac_ext <<_ACEOF
5635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005636$ac_includes_default
5637#include <$ac_header>
5638_ACEOF
5639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005640if { (ac_try="$ac_compile"
5641case "(($ac_try" in
5642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5643 *) ac_try_echo=$ac_try;;
5644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005648 grep -v '^ *+' conftest.er1 >conftest.err
5649 rm -f conftest.er1
5650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652 (exit $ac_status); } && {
5653 test -z "$ac_c_werror_flag" ||
5654 test ! -s conftest.err
5655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005657else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005659sed 's/^/| /' conftest.$ac_ext >&5
5660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005661 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005663
5664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005665{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5666echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005667
5668# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005669{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5670echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005672/* confdefs.h. */
5673_ACEOF
5674cat confdefs.h >>conftest.$ac_ext
5675cat >>conftest.$ac_ext <<_ACEOF
5676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005677#include <$ac_header>
5678_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005679if { (ac_try="$ac_cpp conftest.$ac_ext"
5680case "(($ac_try" in
5681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5682 *) ac_try_echo=$ac_try;;
5683esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005685 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005686 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005687 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 rm -f conftest.er1
5689 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005691 (exit $ac_status); } >/dev/null && {
5692 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5693 test ! -s conftest.err
5694 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005695 ac_header_preproc=yes
5696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005698sed 's/^/| /' conftest.$ac_ext >&5
5699
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005702
Martin v. Löwis11437992002-04-12 09:54:03 +00005703rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005704{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5705echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005706
5707# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5709 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005710 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5711echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5713echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005714 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005715 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005716 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005717 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5718echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5719 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5720echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5721 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5722echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5723 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5724echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5725 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5726echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5727 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5728echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005729 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005730## -------------------------------------- ##
5731## Report this to http://bugs.python.org/ ##
5732## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005733_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005734 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005735 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005737{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5738echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005739if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005740 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005741else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005742 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005744ac_res=`eval echo '${'$as_ac_Header'}'`
5745 { echo "$as_me:$LINENO: result: $ac_res" >&5
5746echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005749if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005750 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005751#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005752_ACEOF
5753
5754fi
5755
Guido van Rossum627b2d71993-12-24 10:39:16 +00005756done
5757
Martin v. Löwis11437992002-04-12 09:54:03 +00005758
5759
5760
5761
5762
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005763ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005764for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005765 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5766{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5767echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005768if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005769 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005770else
Martin v. Löwis11437992002-04-12 09:54:03 +00005771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005772/* confdefs.h. */
5773_ACEOF
5774cat confdefs.h >>conftest.$ac_ext
5775cat >>conftest.$ac_ext <<_ACEOF
5776/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005777#include <sys/types.h>
5778#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005779
Martin v. Löwis11437992002-04-12 09:54:03 +00005780int
5781main ()
5782{
5783if ((DIR *) 0)
5784return 0;
5785 ;
5786 return 0;
5787}
5788_ACEOF
5789rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005790if { (ac_try="$ac_compile"
5791case "(($ac_try" in
5792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5793 *) ac_try_echo=$ac_try;;
5794esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005796 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005798 grep -v '^ *+' conftest.er1 >conftest.err
5799 rm -f conftest.er1
5800 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005802 (exit $ac_status); } && {
5803 test -z "$ac_c_werror_flag" ||
5804 test ! -s conftest.err
5805 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005806 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005807else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005809sed 's/^/| /' conftest.$ac_ext >&5
5810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005811 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005813
5814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005815fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005816ac_res=`eval echo '${'$as_ac_Header'}'`
5817 { echo "$as_me:$LINENO: result: $ac_res" >&5
5818echo "${ECHO_T}$ac_res" >&6; }
5819if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005821#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005822_ACEOF
5823
5824ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005825fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005826
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827done
5828# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5829if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005830 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5831echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005832if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005833 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005834else
Martin v. Löwis11437992002-04-12 09:54:03 +00005835 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005836cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005837/* confdefs.h. */
5838_ACEOF
5839cat confdefs.h >>conftest.$ac_ext
5840cat >>conftest.$ac_ext <<_ACEOF
5841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005843/* Override any GCC internal prototype to avoid an error.
5844 Use char because int might match the return type of a GCC
5845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005846#ifdef __cplusplus
5847extern "C"
5848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005849char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005850int
5851main ()
5852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005853return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005854 ;
5855 return 0;
5856}
5857_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005858for ac_lib in '' dir; do
5859 if test -z "$ac_lib"; then
5860 ac_res="none required"
5861 else
5862 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005863 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005864 fi
5865 rm -f conftest.$ac_objext conftest$ac_exeext
5866if { (ac_try="$ac_link"
5867case "(($ac_try" in
5868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5869 *) ac_try_echo=$ac_try;;
5870esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005872 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005873 ac_status=$?
5874 grep -v '^ *+' conftest.er1 >conftest.err
5875 rm -f conftest.er1
5876 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005878 (exit $ac_status); } && {
5879 test -z "$ac_c_werror_flag" ||
5880 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005881 } && test -s conftest$ac_exeext &&
5882 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005883 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005884else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005885 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005886sed 's/^/| /' conftest.$ac_ext >&5
5887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005888
Thomas Wouters477c8d52006-05-27 19:21:47 +00005889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005890
5891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5892 conftest$ac_exeext
5893 if test "${ac_cv_search_opendir+set}" = set; then
5894 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005896done
5897if test "${ac_cv_search_opendir+set}" = set; then
5898 :
5899else
5900 ac_cv_search_opendir=no
5901fi
5902rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005903LIBS=$ac_func_search_save_LIBS
5904fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005905{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5906echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005907ac_res=$ac_cv_search_opendir
5908if test "$ac_res" != no; then
5909 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005910
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005912
Michael W. Hudson54241132001-12-07 15:38:26 +00005913else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005914 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5915echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005916if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005918else
5919 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005921/* confdefs.h. */
5922_ACEOF
5923cat confdefs.h >>conftest.$ac_ext
5924cat >>conftest.$ac_ext <<_ACEOF
5925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927/* Override any GCC internal prototype to avoid an error.
5928 Use char because int might match the return type of a GCC
5929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005930#ifdef __cplusplus
5931extern "C"
5932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005933char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005934int
5935main ()
5936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005937return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005938 ;
5939 return 0;
5940}
5941_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942for ac_lib in '' x; do
5943 if test -z "$ac_lib"; then
5944 ac_res="none required"
5945 else
5946 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948 fi
5949 rm -f conftest.$ac_objext conftest$ac_exeext
5950if { (ac_try="$ac_link"
5951case "(($ac_try" in
5952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5953 *) ac_try_echo=$ac_try;;
5954esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005956 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005957 ac_status=$?
5958 grep -v '^ *+' conftest.er1 >conftest.err
5959 rm -f conftest.er1
5960 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005962 (exit $ac_status); } && {
5963 test -z "$ac_c_werror_flag" ||
5964 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005965 } && test -s conftest$ac_exeext &&
5966 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005967 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005968else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005969 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005970sed 's/^/| /' conftest.$ac_ext >&5
5971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005972
Thomas Wouters477c8d52006-05-27 19:21:47 +00005973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974
5975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5976 conftest$ac_exeext
5977 if test "${ac_cv_search_opendir+set}" = set; then
5978 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005980done
5981if test "${ac_cv_search_opendir+set}" = set; then
5982 :
5983else
5984 ac_cv_search_opendir=no
5985fi
5986rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005987LIBS=$ac_func_search_save_LIBS
5988fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005989{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5990echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005991ac_res=$ac_cv_search_opendir
5992if test "$ac_res" != no; then
5993 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995fi
5996
5997fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005998
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005999{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6000echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006001if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003else
6004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006005/* confdefs.h. */
6006_ACEOF
6007cat confdefs.h >>conftest.$ac_ext
6008cat >>conftest.$ac_ext <<_ACEOF
6009/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011int
6012main ()
6013{
6014return makedev(0, 0);
6015 ;
6016 return 0;
6017}
6018_ACEOF
6019rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006020if { (ac_try="$ac_link"
6021case "(($ac_try" in
6022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6023 *) ac_try_echo=$ac_try;;
6024esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006028 grep -v '^ *+' conftest.er1 >conftest.err
6029 rm -f conftest.er1
6030 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006032 (exit $ac_status); } && {
6033 test -z "$ac_c_werror_flag" ||
6034 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006035 } && test -s conftest$ac_exeext &&
6036 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037 ac_cv_header_sys_types_h_makedev=yes
6038else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006040sed 's/^/| /' conftest.$ac_ext >&5
6041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006044
6045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047
6048fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006049{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6050echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051
6052if test $ac_cv_header_sys_types_h_makedev = no; then
6053if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006054 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6055echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006059{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6060echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061else
6062 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006063{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6064echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006066/* confdefs.h. */
6067_ACEOF
6068cat confdefs.h >>conftest.$ac_ext
6069cat >>conftest.$ac_ext <<_ACEOF
6070/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071$ac_includes_default
6072#include <sys/mkdev.h>
6073_ACEOF
6074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075if { (ac_try="$ac_compile"
6076case "(($ac_try" in
6077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6078 *) ac_try_echo=$ac_try;;
6079esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083 grep -v '^ *+' conftest.er1 >conftest.err
6084 rm -f conftest.er1
6085 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087 (exit $ac_status); } && {
6088 test -z "$ac_c_werror_flag" ||
6089 test ! -s conftest.err
6090 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091 ac_header_compiler=yes
6092else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006094sed 's/^/| /' conftest.$ac_ext >&5
6095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098
6099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006100{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6101echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102
6103# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006104{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6105echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112#include <sys/mkdev.h>
6113_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114if { (ac_try="$ac_cpp conftest.$ac_ext"
6115case "(($ac_try" in
6116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6117 *) ac_try_echo=$ac_try;;
6118esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006122 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123 rm -f conftest.er1
6124 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126 (exit $ac_status); } >/dev/null && {
6127 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6128 test ! -s conftest.err
6129 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130 ac_header_preproc=yes
6131else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006133sed 's/^/| /' conftest.$ac_ext >&5
6134
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 ac_header_preproc=no
6136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006139{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6140echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141
6142# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006143case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6144 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006145 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6146echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006149 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006150 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006152 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6153echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6154 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6155echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6156 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6157echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6158 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6159echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6160 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6161echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6162 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6163echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006165## -------------------------------------- ##
6166## Report this to http://bugs.python.org/ ##
6167## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006168_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006170 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006171esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006172{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6173echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176else
6177 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6178fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006179{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6180echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181
6182fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006183if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184
6185cat >>confdefs.h <<\_ACEOF
6186#define MAJOR_IN_MKDEV 1
6187_ACEOF
6188
6189fi
6190
6191
6192
6193 if test $ac_cv_header_sys_mkdev_h = no; then
6194 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006195 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6196echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006198 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006200{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6201echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202else
6203 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006204{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6205echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006207/* confdefs.h. */
6208_ACEOF
6209cat confdefs.h >>conftest.$ac_ext
6210cat >>conftest.$ac_ext <<_ACEOF
6211/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212$ac_includes_default
6213#include <sys/sysmacros.h>
6214_ACEOF
6215rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216if { (ac_try="$ac_compile"
6217case "(($ac_try" in
6218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6219 *) ac_try_echo=$ac_try;;
6220esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006224 grep -v '^ *+' conftest.er1 >conftest.err
6225 rm -f conftest.er1
6226 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228 (exit $ac_status); } && {
6229 test -z "$ac_c_werror_flag" ||
6230 test ! -s conftest.err
6231 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 ac_header_compiler=yes
6233else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006235sed 's/^/| /' conftest.$ac_ext >&5
6236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006237 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239
6240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006241{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6242echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243
6244# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006245{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6246echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006248/* confdefs.h. */
6249_ACEOF
6250cat confdefs.h >>conftest.$ac_ext
6251cat >>conftest.$ac_ext <<_ACEOF
6252/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253#include <sys/sysmacros.h>
6254_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255if { (ac_try="$ac_cpp conftest.$ac_ext"
6256case "(($ac_try" in
6257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6258 *) ac_try_echo=$ac_try;;
6259esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006263 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 rm -f conftest.er1
6265 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267 (exit $ac_status); } >/dev/null && {
6268 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6269 test ! -s conftest.err
6270 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271 ac_header_preproc=yes
6272else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006274sed 's/^/| /' conftest.$ac_ext >&5
6275
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_header_preproc=no
6277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006278
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006280{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6281echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6285 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006290 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006292 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006293 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6294echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6295 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6296echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6297 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6298echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6299 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6300echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6301 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6302echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6303 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6304echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006306## -------------------------------------- ##
6307## Report this to http://bugs.python.org/ ##
6308## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006309_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006310 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006311 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006313{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6314echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317else
6318 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6319fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006320{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6321echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322
6323fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006324if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325
6326cat >>confdefs.h <<\_ACEOF
6327#define MAJOR_IN_SYSMACROS 1
6328_ACEOF
6329
6330fi
6331
6332
6333 fi
6334fi
6335
Michael W. Hudson54241132001-12-07 15:38:26 +00006336
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006338
6339for ac_header in term.h
6340do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006341as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6342{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6343echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006344if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006345 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346else
6347 cat >conftest.$ac_ext <<_ACEOF
6348/* confdefs.h. */
6349_ACEOF
6350cat confdefs.h >>conftest.$ac_ext
6351cat >>conftest.$ac_ext <<_ACEOF
6352/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006354#ifdef HAVE_CURSES_H
6355#include <curses.h>
6356#endif
6357
6358
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360_ACEOF
6361rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362if { (ac_try="$ac_compile"
6363case "(($ac_try" in
6364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6365 *) ac_try_echo=$ac_try;;
6366esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369 ac_status=$?
6370 grep -v '^ *+' conftest.er1 >conftest.err
6371 rm -f conftest.er1
6372 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374 (exit $ac_status); } && {
6375 test -z "$ac_c_werror_flag" ||
6376 test ! -s conftest.err
6377 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006378 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006380 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381sed 's/^/| /' conftest.$ac_ext >&5
6382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385
6386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006387fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006388ac_res=`eval echo '${'$as_ac_Header'}'`
6389 { echo "$as_me:$LINENO: result: $ac_res" >&5
6390echo "${ECHO_T}$ac_res" >&6; }
6391if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006392 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006393#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006394_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006396fi
6397
6398done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006399
6400
Martin v. Löwis11017b12006-01-14 18:12:57 +00006401# On Linux, netlink.h requires asm/types.h
6402
6403for ac_header in linux/netlink.h
6404do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006405as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6406{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6407echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006410else
6411 cat >conftest.$ac_ext <<_ACEOF
6412/* confdefs.h. */
6413_ACEOF
6414cat confdefs.h >>conftest.$ac_ext
6415cat >>conftest.$ac_ext <<_ACEOF
6416/* end confdefs.h. */
6417
6418#ifdef HAVE_ASM_TYPES_H
6419#include <asm/types.h>
6420#endif
6421#ifdef HAVE_SYS_SOCKET_H
6422#include <sys/socket.h>
6423#endif
6424
6425
6426#include <$ac_header>
6427_ACEOF
6428rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429if { (ac_try="$ac_compile"
6430case "(($ac_try" in
6431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6432 *) ac_try_echo=$ac_try;;
6433esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436 ac_status=$?
6437 grep -v '^ *+' conftest.er1 >conftest.err
6438 rm -f conftest.er1
6439 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441 (exit $ac_status); } && {
6442 test -z "$ac_c_werror_flag" ||
6443 test ! -s conftest.err
6444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445 eval "$as_ac_Header=yes"
6446else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006447 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006448sed 's/^/| /' conftest.$ac_ext >&5
6449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006450 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452
6453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006454fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006455ac_res=`eval echo '${'$as_ac_Header'}'`
6456 { echo "$as_me:$LINENO: result: $ac_res" >&5
6457echo "${ECHO_T}$ac_res" >&6; }
6458if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006459 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006460#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006461_ACEOF
6462
6463fi
6464
6465done
6466
6467
Guido van Rossum627b2d71993-12-24 10:39:16 +00006468# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006469was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006470{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6471echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006472cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006473/* confdefs.h. */
6474_ACEOF
6475cat confdefs.h >>conftest.$ac_ext
6476cat >>conftest.$ac_ext <<_ACEOF
6477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006479
6480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006482 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006483 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006484else
Martin v. Löwis11437992002-04-12 09:54:03 +00006485
6486
6487cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006489_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006490
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006491
Guido van Rossum627b2d71993-12-24 10:39:16 +00006492fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00006493rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006495{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6496echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006497
Neal Norwitz11690112002-07-30 01:08:28 +00006498# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006499{ echo "$as_me:$LINENO: checking for makedev" >&5
6500echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006502/* confdefs.h. */
6503_ACEOF
6504cat confdefs.h >>conftest.$ac_ext
6505cat >>conftest.$ac_ext <<_ACEOF
6506/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006507#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006508int
6509main ()
6510{
6511 makedev(0, 0)
6512 ;
6513 return 0;
6514}
6515_ACEOF
6516rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006517if { (ac_try="$ac_link"
6518case "(($ac_try" in
6519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6520 *) ac_try_echo=$ac_try;;
6521esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006523 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006525 grep -v '^ *+' conftest.er1 >conftest.err
6526 rm -f conftest.er1
6527 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006529 (exit $ac_status); } && {
6530 test -z "$ac_c_werror_flag" ||
6531 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006532 } && test -s conftest$ac_exeext &&
6533 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006534 ac_cv_has_makedev=yes
6535else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006537sed 's/^/| /' conftest.$ac_ext >&5
6538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006541
6542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006543 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006544if test "$ac_cv_has_makedev" = "no"; then
6545 # we didn't link, try if _OSF_SOURCE will allow us to link
6546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006547/* confdefs.h. */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006552
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006553#define _OSF_SOURCE 1
6554#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006555
Neal Norwitz11690112002-07-30 01:08:28 +00006556int
6557main ()
6558{
6559 makedev(0, 0)
6560 ;
6561 return 0;
6562}
6563_ACEOF
6564rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565if { (ac_try="$ac_link"
6566case "(($ac_try" in
6567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6568 *) ac_try_echo=$ac_try;;
6569esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006573 grep -v '^ *+' conftest.er1 >conftest.err
6574 rm -f conftest.er1
6575 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006577 (exit $ac_status); } && {
6578 test -z "$ac_c_werror_flag" ||
6579 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006580 } && test -s conftest$ac_exeext &&
6581 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006582 ac_cv_has_makedev=yes
6583else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006585sed 's/^/| /' conftest.$ac_ext >&5
6586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006589
6590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006591 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006592 if test "$ac_cv_has_makedev" = "yes"; then
6593
6594cat >>confdefs.h <<\_ACEOF
6595#define _OSF_SOURCE 1
6596_ACEOF
6597
6598 fi
6599fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006600{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6601echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006602if test "$ac_cv_has_makedev" = "yes"; then
6603
6604cat >>confdefs.h <<\_ACEOF
6605#define HAVE_MAKEDEV 1
6606_ACEOF
6607
6608fi
6609
Martin v. Löwis399a6892002-10-04 10:22:02 +00006610# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6611# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6612# defined, but the compiler does not support pragma redefine_extname,
6613# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6614# structures (such as rlimit64) without declaring them. As a
6615# work-around, disable LFS on such configurations
6616
6617use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006618{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6619echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +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. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626
6627#define _LARGEFILE_SOURCE 1
6628#define _FILE_OFFSET_BITS 64
6629#include <sys/resource.h>
6630
Martin v. Löwis399a6892002-10-04 10:22:02 +00006631int
6632main ()
6633{
6634struct rlimit foo;
6635 ;
6636 return 0;
6637}
6638_ACEOF
6639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640if { (ac_try="$ac_compile"
6641case "(($ac_try" in
6642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6643 *) ac_try_echo=$ac_try;;
6644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006648 grep -v '^ *+' conftest.er1 >conftest.err
6649 rm -f conftest.er1
6650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652 (exit $ac_status); } && {
6653 test -z "$ac_c_werror_flag" ||
6654 test ! -s conftest.err
6655 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006656 sol_lfs_bug=no
6657else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006659sed 's/^/| /' conftest.$ac_ext >&5
6660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663
6664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006665{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6666echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006667if test "$sol_lfs_bug" = "yes"; then
6668 use_lfs=no
6669fi
6670
6671if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006672# Two defines needed to enable largefile support on various platforms
6673# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006674
Martin v. Löwis11437992002-04-12 09:54:03 +00006675cat >>confdefs.h <<\_ACEOF
6676#define _LARGEFILE_SOURCE 1
6677_ACEOF
6678
6679
6680cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006681#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006682_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006683
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006685
Guido van Rossum84e7b241996-08-19 21:59:00 +00006686# Add some code to confdefs.h so that the test for off_t works on SCO
6687cat >> confdefs.h <<\EOF
6688#if defined(SCO_DS)
6689#undef _OFF_T
6690#endif
6691EOF
6692
Guido van Rossumef2255b2000-03-10 22:30:29 +00006693# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006694{ echo "$as_me:$LINENO: checking for mode_t" >&5
6695echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006696if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006698else
Benjamin Petersona8332062009-09-11 22:36:27 +00006699 cat >conftest.$ac_ext <<_ACEOF
6700/* confdefs.h. */
6701_ACEOF
6702cat confdefs.h >>conftest.$ac_ext
6703cat >>conftest.$ac_ext <<_ACEOF
6704/* end confdefs.h. */
6705$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006706typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006707int
6708main ()
6709{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006710if ((ac__type_new_ *) 0)
6711 return 0;
6712if (sizeof (ac__type_new_))
6713 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006714 ;
6715 return 0;
6716}
6717_ACEOF
6718rm -f conftest.$ac_objext
6719if { (ac_try="$ac_compile"
6720case "(($ac_try" in
6721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6722 *) ac_try_echo=$ac_try;;
6723esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006725 (eval "$ac_compile") 2>conftest.er1
6726 ac_status=$?
6727 grep -v '^ *+' conftest.er1 >conftest.err
6728 rm -f conftest.er1
6729 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006731 (exit $ac_status); } && {
6732 test -z "$ac_c_werror_flag" ||
6733 test ! -s conftest.err
6734 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006735 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006736else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006738sed 's/^/| /' conftest.$ac_ext >&5
6739
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006740 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006742
6743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006744fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006745{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6746echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6747if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006748 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749else
Martin v. Löwis11437992002-04-12 09:54:03 +00006750
6751cat >>confdefs.h <<_ACEOF
6752#define mode_t int
6753_ACEOF
6754
6755fi
6756
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006757{ echo "$as_me:$LINENO: checking for off_t" >&5
6758echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006759if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006760 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Benjamin Petersona8332062009-09-11 22:36:27 +00006762 cat >conftest.$ac_ext <<_ACEOF
6763/* confdefs.h. */
6764_ACEOF
6765cat confdefs.h >>conftest.$ac_ext
6766cat >>conftest.$ac_ext <<_ACEOF
6767/* end confdefs.h. */
6768$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006769typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006770int
6771main ()
6772{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006773if ((ac__type_new_ *) 0)
6774 return 0;
6775if (sizeof (ac__type_new_))
6776 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006777 ;
6778 return 0;
6779}
6780_ACEOF
6781rm -f conftest.$ac_objext
6782if { (ac_try="$ac_compile"
6783case "(($ac_try" in
6784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6785 *) ac_try_echo=$ac_try;;
6786esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006788 (eval "$ac_compile") 2>conftest.er1
6789 ac_status=$?
6790 grep -v '^ *+' conftest.er1 >conftest.err
6791 rm -f conftest.er1
6792 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006794 (exit $ac_status); } && {
6795 test -z "$ac_c_werror_flag" ||
6796 test ! -s conftest.err
6797 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006798 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006801sed 's/^/| /' conftest.$ac_ext >&5
6802
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006803 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805
6806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006807fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006808{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6809echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6810if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006811 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006812else
Martin v. Löwis11437992002-04-12 09:54:03 +00006813
6814cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
6817
6818fi
6819
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006820{ echo "$as_me:$LINENO: checking for pid_t" >&5
6821echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006822if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006823 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006824else
Benjamin Petersona8332062009-09-11 22:36:27 +00006825 cat >conftest.$ac_ext <<_ACEOF
6826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
6831$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006832typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006833int
6834main ()
6835{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006836if ((ac__type_new_ *) 0)
6837 return 0;
6838if (sizeof (ac__type_new_))
6839 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006840 ;
6841 return 0;
6842}
6843_ACEOF
6844rm -f conftest.$ac_objext
6845if { (ac_try="$ac_compile"
6846case "(($ac_try" in
6847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6848 *) ac_try_echo=$ac_try;;
6849esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006851 (eval "$ac_compile") 2>conftest.er1
6852 ac_status=$?
6853 grep -v '^ *+' conftest.er1 >conftest.err
6854 rm -f conftest.er1
6855 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006857 (exit $ac_status); } && {
6858 test -z "$ac_c_werror_flag" ||
6859 test ! -s conftest.err
6860 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006861 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006862else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006864sed 's/^/| /' conftest.$ac_ext >&5
6865
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006866 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868
6869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006870fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006871{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6872echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6873if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006874 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006875else
Martin v. Löwis11437992002-04-12 09:54:03 +00006876
6877cat >>confdefs.h <<_ACEOF
6878#define pid_t int
6879_ACEOF
6880
6881fi
6882
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006883{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6884echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006885if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006887else
6888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006889/* confdefs.h. */
6890_ACEOF
6891cat confdefs.h >>conftest.$ac_ext
6892cat >>conftest.$ac_ext <<_ACEOF
6893/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006894#include <sys/types.h>
6895#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897int
6898main ()
6899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006900return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906if { (ac_try="$ac_compile"
6907case "(($ac_try" in
6908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6909 *) ac_try_echo=$ac_try;;
6910esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006914 grep -v '^ *+' conftest.er1 >conftest.err
6915 rm -f conftest.er1
6916 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918 (exit $ac_status); } && {
6919 test -z "$ac_c_werror_flag" ||
6920 test ! -s conftest.err
6921 } && test -s conftest.$ac_objext; then
6922 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006923else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006925sed 's/^/| /' conftest.$ac_ext >&5
6926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006927 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929
6930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006931fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006932{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6933echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006934
Martin v. Löwis11437992002-04-12 09:54:03 +00006935cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006937_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938
Michael W. Hudson54241132001-12-07 15:38:26 +00006939
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006940{ echo "$as_me:$LINENO: checking for size_t" >&5
6941echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006942if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006944else
Benjamin Petersona8332062009-09-11 22:36:27 +00006945 cat >conftest.$ac_ext <<_ACEOF
6946/* confdefs.h. */
6947_ACEOF
6948cat confdefs.h >>conftest.$ac_ext
6949cat >>conftest.$ac_ext <<_ACEOF
6950/* end confdefs.h. */
6951$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006952typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006953int
6954main ()
6955{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006956if ((ac__type_new_ *) 0)
6957 return 0;
6958if (sizeof (ac__type_new_))
6959 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006960 ;
6961 return 0;
6962}
6963_ACEOF
6964rm -f conftest.$ac_objext
6965if { (ac_try="$ac_compile"
6966case "(($ac_try" in
6967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6968 *) ac_try_echo=$ac_try;;
6969esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006971 (eval "$ac_compile") 2>conftest.er1
6972 ac_status=$?
6973 grep -v '^ *+' conftest.er1 >conftest.err
6974 rm -f conftest.er1
6975 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006977 (exit $ac_status); } && {
6978 test -z "$ac_c_werror_flag" ||
6979 test ! -s conftest.err
6980 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006981 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006982else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006984sed 's/^/| /' conftest.$ac_ext >&5
6985
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006986 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988
6989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006990fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006991{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6992echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6993if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006994 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995else
Martin v. Löwis11437992002-04-12 09:54:03 +00006996
6997cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006999_ACEOF
7000
7001fi
7002
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007003{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7004echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007005if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007006 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007007else
7008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007009/* confdefs.h. */
7010_ACEOF
7011cat confdefs.h >>conftest.$ac_ext
7012cat >>conftest.$ac_ext <<_ACEOF
7013/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007015
7016_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007018 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007019 ac_cv_type_uid_t=yes
7020else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021 ac_cv_type_uid_t=no
7022fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +00007023rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007025fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007026{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7027echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007028if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029
Martin v. Löwis11437992002-04-12 09:54:03 +00007030cat >>confdefs.h <<\_ACEOF
7031#define uid_t int
7032_ACEOF
7033
7034
7035cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007036#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007037_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038
7039fi
7040
Mark Dickinsonbd792642009-03-18 20:06:12 +00007041
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007042 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7043echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007044if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007045 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007046else
7047 ac_cv_c_uint32_t=no
7048 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7049 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7050 cat >conftest.$ac_ext <<_ACEOF
7051/* confdefs.h. */
7052_ACEOF
7053cat confdefs.h >>conftest.$ac_ext
7054cat >>conftest.$ac_ext <<_ACEOF
7055/* end confdefs.h. */
7056$ac_includes_default
7057int
7058main ()
7059{
7060static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7061test_array [0] = 0
7062
7063 ;
7064 return 0;
7065}
7066_ACEOF
7067rm -f conftest.$ac_objext
7068if { (ac_try="$ac_compile"
7069case "(($ac_try" in
7070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7071 *) ac_try_echo=$ac_try;;
7072esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007074 (eval "$ac_compile") 2>conftest.er1
7075 ac_status=$?
7076 grep -v '^ *+' conftest.er1 >conftest.err
7077 rm -f conftest.er1
7078 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007080 (exit $ac_status); } && {
7081 test -z "$ac_c_werror_flag" ||
7082 test ! -s conftest.err
7083 } && test -s conftest.$ac_objext; then
7084 case $ac_type in
7085 uint32_t) ac_cv_c_uint32_t=yes ;;
7086 *) ac_cv_c_uint32_t=$ac_type ;;
7087esac
7088
7089else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007090 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007091sed 's/^/| /' conftest.$ac_ext >&5
7092
7093
7094fi
7095
7096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7097 test "$ac_cv_c_uint32_t" != no && break
7098 done
7099fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007100{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7101echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007102 case $ac_cv_c_uint32_t in #(
7103 no|yes) ;; #(
7104 *)
7105
7106cat >>confdefs.h <<\_ACEOF
7107#define _UINT32_T 1
7108_ACEOF
7109
7110
7111cat >>confdefs.h <<_ACEOF
7112#define uint32_t $ac_cv_c_uint32_t
7113_ACEOF
7114;;
7115 esac
7116
7117
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007118 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7119echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007120if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007121 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007122else
7123 ac_cv_c_uint64_t=no
7124 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7125 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7126 cat >conftest.$ac_ext <<_ACEOF
7127/* confdefs.h. */
7128_ACEOF
7129cat confdefs.h >>conftest.$ac_ext
7130cat >>conftest.$ac_ext <<_ACEOF
7131/* end confdefs.h. */
7132$ac_includes_default
7133int
7134main ()
7135{
7136static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7137test_array [0] = 0
7138
7139 ;
7140 return 0;
7141}
7142_ACEOF
7143rm -f conftest.$ac_objext
7144if { (ac_try="$ac_compile"
7145case "(($ac_try" in
7146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7147 *) ac_try_echo=$ac_try;;
7148esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007150 (eval "$ac_compile") 2>conftest.er1
7151 ac_status=$?
7152 grep -v '^ *+' conftest.er1 >conftest.err
7153 rm -f conftest.er1
7154 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007156 (exit $ac_status); } && {
7157 test -z "$ac_c_werror_flag" ||
7158 test ! -s conftest.err
7159 } && test -s conftest.$ac_objext; then
7160 case $ac_type in
7161 uint64_t) ac_cv_c_uint64_t=yes ;;
7162 *) ac_cv_c_uint64_t=$ac_type ;;
7163esac
7164
7165else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007166 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007167sed 's/^/| /' conftest.$ac_ext >&5
7168
7169
7170fi
7171
7172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173 test "$ac_cv_c_uint64_t" != no && break
7174 done
7175fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007176{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7177echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007178 case $ac_cv_c_uint64_t in #(
7179 no|yes) ;; #(
7180 *)
7181
7182cat >>confdefs.h <<\_ACEOF
7183#define _UINT64_T 1
7184_ACEOF
7185
7186
7187cat >>confdefs.h <<_ACEOF
7188#define uint64_t $ac_cv_c_uint64_t
7189_ACEOF
7190;;
7191 esac
7192
7193
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007194 { echo "$as_me:$LINENO: checking for int32_t" >&5
7195echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007196if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007197 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007198else
7199 ac_cv_c_int32_t=no
7200 for ac_type in 'int32_t' 'int' 'long int' \
7201 'long long int' 'short int' 'signed char'; do
7202 cat >conftest.$ac_ext <<_ACEOF
7203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
7208$ac_includes_default
7209int
7210main ()
7211{
7212static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7213test_array [0] = 0
7214
7215 ;
7216 return 0;
7217}
7218_ACEOF
7219rm -f conftest.$ac_objext
7220if { (ac_try="$ac_compile"
7221case "(($ac_try" in
7222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7223 *) ac_try_echo=$ac_try;;
7224esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007226 (eval "$ac_compile") 2>conftest.er1
7227 ac_status=$?
7228 grep -v '^ *+' conftest.er1 >conftest.err
7229 rm -f conftest.er1
7230 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007232 (exit $ac_status); } && {
7233 test -z "$ac_c_werror_flag" ||
7234 test ! -s conftest.err
7235 } && test -s conftest.$ac_objext; then
7236 cat >conftest.$ac_ext <<_ACEOF
7237/* confdefs.h. */
7238_ACEOF
7239cat confdefs.h >>conftest.$ac_ext
7240cat >>conftest.$ac_ext <<_ACEOF
7241/* end confdefs.h. */
7242$ac_includes_default
7243int
7244main ()
7245{
7246static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007247 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007248test_array [0] = 0
7249
7250 ;
7251 return 0;
7252}
7253_ACEOF
7254rm -f conftest.$ac_objext
7255if { (ac_try="$ac_compile"
7256case "(($ac_try" in
7257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7258 *) ac_try_echo=$ac_try;;
7259esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007261 (eval "$ac_compile") 2>conftest.er1
7262 ac_status=$?
7263 grep -v '^ *+' conftest.er1 >conftest.err
7264 rm -f conftest.er1
7265 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007267 (exit $ac_status); } && {
7268 test -z "$ac_c_werror_flag" ||
7269 test ! -s conftest.err
7270 } && test -s conftest.$ac_objext; then
7271 :
7272else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007273 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007274sed 's/^/| /' conftest.$ac_ext >&5
7275
7276 case $ac_type in
7277 int32_t) ac_cv_c_int32_t=yes ;;
7278 *) ac_cv_c_int32_t=$ac_type ;;
7279esac
7280
7281fi
7282
7283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7284else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007285 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +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_int32_t" != no && break
7293 done
7294fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007295{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7296echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007297 case $ac_cv_c_int32_t in #(
7298 no|yes) ;; #(
7299 *)
7300
7301cat >>confdefs.h <<_ACEOF
7302#define int32_t $ac_cv_c_int32_t
7303_ACEOF
7304;;
7305 esac
7306
7307
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007308 { echo "$as_me:$LINENO: checking for int64_t" >&5
7309echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007310if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007311 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007312else
7313 ac_cv_c_int64_t=no
7314 for ac_type in 'int64_t' 'int' 'long int' \
7315 'long long int' 'short int' 'signed char'; do
7316 cat >conftest.$ac_ext <<_ACEOF
7317/* confdefs.h. */
7318_ACEOF
7319cat confdefs.h >>conftest.$ac_ext
7320cat >>conftest.$ac_ext <<_ACEOF
7321/* end confdefs.h. */
7322$ac_includes_default
7323int
7324main ()
7325{
7326static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7327test_array [0] = 0
7328
7329 ;
7330 return 0;
7331}
7332_ACEOF
7333rm -f conftest.$ac_objext
7334if { (ac_try="$ac_compile"
7335case "(($ac_try" in
7336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7337 *) ac_try_echo=$ac_try;;
7338esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007340 (eval "$ac_compile") 2>conftest.er1
7341 ac_status=$?
7342 grep -v '^ *+' conftest.er1 >conftest.err
7343 rm -f conftest.er1
7344 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007346 (exit $ac_status); } && {
7347 test -z "$ac_c_werror_flag" ||
7348 test ! -s conftest.err
7349 } && test -s conftest.$ac_objext; then
7350 cat >conftest.$ac_ext <<_ACEOF
7351/* confdefs.h. */
7352_ACEOF
7353cat confdefs.h >>conftest.$ac_ext
7354cat >>conftest.$ac_ext <<_ACEOF
7355/* end confdefs.h. */
7356$ac_includes_default
7357int
7358main ()
7359{
7360static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007361 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007362test_array [0] = 0
7363
7364 ;
7365 return 0;
7366}
7367_ACEOF
7368rm -f conftest.$ac_objext
7369if { (ac_try="$ac_compile"
7370case "(($ac_try" in
7371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7372 *) ac_try_echo=$ac_try;;
7373esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007375 (eval "$ac_compile") 2>conftest.er1
7376 ac_status=$?
7377 grep -v '^ *+' conftest.er1 >conftest.err
7378 rm -f conftest.er1
7379 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007381 (exit $ac_status); } && {
7382 test -z "$ac_c_werror_flag" ||
7383 test ! -s conftest.err
7384 } && test -s conftest.$ac_objext; then
7385 :
7386else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007387 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007388sed 's/^/| /' conftest.$ac_ext >&5
7389
7390 case $ac_type in
7391 int64_t) ac_cv_c_int64_t=yes ;;
7392 *) ac_cv_c_int64_t=$ac_type ;;
7393esac
7394
7395fi
7396
7397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7398else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007399 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007400sed 's/^/| /' conftest.$ac_ext >&5
7401
7402
7403fi
7404
7405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7406 test "$ac_cv_c_int64_t" != no && break
7407 done
7408fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007409{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7410echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007411 case $ac_cv_c_int64_t in #(
7412 no|yes) ;; #(
7413 *)
7414
7415cat >>confdefs.h <<_ACEOF
7416#define int64_t $ac_cv_c_int64_t
7417_ACEOF
7418;;
7419 esac
7420
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007421{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7422echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007423if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007425else
Benjamin Petersona8332062009-09-11 22:36:27 +00007426 cat >conftest.$ac_ext <<_ACEOF
7427/* confdefs.h. */
7428_ACEOF
7429cat confdefs.h >>conftest.$ac_ext
7430cat >>conftest.$ac_ext <<_ACEOF
7431/* end confdefs.h. */
7432$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007433typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007434int
7435main ()
7436{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007437if ((ac__type_new_ *) 0)
7438 return 0;
7439if (sizeof (ac__type_new_))
7440 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007441 ;
7442 return 0;
7443}
7444_ACEOF
7445rm -f conftest.$ac_objext
7446if { (ac_try="$ac_compile"
7447case "(($ac_try" in
7448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7449 *) ac_try_echo=$ac_try;;
7450esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007452 (eval "$ac_compile") 2>conftest.er1
7453 ac_status=$?
7454 grep -v '^ *+' conftest.er1 >conftest.err
7455 rm -f conftest.er1
7456 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007458 (exit $ac_status); } && {
7459 test -z "$ac_c_werror_flag" ||
7460 test ! -s conftest.err
7461 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007462 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007463else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007464 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007465sed 's/^/| /' conftest.$ac_ext >&5
7466
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007467 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007469
7470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007471fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007472{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7473echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7474if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007475
7476cat >>confdefs.h <<\_ACEOF
7477#define HAVE_SSIZE_T 1
7478_ACEOF
7479
7480fi
7481
Jack Jansendd19cf82001-12-06 22:36:17 +00007482
Michael W. Hudson54241132001-12-07 15:38:26 +00007483# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007484# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007485{ echo "$as_me:$LINENO: checking for int" >&5
7486echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7487if test "${ac_cv_type_int+set}" = set; then
7488 echo $ECHO_N "(cached) $ECHO_C" >&6
7489else
7490 cat >conftest.$ac_ext <<_ACEOF
7491/* confdefs.h. */
7492_ACEOF
7493cat confdefs.h >>conftest.$ac_ext
7494cat >>conftest.$ac_ext <<_ACEOF
7495/* end confdefs.h. */
7496$ac_includes_default
7497typedef int ac__type_new_;
7498int
7499main ()
7500{
7501if ((ac__type_new_ *) 0)
7502 return 0;
7503if (sizeof (ac__type_new_))
7504 return 0;
7505 ;
7506 return 0;
7507}
7508_ACEOF
7509rm -f conftest.$ac_objext
7510if { (ac_try="$ac_compile"
7511case "(($ac_try" in
7512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7513 *) ac_try_echo=$ac_try;;
7514esac
7515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7516 (eval "$ac_compile") 2>conftest.er1
7517 ac_status=$?
7518 grep -v '^ *+' conftest.er1 >conftest.err
7519 rm -f conftest.er1
7520 cat conftest.err >&5
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); } && {
7523 test -z "$ac_c_werror_flag" ||
7524 test ! -s conftest.err
7525 } && test -s conftest.$ac_objext; then
7526 ac_cv_type_int=yes
7527else
7528 echo "$as_me: failed program was:" >&5
7529sed 's/^/| /' conftest.$ac_ext >&5
7530
7531 ac_cv_type_int=no
7532fi
7533
7534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7535fi
7536{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7537echo "${ECHO_T}$ac_cv_type_int" >&6; }
7538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539# The cast to long int works around a bug in the HP C Compiler
7540# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7541# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7542# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007543{ echo "$as_me:$LINENO: checking size of int" >&5
7544echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007545if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007547else
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 if test "$cross_compiling" = yes; then
7549 # Depending upon the size, compute the lo and hi bounds.
7550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007551/* confdefs.h. */
7552_ACEOF
7553cat confdefs.h >>conftest.$ac_ext
7554cat >>conftest.$ac_ext <<_ACEOF
7555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007556$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007557 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007558int
7559main ()
7560{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007562test_array [0] = 0
7563
7564 ;
7565 return 0;
7566}
7567_ACEOF
7568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007569if { (ac_try="$ac_compile"
7570case "(($ac_try" in
7571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7572 *) ac_try_echo=$ac_try;;
7573esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007577 grep -v '^ *+' conftest.er1 >conftest.err
7578 rm -f conftest.er1
7579 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007581 (exit $ac_status); } && {
7582 test -z "$ac_c_werror_flag" ||
7583 test ! -s conftest.err
7584 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 ac_lo=0 ac_mid=0
7586 while :; do
7587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007594 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606if { (ac_try="$ac_compile"
7607case "(($ac_try" in
7608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7609 *) ac_try_echo=$ac_try;;
7610esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007614 grep -v '^ *+' conftest.er1 >conftest.err
7615 rm -f conftest.er1
7616 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618 (exit $ac_status); } && {
7619 test -z "$ac_c_werror_flag" ||
7620 test ! -s conftest.err
7621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 ac_hi=$ac_mid; break
7623else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007625sed 's/^/| /' conftest.$ac_ext >&5
7626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627 ac_lo=`expr $ac_mid + 1`
7628 if test $ac_lo -le $ac_mid; then
7629 ac_lo= ac_hi=
7630 break
7631 fi
7632 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634
7635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 done
7637else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007639sed 's/^/| /' conftest.$ac_ext >&5
7640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007642/* confdefs.h. */
7643_ACEOF
7644cat confdefs.h >>conftest.$ac_ext
7645cat >>conftest.$ac_ext <<_ACEOF
7646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007647$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007648 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007649int
7650main ()
7651{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007652static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007653test_array [0] = 0
7654
7655 ;
7656 return 0;
7657}
7658_ACEOF
7659rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660if { (ac_try="$ac_compile"
7661case "(($ac_try" in
7662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7663 *) ac_try_echo=$ac_try;;
7664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007668 grep -v '^ *+' conftest.er1 >conftest.err
7669 rm -f conftest.er1
7670 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672 (exit $ac_status); } && {
7673 test -z "$ac_c_werror_flag" ||
7674 test ! -s conftest.err
7675 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007676 ac_hi=-1 ac_mid=-1
7677 while :; do
7678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007679/* confdefs.h. */
7680_ACEOF
7681cat confdefs.h >>conftest.$ac_ext
7682cat >>conftest.$ac_ext <<_ACEOF
7683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007684$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007685 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007686int
7687main ()
7688{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007690test_array [0] = 0
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697if { (ac_try="$ac_compile"
7698case "(($ac_try" in
7699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7700 *) ac_try_echo=$ac_try;;
7701esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007705 grep -v '^ *+' conftest.er1 >conftest.err
7706 rm -f conftest.er1
7707 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709 (exit $ac_status); } && {
7710 test -z "$ac_c_werror_flag" ||
7711 test ! -s conftest.err
7712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 ac_lo=$ac_mid; break
7714else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007716sed 's/^/| /' conftest.$ac_ext >&5
7717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718 ac_hi=`expr '(' $ac_mid ')' - 1`
7719 if test $ac_mid -le $ac_hi; then
7720 ac_lo= ac_hi=
7721 break
7722 fi
7723 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725
7726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 done
7728else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007730sed 's/^/| /' conftest.$ac_ext >&5
7731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734
7735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737
7738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007739# Binary search between lo and hi bounds.
7740while test "x$ac_lo" != "x$ac_hi"; do
7741 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007743/* confdefs.h. */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007748$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007749 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
7752{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007754test_array [0] = 0
7755
7756 ;
7757 return 0;
7758}
7759_ACEOF
7760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761if { (ac_try="$ac_compile"
7762case "(($ac_try" in
7763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7764 *) ac_try_echo=$ac_try;;
7765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007769 grep -v '^ *+' conftest.er1 >conftest.err
7770 rm -f conftest.er1
7771 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773 (exit $ac_status); } && {
7774 test -z "$ac_c_werror_flag" ||
7775 test ! -s conftest.err
7776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_hi=$ac_mid
7778else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007780sed 's/^/| /' conftest.$ac_ext >&5
7781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784
7785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007786done
7787case $ac_lo in
7788?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007790 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007791See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007792echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007793See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007794 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 else
7796 ac_cv_sizeof_int=0
7797 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007798esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007799else
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007801/* confdefs.h. */
7802_ACEOF
7803cat confdefs.h >>conftest.$ac_ext
7804cat >>conftest.$ac_ext <<_ACEOF
7805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007806$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007807 typedef int ac__type_sizeof_;
7808static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7809static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007811#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007812int
7813main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007814{
Martin v. Löwis11437992002-04-12 09:54:03 +00007815
7816 FILE *f = fopen ("conftest.val", "w");
7817 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007819 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007824 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 }
7826 else
7827 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007829 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007831 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007834
7835 ;
7836 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007837}
Martin v. Löwis11437992002-04-12 09:54:03 +00007838_ACEOF
7839rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840if { (ac_try="$ac_link"
7841case "(($ac_try" in
7842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7843 *) ac_try_echo=$ac_try;;
7844esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850 { (case "(($ac_try" in
7851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7852 *) ac_try_echo=$ac_try;;
7853esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 (exit $ac_status); }; }; then
7859 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007860else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007861 echo "$as_me: program exited with status $ac_status" >&5
7862echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007863sed 's/^/| /' conftest.$ac_ext >&5
7864
Martin v. Löwis11437992002-04-12 09:54:03 +00007865( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007867 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007868See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007869echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007870See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007871 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 else
7873 ac_cv_sizeof_int=0
7874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876rm -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 +00007877fi
7878rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007879fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007880{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7881echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882
7883
7884
Martin v. Löwis11437992002-04-12 09:54:03 +00007885cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007886#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007887_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007888
7889
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007890{ echo "$as_me:$LINENO: checking for long" >&5
7891echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7892if test "${ac_cv_type_long+set}" = set; then
7893 echo $ECHO_N "(cached) $ECHO_C" >&6
7894else
7895 cat >conftest.$ac_ext <<_ACEOF
7896/* confdefs.h. */
7897_ACEOF
7898cat confdefs.h >>conftest.$ac_ext
7899cat >>conftest.$ac_ext <<_ACEOF
7900/* end confdefs.h. */
7901$ac_includes_default
7902typedef long ac__type_new_;
7903int
7904main ()
7905{
7906if ((ac__type_new_ *) 0)
7907 return 0;
7908if (sizeof (ac__type_new_))
7909 return 0;
7910 ;
7911 return 0;
7912}
7913_ACEOF
7914rm -f conftest.$ac_objext
7915if { (ac_try="$ac_compile"
7916case "(($ac_try" in
7917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7918 *) ac_try_echo=$ac_try;;
7919esac
7920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7921 (eval "$ac_compile") 2>conftest.er1
7922 ac_status=$?
7923 grep -v '^ *+' conftest.er1 >conftest.err
7924 rm -f conftest.er1
7925 cat conftest.err >&5
7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7927 (exit $ac_status); } && {
7928 test -z "$ac_c_werror_flag" ||
7929 test ! -s conftest.err
7930 } && test -s conftest.$ac_objext; then
7931 ac_cv_type_long=yes
7932else
7933 echo "$as_me: failed program was:" >&5
7934sed 's/^/| /' conftest.$ac_ext >&5
7935
7936 ac_cv_type_long=no
7937fi
7938
7939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7940fi
7941{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7942echo "${ECHO_T}$ac_cv_type_long" >&6; }
7943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944# The cast to long int works around a bug in the HP C Compiler
7945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7947# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007948{ echo "$as_me:$LINENO: checking size of long" >&5
7949echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007950if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007951 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007952else
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 if test "$cross_compiling" = yes; then
7954 # Depending upon the size, compute the lo and hi bounds.
7955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007956/* confdefs.h. */
7957_ACEOF
7958cat confdefs.h >>conftest.$ac_ext
7959cat >>conftest.$ac_ext <<_ACEOF
7960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007961$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007962 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007967test_array [0] = 0
7968
7969 ;
7970 return 0;
7971}
7972_ACEOF
7973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974if { (ac_try="$ac_compile"
7975case "(($ac_try" in
7976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7977 *) ac_try_echo=$ac_try;;
7978esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007982 grep -v '^ *+' conftest.er1 >conftest.err
7983 rm -f conftest.er1
7984 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 (exit $ac_status); } && {
7987 test -z "$ac_c_werror_flag" ||
7988 test ! -s conftest.err
7989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 ac_lo=0 ac_mid=0
7991 while :; do
7992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007998$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007999 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008004test_array [0] = 0
8005
8006 ;
8007 return 0;
8008}
8009_ACEOF
8010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011if { (ac_try="$ac_compile"
8012case "(($ac_try" in
8013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8014 *) ac_try_echo=$ac_try;;
8015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008019 grep -v '^ *+' conftest.er1 >conftest.err
8020 rm -f conftest.er1
8021 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 (exit $ac_status); } && {
8024 test -z "$ac_c_werror_flag" ||
8025 test ! -s conftest.err
8026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ac_hi=$ac_mid; break
8028else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008030sed 's/^/| /' conftest.$ac_ext >&5
8031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 ac_lo=`expr $ac_mid + 1`
8033 if test $ac_lo -le $ac_mid; then
8034 ac_lo= ac_hi=
8035 break
8036 fi
8037 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039
8040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 done
8042else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008044sed 's/^/| /' conftest.$ac_ext >&5
8045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* confdefs.h. */
8048_ACEOF
8049cat confdefs.h >>conftest.$ac_ext
8050cat >>conftest.$ac_ext <<_ACEOF
8051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008052$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008053 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008054int
8055main ()
8056{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008058test_array [0] = 0
8059
8060 ;
8061 return 0;
8062}
8063_ACEOF
8064rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065if { (ac_try="$ac_compile"
8066case "(($ac_try" in
8067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8068 *) ac_try_echo=$ac_try;;
8069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008073 grep -v '^ *+' conftest.er1 >conftest.err
8074 rm -f conftest.er1
8075 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 (exit $ac_status); } && {
8078 test -z "$ac_c_werror_flag" ||
8079 test ! -s conftest.err
8080 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ac_hi=-1 ac_mid=-1
8082 while :; do
8083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* confdefs.h. */
8085_ACEOF
8086cat confdefs.h >>conftest.$ac_ext
8087cat >>conftest.$ac_ext <<_ACEOF
8088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008090 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008095test_array [0] = 0
8096
8097 ;
8098 return 0;
8099}
8100_ACEOF
8101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102if { (ac_try="$ac_compile"
8103case "(($ac_try" in
8104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8105 *) ac_try_echo=$ac_try;;
8106esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008110 grep -v '^ *+' conftest.er1 >conftest.err
8111 rm -f conftest.er1
8112 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 (exit $ac_status); } && {
8115 test -z "$ac_c_werror_flag" ||
8116 test ! -s conftest.err
8117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_lo=$ac_mid; break
8119else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008121sed 's/^/| /' conftest.$ac_ext >&5
8122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123 ac_hi=`expr '(' $ac_mid ')' - 1`
8124 if test $ac_mid -le $ac_hi; then
8125 ac_lo= ac_hi=
8126 break
8127 fi
8128 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130
8131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 done
8133else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008135sed 's/^/| /' conftest.$ac_ext >&5
8136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139
8140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142
8143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008144# Binary search between lo and hi bounds.
8145while test "x$ac_lo" != "x$ac_hi"; do
8146 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008148/* confdefs.h. */
8149_ACEOF
8150cat confdefs.h >>conftest.$ac_ext
8151cat >>conftest.$ac_ext <<_ACEOF
8152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008153$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008154 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008155int
8156main ()
8157{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008159test_array [0] = 0
8160
8161 ;
8162 return 0;
8163}
8164_ACEOF
8165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166if { (ac_try="$ac_compile"
8167case "(($ac_try" in
8168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8169 *) ac_try_echo=$ac_try;;
8170esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008174 grep -v '^ *+' conftest.er1 >conftest.err
8175 rm -f conftest.er1
8176 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178 (exit $ac_status); } && {
8179 test -z "$ac_c_werror_flag" ||
8180 test ! -s conftest.err
8181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 ac_hi=$ac_mid
8183else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008185sed 's/^/| /' conftest.$ac_ext >&5
8186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008187 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189
8190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008191done
8192case $ac_lo in
8193?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008195 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008196See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008197echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008198See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008199 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200 else
8201 ac_cv_sizeof_long=0
8202 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008203esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008204else
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008206/* confdefs.h. */
8207_ACEOF
8208cat confdefs.h >>conftest.$ac_ext
8209cat >>conftest.$ac_ext <<_ACEOF
8210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008211$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008212 typedef long ac__type_sizeof_;
8213static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8214static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008215#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008216#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008217int
8218main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008219{
Martin v. Löwis11437992002-04-12 09:54:03 +00008220
8221 FILE *f = fopen ("conftest.val", "w");
8222 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008224 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008227 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008229 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 }
8231 else
8232 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008234 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008236 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008239
8240 ;
8241 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008242}
Martin v. Löwis11437992002-04-12 09:54:03 +00008243_ACEOF
8244rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245if { (ac_try="$ac_link"
8246case "(($ac_try" in
8247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8248 *) ac_try_echo=$ac_try;;
8249esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008252 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 { (case "(($ac_try" in
8256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8257 *) ac_try_echo=$ac_try;;
8258esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008261 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 (exit $ac_status); }; }; then
8264 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008265else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008266 echo "$as_me: program exited with status $ac_status" >&5
8267echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008268sed 's/^/| /' conftest.$ac_ext >&5
8269
Martin v. Löwis11437992002-04-12 09:54:03 +00008270( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008272 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008273See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008274echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008275See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008276 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 else
8278 ac_cv_sizeof_long=0
8279 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281rm -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 +00008282fi
8283rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008284fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008285{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8286echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287
8288
8289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008291#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293
8294
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008295{ echo "$as_me:$LINENO: checking for void *" >&5
8296echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8297if test "${ac_cv_type_void_p+set}" = set; then
8298 echo $ECHO_N "(cached) $ECHO_C" >&6
8299else
8300 cat >conftest.$ac_ext <<_ACEOF
8301/* confdefs.h. */
8302_ACEOF
8303cat confdefs.h >>conftest.$ac_ext
8304cat >>conftest.$ac_ext <<_ACEOF
8305/* end confdefs.h. */
8306$ac_includes_default
8307typedef void * ac__type_new_;
8308int
8309main ()
8310{
8311if ((ac__type_new_ *) 0)
8312 return 0;
8313if (sizeof (ac__type_new_))
8314 return 0;
8315 ;
8316 return 0;
8317}
8318_ACEOF
8319rm -f conftest.$ac_objext
8320if { (ac_try="$ac_compile"
8321case "(($ac_try" in
8322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8323 *) ac_try_echo=$ac_try;;
8324esac
8325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8326 (eval "$ac_compile") 2>conftest.er1
8327 ac_status=$?
8328 grep -v '^ *+' conftest.er1 >conftest.err
8329 rm -f conftest.er1
8330 cat conftest.err >&5
8331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8332 (exit $ac_status); } && {
8333 test -z "$ac_c_werror_flag" ||
8334 test ! -s conftest.err
8335 } && test -s conftest.$ac_objext; then
8336 ac_cv_type_void_p=yes
8337else
8338 echo "$as_me: failed program was:" >&5
8339sed 's/^/| /' conftest.$ac_ext >&5
8340
8341 ac_cv_type_void_p=no
8342fi
8343
8344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8345fi
8346{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8347echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349# The cast to long int works around a bug in the HP C Compiler
8350# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8351# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8352# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008353{ echo "$as_me:$LINENO: checking size of void *" >&5
8354echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008355if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008356 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008357else
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 if test "$cross_compiling" = yes; then
8359 # Depending upon the size, compute the lo and hi bounds.
8360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008361/* confdefs.h. */
8362_ACEOF
8363cat confdefs.h >>conftest.$ac_ext
8364cat >>conftest.$ac_ext <<_ACEOF
8365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008366$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008367 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008368int
8369main ()
8370{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008371static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008372test_array [0] = 0
8373
8374 ;
8375 return 0;
8376}
8377_ACEOF
8378rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379if { (ac_try="$ac_compile"
8380case "(($ac_try" in
8381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8382 *) ac_try_echo=$ac_try;;
8383esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008387 grep -v '^ *+' conftest.er1 >conftest.err
8388 rm -f conftest.er1
8389 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391 (exit $ac_status); } && {
8392 test -z "$ac_c_werror_flag" ||
8393 test ! -s conftest.err
8394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 ac_lo=0 ac_mid=0
8396 while :; do
8397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008404 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416if { (ac_try="$ac_compile"
8417case "(($ac_try" in
8418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8419 *) ac_try_echo=$ac_try;;
8420esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_hi=$ac_mid; break
8433else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008435sed 's/^/| /' conftest.$ac_ext >&5
8436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437 ac_lo=`expr $ac_mid + 1`
8438 if test $ac_lo -le $ac_mid; then
8439 ac_lo= ac_hi=
8440 break
8441 fi
8442 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444
8445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 done
8447else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008449sed 's/^/| /' conftest.$ac_ext >&5
8450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008452/* confdefs.h. */
8453_ACEOF
8454cat confdefs.h >>conftest.$ac_ext
8455cat >>conftest.$ac_ext <<_ACEOF
8456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008457$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008458 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008459int
8460main ()
8461{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008462static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008463test_array [0] = 0
8464
8465 ;
8466 return 0;
8467}
8468_ACEOF
8469rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470if { (ac_try="$ac_compile"
8471case "(($ac_try" in
8472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8473 *) ac_try_echo=$ac_try;;
8474esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008478 grep -v '^ *+' conftest.er1 >conftest.err
8479 rm -f conftest.er1
8480 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482 (exit $ac_status); } && {
8483 test -z "$ac_c_werror_flag" ||
8484 test ! -s conftest.err
8485 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_hi=-1 ac_mid=-1
8487 while :; do
8488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008495 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008496int
8497main ()
8498{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008500test_array [0] = 0
8501
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507if { (ac_try="$ac_compile"
8508case "(($ac_try" in
8509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8510 *) ac_try_echo=$ac_try;;
8511esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008515 grep -v '^ *+' conftest.er1 >conftest.err
8516 rm -f conftest.er1
8517 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519 (exit $ac_status); } && {
8520 test -z "$ac_c_werror_flag" ||
8521 test ! -s conftest.err
8522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_lo=$ac_mid; break
8524else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008526sed 's/^/| /' conftest.$ac_ext >&5
8527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 ac_hi=`expr '(' $ac_mid ')' - 1`
8529 if test $ac_mid -le $ac_hi; then
8530 ac_lo= ac_hi=
8531 break
8532 fi
8533 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535
8536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 done
8538else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008540sed 's/^/| /' conftest.$ac_ext >&5
8541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544
8545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547
8548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008549# Binary search between lo and hi bounds.
8550while test "x$ac_lo" != "x$ac_hi"; do
8551 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* confdefs.h. */
8554_ACEOF
8555cat confdefs.h >>conftest.$ac_ext
8556cat >>conftest.$ac_ext <<_ACEOF
8557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008559 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008560int
8561main ()
8562{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008564test_array [0] = 0
8565
8566 ;
8567 return 0;
8568}
8569_ACEOF
8570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571if { (ac_try="$ac_compile"
8572case "(($ac_try" in
8573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8574 *) ac_try_echo=$ac_try;;
8575esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008579 grep -v '^ *+' conftest.er1 >conftest.err
8580 rm -f conftest.er1
8581 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583 (exit $ac_status); } && {
8584 test -z "$ac_c_werror_flag" ||
8585 test ! -s conftest.err
8586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_hi=$ac_mid
8588else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008590sed 's/^/| /' conftest.$ac_ext >&5
8591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594
8595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008596done
8597case $ac_lo in
8598?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008600 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008601See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008602echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008603See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008604 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 else
8606 ac_cv_sizeof_void_p=0
8607 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008608esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008609else
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* confdefs.h. */
8612_ACEOF
8613cat confdefs.h >>conftest.$ac_ext
8614cat >>conftest.$ac_ext <<_ACEOF
8615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008617 typedef void * ac__type_sizeof_;
8618static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8619static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008620#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008621#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008622int
8623main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008624{
Martin v. Löwis11437992002-04-12 09:54:03 +00008625
8626 FILE *f = fopen ("conftest.val", "w");
8627 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008629 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008632 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008634 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 }
8636 else
8637 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008639 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008641 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008644
8645 ;
8646 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008647}
Martin v. Löwis11437992002-04-12 09:54:03 +00008648_ACEOF
8649rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650if { (ac_try="$ac_link"
8651case "(($ac_try" in
8652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8653 *) ac_try_echo=$ac_try;;
8654esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660 { (case "(($ac_try" in
8661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8662 *) ac_try_echo=$ac_try;;
8663esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 (exit $ac_status); }; }; then
8669 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008670else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008671 echo "$as_me: program exited with status $ac_status" >&5
8672echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008673sed 's/^/| /' conftest.$ac_ext >&5
8674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008677 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008678See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008679echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008680See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008681 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 else
8683 ac_cv_sizeof_void_p=0
8684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686rm -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 +00008687fi
8688rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008689fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008690{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8691echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692
8693
8694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008696#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008697_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008698
8699
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008700{ echo "$as_me:$LINENO: checking for short" >&5
8701echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8702if test "${ac_cv_type_short+set}" = set; then
8703 echo $ECHO_N "(cached) $ECHO_C" >&6
8704else
8705 cat >conftest.$ac_ext <<_ACEOF
8706/* confdefs.h. */
8707_ACEOF
8708cat confdefs.h >>conftest.$ac_ext
8709cat >>conftest.$ac_ext <<_ACEOF
8710/* end confdefs.h. */
8711$ac_includes_default
8712typedef short ac__type_new_;
8713int
8714main ()
8715{
8716if ((ac__type_new_ *) 0)
8717 return 0;
8718if (sizeof (ac__type_new_))
8719 return 0;
8720 ;
8721 return 0;
8722}
8723_ACEOF
8724rm -f conftest.$ac_objext
8725if { (ac_try="$ac_compile"
8726case "(($ac_try" in
8727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8728 *) ac_try_echo=$ac_try;;
8729esac
8730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8731 (eval "$ac_compile") 2>conftest.er1
8732 ac_status=$?
8733 grep -v '^ *+' conftest.er1 >conftest.err
8734 rm -f conftest.er1
8735 cat conftest.err >&5
8736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737 (exit $ac_status); } && {
8738 test -z "$ac_c_werror_flag" ||
8739 test ! -s conftest.err
8740 } && test -s conftest.$ac_objext; then
8741 ac_cv_type_short=yes
8742else
8743 echo "$as_me: failed program was:" >&5
8744sed 's/^/| /' conftest.$ac_ext >&5
8745
8746 ac_cv_type_short=no
8747fi
8748
8749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8750fi
8751{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8752echo "${ECHO_T}$ac_cv_type_short" >&6; }
8753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008758{ echo "$as_me:$LINENO: checking size of short" >&5
8759echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008760if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008761 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008762else
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 if test "$cross_compiling" = yes; then
8764 # Depending upon the size, compute the lo and hi bounds.
8765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008766/* confdefs.h. */
8767_ACEOF
8768cat confdefs.h >>conftest.$ac_ext
8769cat >>conftest.$ac_ext <<_ACEOF
8770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008771$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008772 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008773int
8774main ()
8775{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008776static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008777test_array [0] = 0
8778
8779 ;
8780 return 0;
8781}
8782_ACEOF
8783rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784if { (ac_try="$ac_compile"
8785case "(($ac_try" in
8786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8787 *) ac_try_echo=$ac_try;;
8788esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008792 grep -v '^ *+' conftest.er1 >conftest.err
8793 rm -f conftest.er1
8794 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796 (exit $ac_status); } && {
8797 test -z "$ac_c_werror_flag" ||
8798 test ! -s conftest.err
8799 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 ac_lo=0 ac_mid=0
8801 while :; do
8802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* confdefs.h. */
8804_ACEOF
8805cat confdefs.h >>conftest.$ac_ext
8806cat >>conftest.$ac_ext <<_ACEOF
8807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008809 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821if { (ac_try="$ac_compile"
8822case "(($ac_try" in
8823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8824 *) ac_try_echo=$ac_try;;
8825esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008829 grep -v '^ *+' conftest.er1 >conftest.err
8830 rm -f conftest.er1
8831 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 (exit $ac_status); } && {
8834 test -z "$ac_c_werror_flag" ||
8835 test ! -s conftest.err
8836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_hi=$ac_mid; break
8838else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008840sed 's/^/| /' conftest.$ac_ext >&5
8841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842 ac_lo=`expr $ac_mid + 1`
8843 if test $ac_lo -le $ac_mid; then
8844 ac_lo= ac_hi=
8845 break
8846 fi
8847 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849
8850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 done
8852else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008854sed 's/^/| /' conftest.$ac_ext >&5
8855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008857/* confdefs.h. */
8858_ACEOF
8859cat confdefs.h >>conftest.$ac_ext
8860cat >>conftest.$ac_ext <<_ACEOF
8861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008862$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008863 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
8866{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008867static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008868test_array [0] = 0
8869
8870 ;
8871 return 0;
8872}
8873_ACEOF
8874rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875if { (ac_try="$ac_compile"
8876case "(($ac_try" in
8877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8878 *) ac_try_echo=$ac_try;;
8879esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008883 grep -v '^ *+' conftest.er1 >conftest.err
8884 rm -f conftest.er1
8885 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887 (exit $ac_status); } && {
8888 test -z "$ac_c_werror_flag" ||
8889 test ! -s conftest.err
8890 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 ac_hi=-1 ac_mid=-1
8892 while :; do
8893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* confdefs.h. */
8895_ACEOF
8896cat confdefs.h >>conftest.$ac_ext
8897cat >>conftest.$ac_ext <<_ACEOF
8898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008900 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008905test_array [0] = 0
8906
8907 ;
8908 return 0;
8909}
8910_ACEOF
8911rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912if { (ac_try="$ac_compile"
8913case "(($ac_try" in
8914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8915 *) ac_try_echo=$ac_try;;
8916esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008920 grep -v '^ *+' conftest.er1 >conftest.err
8921 rm -f conftest.er1
8922 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924 (exit $ac_status); } && {
8925 test -z "$ac_c_werror_flag" ||
8926 test ! -s conftest.err
8927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_lo=$ac_mid; break
8929else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008931sed 's/^/| /' conftest.$ac_ext >&5
8932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933 ac_hi=`expr '(' $ac_mid ')' - 1`
8934 if test $ac_mid -le $ac_hi; then
8935 ac_lo= ac_hi=
8936 break
8937 fi
8938 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940
8941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 done
8943else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008945sed 's/^/| /' conftest.$ac_ext >&5
8946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949
8950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952
8953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008954# Binary search between lo and hi bounds.
8955while test "x$ac_lo" != "x$ac_hi"; do
8956 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008958/* confdefs.h. */
8959_ACEOF
8960cat confdefs.h >>conftest.$ac_ext
8961cat >>conftest.$ac_ext <<_ACEOF
8962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008963$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008964 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008969test_array [0] = 0
8970
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976if { (ac_try="$ac_compile"
8977case "(($ac_try" in
8978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8979 *) ac_try_echo=$ac_try;;
8980esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008984 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1
8986 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988 (exit $ac_status); } && {
8989 test -z "$ac_c_werror_flag" ||
8990 test ! -s conftest.err
8991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_hi=$ac_mid
8993else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008995sed 's/^/| /' conftest.$ac_ext >&5
8996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999
9000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009001done
9002case $ac_lo in
9003?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009005 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009006See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009007echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009008See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009009 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 else
9011 ac_cv_sizeof_short=0
9012 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009013esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009014else
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009016/* confdefs.h. */
9017_ACEOF
9018cat confdefs.h >>conftest.$ac_ext
9019cat >>conftest.$ac_ext <<_ACEOF
9020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009021$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009022 typedef short ac__type_sizeof_;
9023static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9024static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009025#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009026#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009027int
9028main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009029{
Martin v. Löwis11437992002-04-12 09:54:03 +00009030
9031 FILE *f = fopen ("conftest.val", "w");
9032 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009034 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009037 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009039 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 }
9041 else
9042 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009043 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009044 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009046 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009049
9050 ;
9051 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009052}
Martin v. Löwis11437992002-04-12 09:54:03 +00009053_ACEOF
9054rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055if { (ac_try="$ac_link"
9056case "(($ac_try" in
9057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9058 *) ac_try_echo=$ac_try;;
9059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009062 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065 { (case "(($ac_try" in
9066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9067 *) ac_try_echo=$ac_try;;
9068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 (exit $ac_status); }; }; then
9074 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009075else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009076 echo "$as_me: program exited with status $ac_status" >&5
9077echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009078sed 's/^/| /' conftest.$ac_ext >&5
9079
Martin v. Löwis11437992002-04-12 09:54:03 +00009080( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009082 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009083See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009084echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009085See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009086 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087 else
9088 ac_cv_sizeof_short=0
9089 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091rm -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 +00009092fi
9093rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009094fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009095{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9096echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097
9098
9099
Martin v. Löwis11437992002-04-12 09:54:03 +00009100cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009101#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009103
9104
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009105{ echo "$as_me:$LINENO: checking for float" >&5
9106echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9107if test "${ac_cv_type_float+set}" = set; then
9108 echo $ECHO_N "(cached) $ECHO_C" >&6
9109else
9110 cat >conftest.$ac_ext <<_ACEOF
9111/* confdefs.h. */
9112_ACEOF
9113cat confdefs.h >>conftest.$ac_ext
9114cat >>conftest.$ac_ext <<_ACEOF
9115/* end confdefs.h. */
9116$ac_includes_default
9117typedef float ac__type_new_;
9118int
9119main ()
9120{
9121if ((ac__type_new_ *) 0)
9122 return 0;
9123if (sizeof (ac__type_new_))
9124 return 0;
9125 ;
9126 return 0;
9127}
9128_ACEOF
9129rm -f conftest.$ac_objext
9130if { (ac_try="$ac_compile"
9131case "(($ac_try" in
9132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9133 *) ac_try_echo=$ac_try;;
9134esac
9135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9136 (eval "$ac_compile") 2>conftest.er1
9137 ac_status=$?
9138 grep -v '^ *+' conftest.er1 >conftest.err
9139 rm -f conftest.er1
9140 cat conftest.err >&5
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); } && {
9143 test -z "$ac_c_werror_flag" ||
9144 test ! -s conftest.err
9145 } && test -s conftest.$ac_objext; then
9146 ac_cv_type_float=yes
9147else
9148 echo "$as_me: failed program was:" >&5
9149sed 's/^/| /' conftest.$ac_ext >&5
9150
9151 ac_cv_type_float=no
9152fi
9153
9154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9155fi
9156{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9157echo "${ECHO_T}$ac_cv_type_float" >&6; }
9158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159# The cast to long int works around a bug in the HP C Compiler
9160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9162# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009163{ echo "$as_me:$LINENO: checking size of float" >&5
9164echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009165if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 if test "$cross_compiling" = yes; then
9169 # Depending upon the size, compute the lo and hi bounds.
9170cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009171/* confdefs.h. */
9172_ACEOF
9173cat confdefs.h >>conftest.$ac_ext
9174cat >>conftest.$ac_ext <<_ACEOF
9175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009176$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009177 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009178int
9179main ()
9180{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009182test_array [0] = 0
9183
9184 ;
9185 return 0;
9186}
9187_ACEOF
9188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189if { (ac_try="$ac_compile"
9190case "(($ac_try" in
9191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9192 *) ac_try_echo=$ac_try;;
9193esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009197 grep -v '^ *+' conftest.er1 >conftest.err
9198 rm -f conftest.er1
9199 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201 (exit $ac_status); } && {
9202 test -z "$ac_c_werror_flag" ||
9203 test ! -s conftest.err
9204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ac_lo=0 ac_mid=0
9206 while :; do
9207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* confdefs.h. */
9209_ACEOF
9210cat confdefs.h >>conftest.$ac_ext
9211cat >>conftest.$ac_ext <<_ACEOF
9212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009213$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009214 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009215int
9216main ()
9217{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009219test_array [0] = 0
9220
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226if { (ac_try="$ac_compile"
9227case "(($ac_try" in
9228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9229 *) ac_try_echo=$ac_try;;
9230esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009234 grep -v '^ *+' conftest.er1 >conftest.err
9235 rm -f conftest.er1
9236 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 (exit $ac_status); } && {
9239 test -z "$ac_c_werror_flag" ||
9240 test ! -s conftest.err
9241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ac_hi=$ac_mid; break
9243else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009245sed 's/^/| /' conftest.$ac_ext >&5
9246
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247 ac_lo=`expr $ac_mid + 1`
9248 if test $ac_lo -le $ac_mid; then
9249 ac_lo= ac_hi=
9250 break
9251 fi
9252 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254
9255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 done
9257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009259sed 's/^/| /' conftest.$ac_ext >&5
9260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009262/* confdefs.h. */
9263_ACEOF
9264cat confdefs.h >>conftest.$ac_ext
9265cat >>conftest.$ac_ext <<_ACEOF
9266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009267$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009268 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009269int
9270main ()
9271{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009273test_array [0] = 0
9274
9275 ;
9276 return 0;
9277}
9278_ACEOF
9279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280if { (ac_try="$ac_compile"
9281case "(($ac_try" in
9282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9283 *) ac_try_echo=$ac_try;;
9284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009288 grep -v '^ *+' conftest.er1 >conftest.err
9289 rm -f conftest.er1
9290 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292 (exit $ac_status); } && {
9293 test -z "$ac_c_werror_flag" ||
9294 test ! -s conftest.err
9295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 ac_hi=-1 ac_mid=-1
9297 while :; do
9298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009304$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009305 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009310test_array [0] = 0
9311
9312 ;
9313 return 0;
9314}
9315_ACEOF
9316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317if { (ac_try="$ac_compile"
9318case "(($ac_try" in
9319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9320 *) ac_try_echo=$ac_try;;
9321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009325 grep -v '^ *+' conftest.er1 >conftest.err
9326 rm -f conftest.er1
9327 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329 (exit $ac_status); } && {
9330 test -z "$ac_c_werror_flag" ||
9331 test ! -s conftest.err
9332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 ac_lo=$ac_mid; break
9334else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009336sed 's/^/| /' conftest.$ac_ext >&5
9337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338 ac_hi=`expr '(' $ac_mid ')' - 1`
9339 if test $ac_mid -le $ac_hi; then
9340 ac_lo= ac_hi=
9341 break
9342 fi
9343 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009345
9346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 done
9348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009350sed 's/^/| /' conftest.$ac_ext >&5
9351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354
9355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009357
9358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009359# Binary search between lo and hi bounds.
9360while test "x$ac_lo" != "x$ac_hi"; do
9361 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* confdefs.h. */
9364_ACEOF
9365cat confdefs.h >>conftest.$ac_ext
9366cat >>conftest.$ac_ext <<_ACEOF
9367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009368$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009369 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009370int
9371main ()
9372{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009374test_array [0] = 0
9375
9376 ;
9377 return 0;
9378}
9379_ACEOF
9380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381if { (ac_try="$ac_compile"
9382case "(($ac_try" in
9383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384 *) ac_try_echo=$ac_try;;
9385esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393 (exit $ac_status); } && {
9394 test -z "$ac_c_werror_flag" ||
9395 test ! -s conftest.err
9396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_hi=$ac_mid
9398else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009400sed 's/^/| /' conftest.$ac_ext >&5
9401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404
9405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009406done
9407case $ac_lo in
9408?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009410 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009411See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009412echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009413See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009414 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415 else
9416 ac_cv_sizeof_float=0
9417 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009418esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009419else
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* confdefs.h. */
9422_ACEOF
9423cat confdefs.h >>conftest.$ac_ext
9424cat >>conftest.$ac_ext <<_ACEOF
9425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009426$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009427 typedef float ac__type_sizeof_;
9428static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9429static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009430#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009431#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009432int
9433main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009434{
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
9436 FILE *f = fopen ("conftest.val", "w");
9437 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009439 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009442 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009444 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 }
9446 else
9447 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009449 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009451 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
9455 ;
9456 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009457}
Martin v. Löwis11437992002-04-12 09:54:03 +00009458_ACEOF
9459rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460if { (ac_try="$ac_link"
9461case "(($ac_try" in
9462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9463 *) ac_try_echo=$ac_try;;
9464esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470 { (case "(($ac_try" in
9471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9472 *) ac_try_echo=$ac_try;;
9473esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 (exit $ac_status); }; }; then
9479 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009480else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009481 echo "$as_me: program exited with status $ac_status" >&5
9482echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009483sed 's/^/| /' conftest.$ac_ext >&5
9484
Martin v. Löwis11437992002-04-12 09:54:03 +00009485( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009487 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009488See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009489echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009490See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009491 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492 else
9493 ac_cv_sizeof_float=0
9494 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496rm -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 +00009497fi
9498rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009499fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009500{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9501echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502
9503
9504
Martin v. Löwis11437992002-04-12 09:54:03 +00009505cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009506#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009507_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009508
9509
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009510{ echo "$as_me:$LINENO: checking for double" >&5
9511echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9512if test "${ac_cv_type_double+set}" = set; then
9513 echo $ECHO_N "(cached) $ECHO_C" >&6
9514else
9515 cat >conftest.$ac_ext <<_ACEOF
9516/* confdefs.h. */
9517_ACEOF
9518cat confdefs.h >>conftest.$ac_ext
9519cat >>conftest.$ac_ext <<_ACEOF
9520/* end confdefs.h. */
9521$ac_includes_default
9522typedef double ac__type_new_;
9523int
9524main ()
9525{
9526if ((ac__type_new_ *) 0)
9527 return 0;
9528if (sizeof (ac__type_new_))
9529 return 0;
9530 ;
9531 return 0;
9532}
9533_ACEOF
9534rm -f conftest.$ac_objext
9535if { (ac_try="$ac_compile"
9536case "(($ac_try" in
9537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9538 *) ac_try_echo=$ac_try;;
9539esac
9540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9541 (eval "$ac_compile") 2>conftest.er1
9542 ac_status=$?
9543 grep -v '^ *+' conftest.er1 >conftest.err
9544 rm -f conftest.er1
9545 cat conftest.err >&5
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); } && {
9548 test -z "$ac_c_werror_flag" ||
9549 test ! -s conftest.err
9550 } && test -s conftest.$ac_objext; then
9551 ac_cv_type_double=yes
9552else
9553 echo "$as_me: failed program was:" >&5
9554sed 's/^/| /' conftest.$ac_ext >&5
9555
9556 ac_cv_type_double=no
9557fi
9558
9559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9560fi
9561{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9562echo "${ECHO_T}$ac_cv_type_double" >&6; }
9563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564# The cast to long int works around a bug in the HP C Compiler
9565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9567# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009568{ echo "$as_me:$LINENO: checking size of double" >&5
9569echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009570if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 if test "$cross_compiling" = yes; then
9574 # Depending upon the size, compute the lo and hi bounds.
9575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* confdefs.h. */
9577_ACEOF
9578cat confdefs.h >>conftest.$ac_ext
9579cat >>conftest.$ac_ext <<_ACEOF
9580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009581$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009582 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009583int
9584main ()
9585{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009586static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009587test_array [0] = 0
9588
9589 ;
9590 return 0;
9591}
9592_ACEOF
9593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594if { (ac_try="$ac_compile"
9595case "(($ac_try" in
9596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9597 *) ac_try_echo=$ac_try;;
9598esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009602 grep -v '^ *+' conftest.er1 >conftest.err
9603 rm -f conftest.er1
9604 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606 (exit $ac_status); } && {
9607 test -z "$ac_c_werror_flag" ||
9608 test ! -s conftest.err
9609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 ac_lo=0 ac_mid=0
9611 while :; do
9612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* confdefs.h. */
9614_ACEOF
9615cat confdefs.h >>conftest.$ac_ext
9616cat >>conftest.$ac_ext <<_ACEOF
9617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009619 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009620int
9621main ()
9622{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009624test_array [0] = 0
9625
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631if { (ac_try="$ac_compile"
9632case "(($ac_try" in
9633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634 *) ac_try_echo=$ac_try;;
9635esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009639 grep -v '^ *+' conftest.er1 >conftest.err
9640 rm -f conftest.er1
9641 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643 (exit $ac_status); } && {
9644 test -z "$ac_c_werror_flag" ||
9645 test ! -s conftest.err
9646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_hi=$ac_mid; break
9648else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009650sed 's/^/| /' conftest.$ac_ext >&5
9651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652 ac_lo=`expr $ac_mid + 1`
9653 if test $ac_lo -le $ac_mid; then
9654 ac_lo= ac_hi=
9655 break
9656 fi
9657 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659
9660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 done
9662else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009664sed 's/^/| /' conftest.$ac_ext >&5
9665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009667/* confdefs.h. */
9668_ACEOF
9669cat confdefs.h >>conftest.$ac_ext
9670cat >>conftest.$ac_ext <<_ACEOF
9671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009672$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009673 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009674int
9675main ()
9676{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009677static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009678test_array [0] = 0
9679
9680 ;
9681 return 0;
9682}
9683_ACEOF
9684rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685if { (ac_try="$ac_compile"
9686case "(($ac_try" in
9687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9688 *) ac_try_echo=$ac_try;;
9689esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009693 grep -v '^ *+' conftest.er1 >conftest.err
9694 rm -f conftest.er1
9695 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697 (exit $ac_status); } && {
9698 test -z "$ac_c_werror_flag" ||
9699 test ! -s conftest.err
9700 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ac_hi=-1 ac_mid=-1
9702 while :; do
9703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* confdefs.h. */
9705_ACEOF
9706cat confdefs.h >>conftest.$ac_ext
9707cat >>conftest.$ac_ext <<_ACEOF
9708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009710 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009715test_array [0] = 0
9716
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722if { (ac_try="$ac_compile"
9723case "(($ac_try" in
9724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9725 *) ac_try_echo=$ac_try;;
9726esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734 (exit $ac_status); } && {
9735 test -z "$ac_c_werror_flag" ||
9736 test ! -s conftest.err
9737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_lo=$ac_mid; break
9739else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009741sed 's/^/| /' conftest.$ac_ext >&5
9742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743 ac_hi=`expr '(' $ac_mid ')' - 1`
9744 if test $ac_mid -le $ac_hi; then
9745 ac_lo= ac_hi=
9746 break
9747 fi
9748 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750
9751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 done
9753else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009755sed 's/^/| /' conftest.$ac_ext >&5
9756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759
9760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762
9763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009764# Binary search between lo and hi bounds.
9765while test "x$ac_lo" != "x$ac_hi"; do
9766 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009768/* confdefs.h. */
9769_ACEOF
9770cat confdefs.h >>conftest.$ac_ext
9771cat >>conftest.$ac_ext <<_ACEOF
9772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009773$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009774 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009775int
9776main ()
9777{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009779test_array [0] = 0
9780
9781 ;
9782 return 0;
9783}
9784_ACEOF
9785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786if { (ac_try="$ac_compile"
9787case "(($ac_try" in
9788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9789 *) ac_try_echo=$ac_try;;
9790esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009794 grep -v '^ *+' conftest.er1 >conftest.err
9795 rm -f conftest.er1
9796 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798 (exit $ac_status); } && {
9799 test -z "$ac_c_werror_flag" ||
9800 test ! -s conftest.err
9801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 ac_hi=$ac_mid
9803else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009805sed 's/^/| /' conftest.$ac_ext >&5
9806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009807 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809
9810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009811done
9812case $ac_lo in
9813?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009815 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009816See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009817echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009818See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009819 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820 else
9821 ac_cv_sizeof_double=0
9822 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009823esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009824else
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* confdefs.h. */
9827_ACEOF
9828cat confdefs.h >>conftest.$ac_ext
9829cat >>conftest.$ac_ext <<_ACEOF
9830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009831$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009832 typedef double ac__type_sizeof_;
9833static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9834static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009835#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009836#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009837int
9838main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009839{
Martin v. Löwis11437992002-04-12 09:54:03 +00009840
9841 FILE *f = fopen ("conftest.val", "w");
9842 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009844 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009847 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009849 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 }
9851 else
9852 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009854 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009856 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009859
9860 ;
9861 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009862}
Martin v. Löwis11437992002-04-12 09:54:03 +00009863_ACEOF
9864rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865if { (ac_try="$ac_link"
9866case "(($ac_try" in
9867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9868 *) ac_try_echo=$ac_try;;
9869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875 { (case "(($ac_try" in
9876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9877 *) ac_try_echo=$ac_try;;
9878esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 (exit $ac_status); }; }; then
9884 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009885else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009886 echo "$as_me: program exited with status $ac_status" >&5
9887echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009888sed 's/^/| /' conftest.$ac_ext >&5
9889
Martin v. Löwis11437992002-04-12 09:54:03 +00009890( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009892 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009893See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009894echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009895See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009896 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 else
9898 ac_cv_sizeof_double=0
9899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009901rm -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 +00009902fi
9903rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009904fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009905{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9906echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907
9908
9909
Martin v. Löwis11437992002-04-12 09:54:03 +00009910cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009911#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009912_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009913
9914
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009915{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9916echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9917if test "${ac_cv_type_fpos_t+set}" = set; then
9918 echo $ECHO_N "(cached) $ECHO_C" >&6
9919else
9920 cat >conftest.$ac_ext <<_ACEOF
9921/* confdefs.h. */
9922_ACEOF
9923cat confdefs.h >>conftest.$ac_ext
9924cat >>conftest.$ac_ext <<_ACEOF
9925/* end confdefs.h. */
9926$ac_includes_default
9927typedef fpos_t ac__type_new_;
9928int
9929main ()
9930{
9931if ((ac__type_new_ *) 0)
9932 return 0;
9933if (sizeof (ac__type_new_))
9934 return 0;
9935 ;
9936 return 0;
9937}
9938_ACEOF
9939rm -f conftest.$ac_objext
9940if { (ac_try="$ac_compile"
9941case "(($ac_try" in
9942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9943 *) ac_try_echo=$ac_try;;
9944esac
9945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9946 (eval "$ac_compile") 2>conftest.er1
9947 ac_status=$?
9948 grep -v '^ *+' conftest.er1 >conftest.err
9949 rm -f conftest.er1
9950 cat conftest.err >&5
9951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952 (exit $ac_status); } && {
9953 test -z "$ac_c_werror_flag" ||
9954 test ! -s conftest.err
9955 } && test -s conftest.$ac_objext; then
9956 ac_cv_type_fpos_t=yes
9957else
9958 echo "$as_me: failed program was:" >&5
9959sed 's/^/| /' conftest.$ac_ext >&5
9960
9961 ac_cv_type_fpos_t=no
9962fi
9963
9964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9965fi
9966{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9967echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969# The cast to long int works around a bug in the HP C Compiler
9970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9972# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009973{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9974echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009975if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009976 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009977else
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 if test "$cross_compiling" = yes; then
9979 # Depending upon the size, compute the lo and hi bounds.
9980cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009981/* confdefs.h. */
9982_ACEOF
9983cat confdefs.h >>conftest.$ac_ext
9984cat >>conftest.$ac_ext <<_ACEOF
9985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009986$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009987 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009988int
9989main ()
9990{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009991static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009992test_array [0] = 0
9993
9994 ;
9995 return 0;
9996}
9997_ACEOF
9998rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999if { (ac_try="$ac_compile"
10000case "(($ac_try" in
10001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10002 *) ac_try_echo=$ac_try;;
10003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010007 grep -v '^ *+' conftest.er1 >conftest.err
10008 rm -f conftest.er1
10009 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011 (exit $ac_status); } && {
10012 test -z "$ac_c_werror_flag" ||
10013 test ! -s conftest.err
10014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 ac_lo=0 ac_mid=0
10016 while :; do
10017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* confdefs.h. */
10019_ACEOF
10020cat confdefs.h >>conftest.$ac_ext
10021cat >>conftest.$ac_ext <<_ACEOF
10022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010024 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010025int
10026main ()
10027{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010029test_array [0] = 0
10030
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036if { (ac_try="$ac_compile"
10037case "(($ac_try" in
10038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10039 *) ac_try_echo=$ac_try;;
10040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010044 grep -v '^ *+' conftest.er1 >conftest.err
10045 rm -f conftest.er1
10046 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048 (exit $ac_status); } && {
10049 test -z "$ac_c_werror_flag" ||
10050 test ! -s conftest.err
10051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 ac_hi=$ac_mid; break
10053else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010055sed 's/^/| /' conftest.$ac_ext >&5
10056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057 ac_lo=`expr $ac_mid + 1`
10058 if test $ac_lo -le $ac_mid; then
10059 ac_lo= ac_hi=
10060 break
10061 fi
10062 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064
10065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 done
10067else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010069sed 's/^/| /' conftest.$ac_ext >&5
10070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010072/* confdefs.h. */
10073_ACEOF
10074cat confdefs.h >>conftest.$ac_ext
10075cat >>conftest.$ac_ext <<_ACEOF
10076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010077$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010078 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010079int
10080main ()
10081{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010082static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010083test_array [0] = 0
10084
10085 ;
10086 return 0;
10087}
10088_ACEOF
10089rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090if { (ac_try="$ac_compile"
10091case "(($ac_try" in
10092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10093 *) ac_try_echo=$ac_try;;
10094esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010098 grep -v '^ *+' conftest.er1 >conftest.err
10099 rm -f conftest.er1
10100 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102 (exit $ac_status); } && {
10103 test -z "$ac_c_werror_flag" ||
10104 test ! -s conftest.err
10105 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 ac_hi=-1 ac_mid=-1
10107 while :; do
10108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* confdefs.h. */
10110_ACEOF
10111cat confdefs.h >>conftest.$ac_ext
10112cat >>conftest.$ac_ext <<_ACEOF
10113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010115 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010116int
10117main ()
10118{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010120test_array [0] = 0
10121
10122 ;
10123 return 0;
10124}
10125_ACEOF
10126rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127if { (ac_try="$ac_compile"
10128case "(($ac_try" in
10129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130 *) ac_try_echo=$ac_try;;
10131esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010135 grep -v '^ *+' conftest.er1 >conftest.err
10136 rm -f conftest.er1
10137 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139 (exit $ac_status); } && {
10140 test -z "$ac_c_werror_flag" ||
10141 test ! -s conftest.err
10142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_lo=$ac_mid; break
10144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010146sed 's/^/| /' conftest.$ac_ext >&5
10147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148 ac_hi=`expr '(' $ac_mid ')' - 1`
10149 if test $ac_mid -le $ac_hi; then
10150 ac_lo= ac_hi=
10151 break
10152 fi
10153 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155
10156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 done
10158else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010160sed 's/^/| /' conftest.$ac_ext >&5
10161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164
10165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167
10168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010169# Binary search between lo and hi bounds.
10170while test "x$ac_lo" != "x$ac_hi"; do
10171 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* confdefs.h. */
10174_ACEOF
10175cat confdefs.h >>conftest.$ac_ext
10176cat >>conftest.$ac_ext <<_ACEOF
10177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010178$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010179 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010180int
10181main ()
10182{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010183static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010184test_array [0] = 0
10185
10186 ;
10187 return 0;
10188}
10189_ACEOF
10190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191if { (ac_try="$ac_compile"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010199 grep -v '^ *+' conftest.er1 >conftest.err
10200 rm -f conftest.er1
10201 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203 (exit $ac_status); } && {
10204 test -z "$ac_c_werror_flag" ||
10205 test ! -s conftest.err
10206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ac_hi=$ac_mid
10208else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010210sed 's/^/| /' conftest.$ac_ext >&5
10211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214
10215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010216done
10217case $ac_lo in
10218?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010220 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010221See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010222echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010223See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010224 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225 else
10226 ac_cv_sizeof_fpos_t=0
10227 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010228esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010229else
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010231/* confdefs.h. */
10232_ACEOF
10233cat confdefs.h >>conftest.$ac_ext
10234cat >>conftest.$ac_ext <<_ACEOF
10235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010236$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010237 typedef fpos_t ac__type_sizeof_;
10238static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10239static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010240#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010241#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010242int
10243main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010244{
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
10246 FILE *f = fopen ("conftest.val", "w");
10247 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010249 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010252 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010254 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 }
10256 else
10257 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010259 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010261 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
10265 ;
10266 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010267}
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
10269rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270if { (ac_try="$ac_link"
10271case "(($ac_try" in
10272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10273 *) ac_try_echo=$ac_try;;
10274esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280 { (case "(($ac_try" in
10281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10282 *) ac_try_echo=$ac_try;;
10283esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 (exit $ac_status); }; }; then
10289 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010291 echo "$as_me: program exited with status $ac_status" >&5
10292echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010293sed 's/^/| /' conftest.$ac_ext >&5
10294
Martin v. Löwis11437992002-04-12 09:54:03 +000010295( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010297 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010298See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010299echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010300See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010301 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 else
10303 ac_cv_sizeof_fpos_t=0
10304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306rm -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 +000010307fi
10308rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010309fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010310{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10311echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312
10313
10314
Martin v. Löwis11437992002-04-12 09:54:03 +000010315cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010316#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010317_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010318
Michael W. Hudson54241132001-12-07 15:38:26 +000010319
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010320{ echo "$as_me:$LINENO: checking for size_t" >&5
10321echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10322if test "${ac_cv_type_size_t+set}" = set; then
10323 echo $ECHO_N "(cached) $ECHO_C" >&6
10324else
10325 cat >conftest.$ac_ext <<_ACEOF
10326/* confdefs.h. */
10327_ACEOF
10328cat confdefs.h >>conftest.$ac_ext
10329cat >>conftest.$ac_ext <<_ACEOF
10330/* end confdefs.h. */
10331$ac_includes_default
10332typedef size_t ac__type_new_;
10333int
10334main ()
10335{
10336if ((ac__type_new_ *) 0)
10337 return 0;
10338if (sizeof (ac__type_new_))
10339 return 0;
10340 ;
10341 return 0;
10342}
10343_ACEOF
10344rm -f conftest.$ac_objext
10345if { (ac_try="$ac_compile"
10346case "(($ac_try" in
10347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10348 *) ac_try_echo=$ac_try;;
10349esac
10350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10351 (eval "$ac_compile") 2>conftest.er1
10352 ac_status=$?
10353 grep -v '^ *+' conftest.er1 >conftest.err
10354 rm -f conftest.er1
10355 cat conftest.err >&5
10356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357 (exit $ac_status); } && {
10358 test -z "$ac_c_werror_flag" ||
10359 test ! -s conftest.err
10360 } && test -s conftest.$ac_objext; then
10361 ac_cv_type_size_t=yes
10362else
10363 echo "$as_me: failed program was:" >&5
10364sed 's/^/| /' conftest.$ac_ext >&5
10365
10366 ac_cv_type_size_t=no
10367fi
10368
10369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10370fi
10371{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10372echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374# The cast to long int works around a bug in the HP C Compiler
10375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10377# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010378{ echo "$as_me:$LINENO: checking size of size_t" >&5
10379echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010380if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010381 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010382else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010383 if test "$cross_compiling" = yes; then
10384 # Depending upon the size, compute the lo and hi bounds.
10385cat >conftest.$ac_ext <<_ACEOF
10386/* confdefs.h. */
10387_ACEOF
10388cat confdefs.h >>conftest.$ac_ext
10389cat >>conftest.$ac_ext <<_ACEOF
10390/* end confdefs.h. */
10391$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010392 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010393int
10394main ()
10395{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010397test_array [0] = 0
10398
10399 ;
10400 return 0;
10401}
10402_ACEOF
10403rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404if { (ac_try="$ac_compile"
10405case "(($ac_try" in
10406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10407 *) ac_try_echo=$ac_try;;
10408esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010411 ac_status=$?
10412 grep -v '^ *+' conftest.er1 >conftest.err
10413 rm -f conftest.er1
10414 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416 (exit $ac_status); } && {
10417 test -z "$ac_c_werror_flag" ||
10418 test ! -s conftest.err
10419 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010420 ac_lo=0 ac_mid=0
10421 while :; do
10422 cat >conftest.$ac_ext <<_ACEOF
10423/* confdefs.h. */
10424_ACEOF
10425cat confdefs.h >>conftest.$ac_ext
10426cat >>conftest.$ac_ext <<_ACEOF
10427/* end confdefs.h. */
10428$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010429 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430int
10431main ()
10432{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434test_array [0] = 0
10435
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441if { (ac_try="$ac_compile"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 ac_status=$?
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453 (exit $ac_status); } && {
10454 test -z "$ac_c_werror_flag" ||
10455 test ! -s conftest.err
10456 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457 ac_hi=$ac_mid; break
10458else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010459 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460sed 's/^/| /' conftest.$ac_ext >&5
10461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462 ac_lo=`expr $ac_mid + 1`
10463 if test $ac_lo -le $ac_mid; then
10464 ac_lo= ac_hi=
10465 break
10466 fi
10467 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469
10470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471 done
10472else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010473 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010474sed 's/^/| /' conftest.$ac_ext >&5
10475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477/* confdefs.h. */
10478_ACEOF
10479cat confdefs.h >>conftest.$ac_ext
10480cat >>conftest.$ac_ext <<_ACEOF
10481/* end confdefs.h. */
10482$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010483 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010484int
10485main ()
10486{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010487static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488test_array [0] = 0
10489
10490 ;
10491 return 0;
10492}
10493_ACEOF
10494rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495if { (ac_try="$ac_compile"
10496case "(($ac_try" in
10497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10498 *) ac_try_echo=$ac_try;;
10499esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502 ac_status=$?
10503 grep -v '^ *+' conftest.er1 >conftest.err
10504 rm -f conftest.er1
10505 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507 (exit $ac_status); } && {
10508 test -z "$ac_c_werror_flag" ||
10509 test ! -s conftest.err
10510 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511 ac_hi=-1 ac_mid=-1
10512 while :; do
10513 cat >conftest.$ac_ext <<_ACEOF
10514/* confdefs.h. */
10515_ACEOF
10516cat confdefs.h >>conftest.$ac_ext
10517cat >>conftest.$ac_ext <<_ACEOF
10518/* end confdefs.h. */
10519$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010520 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521int
10522main ()
10523{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525test_array [0] = 0
10526
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532if { (ac_try="$ac_compile"
10533case "(($ac_try" in
10534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535 *) ac_try_echo=$ac_try;;
10536esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_status=$?
10540 grep -v '^ *+' conftest.er1 >conftest.err
10541 rm -f conftest.er1
10542 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544 (exit $ac_status); } && {
10545 test -z "$ac_c_werror_flag" ||
10546 test ! -s conftest.err
10547 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548 ac_lo=$ac_mid; break
10549else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010550 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551sed 's/^/| /' conftest.$ac_ext >&5
10552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553 ac_hi=`expr '(' $ac_mid ')' - 1`
10554 if test $ac_mid -le $ac_hi; then
10555 ac_lo= ac_hi=
10556 break
10557 fi
10558 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560
10561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562 done
10563else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010564 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010565sed 's/^/| /' conftest.$ac_ext >&5
10566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569
10570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572
10573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574# Binary search between lo and hi bounds.
10575while test "x$ac_lo" != "x$ac_hi"; do
10576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10577 cat >conftest.$ac_ext <<_ACEOF
10578/* confdefs.h. */
10579_ACEOF
10580cat confdefs.h >>conftest.$ac_ext
10581cat >>conftest.$ac_ext <<_ACEOF
10582/* end confdefs.h. */
10583$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010584 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585int
10586main ()
10587{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010588static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589test_array [0] = 0
10590
10591 ;
10592 return 0;
10593}
10594_ACEOF
10595rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596if { (ac_try="$ac_compile"
10597case "(($ac_try" in
10598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10599 *) ac_try_echo=$ac_try;;
10600esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 ac_status=$?
10604 grep -v '^ *+' conftest.er1 >conftest.err
10605 rm -f conftest.er1
10606 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608 (exit $ac_status); } && {
10609 test -z "$ac_c_werror_flag" ||
10610 test ! -s conftest.err
10611 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612 ac_hi=$ac_mid
10613else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010614 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615sed 's/^/| /' conftest.$ac_ext >&5
10616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619
10620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621done
10622case $ac_lo in
10623?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010625 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010627echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010629 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630 else
10631 ac_cv_sizeof_size_t=0
10632 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633esac
10634else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 cat >conftest.$ac_ext <<_ACEOF
10636/* confdefs.h. */
10637_ACEOF
10638cat confdefs.h >>conftest.$ac_ext
10639cat >>conftest.$ac_ext <<_ACEOF
10640/* end confdefs.h. */
10641$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010642 typedef size_t ac__type_sizeof_;
10643static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10644static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645#include <stdio.h>
10646#include <stdlib.h>
10647int
10648main ()
10649{
10650
10651 FILE *f = fopen ("conftest.val", "w");
10652 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010654 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010657 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010659 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 }
10661 else
10662 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010664 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010666 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669
10670 ;
10671 return 0;
10672}
10673_ACEOF
10674rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675if { (ac_try="$ac_link"
10676case "(($ac_try" in
10677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10678 *) ac_try_echo=$ac_try;;
10679esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685 { (case "(($ac_try" in
10686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10687 *) ac_try_echo=$ac_try;;
10688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010691 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693 (exit $ac_status); }; }; then
10694 ac_cv_sizeof_size_t=`cat conftest.val`
10695else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010696 echo "$as_me: program exited with status $ac_status" >&5
10697echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698sed 's/^/| /' conftest.$ac_ext >&5
10699
10700( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010702 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010704echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010706 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 else
10708 ac_cv_sizeof_size_t=0
10709 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711rm -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 +000010712fi
10713rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010714fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010715{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10716echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717
10718
10719
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720cat >>confdefs.h <<_ACEOF
10721#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10722_ACEOF
10723
10724
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010725{ echo "$as_me:$LINENO: checking for pid_t" >&5
10726echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10727if test "${ac_cv_type_pid_t+set}" = set; then
10728 echo $ECHO_N "(cached) $ECHO_C" >&6
10729else
10730 cat >conftest.$ac_ext <<_ACEOF
10731/* confdefs.h. */
10732_ACEOF
10733cat confdefs.h >>conftest.$ac_ext
10734cat >>conftest.$ac_ext <<_ACEOF
10735/* end confdefs.h. */
10736$ac_includes_default
10737typedef pid_t ac__type_new_;
10738int
10739main ()
10740{
10741if ((ac__type_new_ *) 0)
10742 return 0;
10743if (sizeof (ac__type_new_))
10744 return 0;
10745 ;
10746 return 0;
10747}
10748_ACEOF
10749rm -f conftest.$ac_objext
10750if { (ac_try="$ac_compile"
10751case "(($ac_try" in
10752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10753 *) ac_try_echo=$ac_try;;
10754esac
10755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10756 (eval "$ac_compile") 2>conftest.er1
10757 ac_status=$?
10758 grep -v '^ *+' conftest.er1 >conftest.err
10759 rm -f conftest.er1
10760 cat conftest.err >&5
10761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10762 (exit $ac_status); } && {
10763 test -z "$ac_c_werror_flag" ||
10764 test ! -s conftest.err
10765 } && test -s conftest.$ac_objext; then
10766 ac_cv_type_pid_t=yes
10767else
10768 echo "$as_me: failed program was:" >&5
10769sed 's/^/| /' conftest.$ac_ext >&5
10770
10771 ac_cv_type_pid_t=no
10772fi
10773
10774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10775fi
10776{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10777echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10778
Christian Heimes400adb02008-02-01 08:12:03 +000010779# The cast to long int works around a bug in the HP C Compiler
10780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10782# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010783{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10784echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010785if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010786 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010787else
10788 if test "$cross_compiling" = yes; then
10789 # Depending upon the size, compute the lo and hi bounds.
10790cat >conftest.$ac_ext <<_ACEOF
10791/* confdefs.h. */
10792_ACEOF
10793cat confdefs.h >>conftest.$ac_ext
10794cat >>conftest.$ac_ext <<_ACEOF
10795/* end confdefs.h. */
10796$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010797 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010798int
10799main ()
10800{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010802test_array [0] = 0
10803
10804 ;
10805 return 0;
10806}
10807_ACEOF
10808rm -f conftest.$ac_objext
10809if { (ac_try="$ac_compile"
10810case "(($ac_try" in
10811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10812 *) ac_try_echo=$ac_try;;
10813esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010815 (eval "$ac_compile") 2>conftest.er1
10816 ac_status=$?
10817 grep -v '^ *+' conftest.er1 >conftest.err
10818 rm -f conftest.er1
10819 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010821 (exit $ac_status); } && {
10822 test -z "$ac_c_werror_flag" ||
10823 test ! -s conftest.err
10824 } && test -s conftest.$ac_objext; then
10825 ac_lo=0 ac_mid=0
10826 while :; do
10827 cat >conftest.$ac_ext <<_ACEOF
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
10833$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010834 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010835int
10836main ()
10837{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010839test_array [0] = 0
10840
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext
10846if { (ac_try="$ac_compile"
10847case "(($ac_try" in
10848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10849 *) ac_try_echo=$ac_try;;
10850esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010852 (eval "$ac_compile") 2>conftest.er1
10853 ac_status=$?
10854 grep -v '^ *+' conftest.er1 >conftest.err
10855 rm -f conftest.er1
10856 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010858 (exit $ac_status); } && {
10859 test -z "$ac_c_werror_flag" ||
10860 test ! -s conftest.err
10861 } && test -s conftest.$ac_objext; then
10862 ac_hi=$ac_mid; break
10863else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010864 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010865sed 's/^/| /' conftest.$ac_ext >&5
10866
10867 ac_lo=`expr $ac_mid + 1`
10868 if test $ac_lo -le $ac_mid; then
10869 ac_lo= ac_hi=
10870 break
10871 fi
10872 ac_mid=`expr 2 '*' $ac_mid + 1`
10873fi
10874
10875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10876 done
10877else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010878 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010879sed 's/^/| /' conftest.$ac_ext >&5
10880
10881 cat >conftest.$ac_ext <<_ACEOF
10882/* confdefs.h. */
10883_ACEOF
10884cat confdefs.h >>conftest.$ac_ext
10885cat >>conftest.$ac_ext <<_ACEOF
10886/* end confdefs.h. */
10887$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010888 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010889int
10890main ()
10891{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010893test_array [0] = 0
10894
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899rm -f conftest.$ac_objext
10900if { (ac_try="$ac_compile"
10901case "(($ac_try" in
10902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10903 *) ac_try_echo=$ac_try;;
10904esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010906 (eval "$ac_compile") 2>conftest.er1
10907 ac_status=$?
10908 grep -v '^ *+' conftest.er1 >conftest.err
10909 rm -f conftest.er1
10910 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010912 (exit $ac_status); } && {
10913 test -z "$ac_c_werror_flag" ||
10914 test ! -s conftest.err
10915 } && test -s conftest.$ac_objext; then
10916 ac_hi=-1 ac_mid=-1
10917 while :; do
10918 cat >conftest.$ac_ext <<_ACEOF
10919/* confdefs.h. */
10920_ACEOF
10921cat confdefs.h >>conftest.$ac_ext
10922cat >>conftest.$ac_ext <<_ACEOF
10923/* end confdefs.h. */
10924$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010925 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010926int
10927main ()
10928{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010930test_array [0] = 0
10931
10932 ;
10933 return 0;
10934}
10935_ACEOF
10936rm -f conftest.$ac_objext
10937if { (ac_try="$ac_compile"
10938case "(($ac_try" in
10939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940 *) ac_try_echo=$ac_try;;
10941esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010943 (eval "$ac_compile") 2>conftest.er1
10944 ac_status=$?
10945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949 (exit $ac_status); } && {
10950 test -z "$ac_c_werror_flag" ||
10951 test ! -s conftest.err
10952 } && test -s conftest.$ac_objext; then
10953 ac_lo=$ac_mid; break
10954else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010955 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010956sed 's/^/| /' conftest.$ac_ext >&5
10957
10958 ac_hi=`expr '(' $ac_mid ')' - 1`
10959 if test $ac_mid -le $ac_hi; then
10960 ac_lo= ac_hi=
10961 break
10962 fi
10963 ac_mid=`expr 2 '*' $ac_mid`
10964fi
10965
10966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10967 done
10968else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010969 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010970sed 's/^/| /' conftest.$ac_ext >&5
10971
10972 ac_lo= ac_hi=
10973fi
10974
10975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10976fi
10977
10978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979# Binary search between lo and hi bounds.
10980while test "x$ac_lo" != "x$ac_hi"; do
10981 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10982 cat >conftest.$ac_ext <<_ACEOF
10983/* confdefs.h. */
10984_ACEOF
10985cat confdefs.h >>conftest.$ac_ext
10986cat >>conftest.$ac_ext <<_ACEOF
10987/* end confdefs.h. */
10988$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010989 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010990int
10991main ()
10992{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010993static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010994test_array [0] = 0
10995
10996 ;
10997 return 0;
10998}
10999_ACEOF
11000rm -f conftest.$ac_objext
11001if { (ac_try="$ac_compile"
11002case "(($ac_try" in
11003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11004 *) ac_try_echo=$ac_try;;
11005esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011007 (eval "$ac_compile") 2>conftest.er1
11008 ac_status=$?
11009 grep -v '^ *+' conftest.er1 >conftest.err
11010 rm -f conftest.er1
11011 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011013 (exit $ac_status); } && {
11014 test -z "$ac_c_werror_flag" ||
11015 test ! -s conftest.err
11016 } && test -s conftest.$ac_objext; then
11017 ac_hi=$ac_mid
11018else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011019 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011020sed 's/^/| /' conftest.$ac_ext >&5
11021
11022 ac_lo=`expr '(' $ac_mid ')' + 1`
11023fi
11024
11025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11026done
11027case $ac_lo in
11028?*) ac_cv_sizeof_pid_t=$ac_lo;;
11029'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011030 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011031See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011032echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011033See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011034 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011035 else
11036 ac_cv_sizeof_pid_t=0
11037 fi ;;
11038esac
11039else
11040 cat >conftest.$ac_ext <<_ACEOF
11041/* confdefs.h. */
11042_ACEOF
11043cat confdefs.h >>conftest.$ac_ext
11044cat >>conftest.$ac_ext <<_ACEOF
11045/* end confdefs.h. */
11046$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011047 typedef pid_t ac__type_sizeof_;
11048static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11049static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011050#include <stdio.h>
11051#include <stdlib.h>
11052int
11053main ()
11054{
11055
11056 FILE *f = fopen ("conftest.val", "w");
11057 if (! f)
11058 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011059 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011060 {
11061 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011062 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011063 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011064 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011065 }
11066 else
11067 {
11068 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011069 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011070 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011071 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011072 }
11073 return ferror (f) || fclose (f) != 0;
11074
11075 ;
11076 return 0;
11077}
11078_ACEOF
11079rm -f conftest$ac_exeext
11080if { (ac_try="$ac_link"
11081case "(($ac_try" in
11082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11083 *) ac_try_echo=$ac_try;;
11084esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011086 (eval "$ac_link") 2>&5
11087 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11090 { (case "(($ac_try" in
11091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11092 *) ac_try_echo=$ac_try;;
11093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011095 (eval "$ac_try") 2>&5
11096 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011098 (exit $ac_status); }; }; then
11099 ac_cv_sizeof_pid_t=`cat conftest.val`
11100else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011101 echo "$as_me: program exited with status $ac_status" >&5
11102echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011103sed 's/^/| /' conftest.$ac_ext >&5
11104
11105( exit $ac_status )
11106if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011107 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011108See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011109echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011110See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011111 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011112 else
11113 ac_cv_sizeof_pid_t=0
11114 fi
11115fi
11116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11117fi
11118rm -f conftest.val
11119fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011120{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11121echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011122
11123
11124
11125cat >>confdefs.h <<_ACEOF
11126#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11127_ACEOF
11128
11129
Michael W. Hudson54241132001-12-07 15:38:26 +000011130
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011131{ echo "$as_me:$LINENO: checking for long long support" >&5
11132echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* confdefs.h. */
11136_ACEOF
11137cat confdefs.h >>conftest.$ac_ext
11138cat >>conftest.$ac_ext <<_ACEOF
11139/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011140
Martin v. Löwis11437992002-04-12 09:54:03 +000011141int
11142main ()
11143{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011144long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011145 ;
11146 return 0;
11147}
11148_ACEOF
11149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150if { (ac_try="$ac_compile"
11151case "(($ac_try" in
11152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11153 *) ac_try_echo=$ac_try;;
11154esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011158 grep -v '^ *+' conftest.er1 >conftest.err
11159 rm -f conftest.er1
11160 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162 (exit $ac_status); } && {
11163 test -z "$ac_c_werror_flag" ||
11164 test ! -s conftest.err
11165 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
11167
11168cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011169#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170_ACEOF
11171
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011172 have_long_long=yes
11173
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011174else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011176sed 's/^/| /' conftest.$ac_ext >&5
11177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180
11181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011182{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11183echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011184if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011185{ echo "$as_me:$LINENO: checking for long long" >&5
11186echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11187if test "${ac_cv_type_long_long+set}" = set; then
11188 echo $ECHO_N "(cached) $ECHO_C" >&6
11189else
11190 cat >conftest.$ac_ext <<_ACEOF
11191/* confdefs.h. */
11192_ACEOF
11193cat confdefs.h >>conftest.$ac_ext
11194cat >>conftest.$ac_ext <<_ACEOF
11195/* end confdefs.h. */
11196$ac_includes_default
11197typedef long long ac__type_new_;
11198int
11199main ()
11200{
11201if ((ac__type_new_ *) 0)
11202 return 0;
11203if (sizeof (ac__type_new_))
11204 return 0;
11205 ;
11206 return 0;
11207}
11208_ACEOF
11209rm -f conftest.$ac_objext
11210if { (ac_try="$ac_compile"
11211case "(($ac_try" in
11212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11213 *) ac_try_echo=$ac_try;;
11214esac
11215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11216 (eval "$ac_compile") 2>conftest.er1
11217 ac_status=$?
11218 grep -v '^ *+' conftest.er1 >conftest.err
11219 rm -f conftest.er1
11220 cat conftest.err >&5
11221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11222 (exit $ac_status); } && {
11223 test -z "$ac_c_werror_flag" ||
11224 test ! -s conftest.err
11225 } && test -s conftest.$ac_objext; then
11226 ac_cv_type_long_long=yes
11227else
11228 echo "$as_me: failed program was:" >&5
11229sed 's/^/| /' conftest.$ac_ext >&5
11230
11231 ac_cv_type_long_long=no
11232fi
11233
11234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11235fi
11236{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11237echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239# The cast to long int works around a bug in the HP C Compiler
11240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11242# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011243{ echo "$as_me:$LINENO: checking size of long long" >&5
11244echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011245if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011246 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011247else
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 if test "$cross_compiling" = yes; then
11249 # Depending upon the size, compute the lo and hi bounds.
11250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* confdefs.h. */
11252_ACEOF
11253cat confdefs.h >>conftest.$ac_ext
11254cat >>conftest.$ac_ext <<_ACEOF
11255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011256$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011257 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011258int
11259main ()
11260{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011262test_array [0] = 0
11263
11264 ;
11265 return 0;
11266}
11267_ACEOF
11268rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269if { (ac_try="$ac_compile"
11270case "(($ac_try" in
11271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11272 *) ac_try_echo=$ac_try;;
11273esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 ac_lo=0 ac_mid=0
11286 while :; do
11287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011293$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011294 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011299test_array [0] = 0
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306if { (ac_try="$ac_compile"
11307case "(($ac_try" in
11308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11309 *) ac_try_echo=$ac_try;;
11310esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011314 grep -v '^ *+' conftest.er1 >conftest.err
11315 rm -f conftest.er1
11316 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318 (exit $ac_status); } && {
11319 test -z "$ac_c_werror_flag" ||
11320 test ! -s conftest.err
11321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_hi=$ac_mid; break
11323else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011325sed 's/^/| /' conftest.$ac_ext >&5
11326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327 ac_lo=`expr $ac_mid + 1`
11328 if test $ac_lo -le $ac_mid; then
11329 ac_lo= ac_hi=
11330 break
11331 fi
11332 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334
11335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 done
11337else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011339sed 's/^/| /' conftest.$ac_ext >&5
11340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* confdefs.h. */
11343_ACEOF
11344cat confdefs.h >>conftest.$ac_ext
11345cat >>conftest.$ac_ext <<_ACEOF
11346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011347$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011348 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011349int
11350main ()
11351{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011353test_array [0] = 0
11354
11355 ;
11356 return 0;
11357}
11358_ACEOF
11359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360if { (ac_try="$ac_compile"
11361case "(($ac_try" in
11362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11363 *) ac_try_echo=$ac_try;;
11364esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372 (exit $ac_status); } && {
11373 test -z "$ac_c_werror_flag" ||
11374 test ! -s conftest.err
11375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ac_hi=-1 ac_mid=-1
11377 while :; do
11378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* confdefs.h. */
11380_ACEOF
11381cat confdefs.h >>conftest.$ac_ext
11382cat >>conftest.$ac_ext <<_ACEOF
11383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011385 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011389static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011390test_array [0] = 0
11391
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397if { (ac_try="$ac_compile"
11398case "(($ac_try" in
11399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11400 *) ac_try_echo=$ac_try;;
11401esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011405 grep -v '^ *+' conftest.er1 >conftest.err
11406 rm -f conftest.er1
11407 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409 (exit $ac_status); } && {
11410 test -z "$ac_c_werror_flag" ||
11411 test ! -s conftest.err
11412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_lo=$ac_mid; break
11414else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011416sed 's/^/| /' conftest.$ac_ext >&5
11417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418 ac_hi=`expr '(' $ac_mid ')' - 1`
11419 if test $ac_mid -le $ac_hi; then
11420 ac_lo= ac_hi=
11421 break
11422 fi
11423 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425
11426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 done
11428else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011430sed 's/^/| /' conftest.$ac_ext >&5
11431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434
11435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437
11438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011439# Binary search between lo and hi bounds.
11440while test "x$ac_lo" != "x$ac_hi"; do
11441 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011443/* confdefs.h. */
11444_ACEOF
11445cat confdefs.h >>conftest.$ac_ext
11446cat >>conftest.$ac_ext <<_ACEOF
11447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011448$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011449 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011450int
11451main ()
11452{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011454test_array [0] = 0
11455
11456 ;
11457 return 0;
11458}
11459_ACEOF
11460rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461if { (ac_try="$ac_compile"
11462case "(($ac_try" in
11463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11464 *) ac_try_echo=$ac_try;;
11465esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011469 grep -v '^ *+' conftest.er1 >conftest.err
11470 rm -f conftest.er1
11471 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473 (exit $ac_status); } && {
11474 test -z "$ac_c_werror_flag" ||
11475 test ! -s conftest.err
11476 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 ac_hi=$ac_mid
11478else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011480sed 's/^/| /' conftest.$ac_ext >&5
11481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484
11485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011486done
11487case $ac_lo in
11488?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011490 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011491See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011492echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011493See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011494 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495 else
11496 ac_cv_sizeof_long_long=0
11497 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011498esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011499else
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* confdefs.h. */
11502_ACEOF
11503cat confdefs.h >>conftest.$ac_ext
11504cat >>conftest.$ac_ext <<_ACEOF
11505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011506$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011507 typedef long long ac__type_sizeof_;
11508static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11509static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011510#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011511#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011512int
11513main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011514{
Martin v. Löwis11437992002-04-12 09:54:03 +000011515
11516 FILE *f = fopen ("conftest.val", "w");
11517 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011519 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011522 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011524 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 }
11526 else
11527 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011529 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011531 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
11535 ;
11536 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011537}
Martin v. Löwis11437992002-04-12 09:54:03 +000011538_ACEOF
11539rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540if { (ac_try="$ac_link"
11541case "(($ac_try" in
11542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11543 *) ac_try_echo=$ac_try;;
11544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550 { (case "(($ac_try" in
11551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11552 *) ac_try_echo=$ac_try;;
11553esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 (exit $ac_status); }; }; then
11559 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011560else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011561 echo "$as_me: program exited with status $ac_status" >&5
11562echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011563sed 's/^/| /' conftest.$ac_ext >&5
11564
Martin v. Löwis11437992002-04-12 09:54:03 +000011565( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011567 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011568See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011569echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011570See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572 else
11573 ac_cv_sizeof_long_long=0
11574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576rm -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 +000011577fi
11578rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011580{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11581echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582
11583
11584
Martin v. Löwis11437992002-04-12 09:54:03 +000011585cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011586#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011587_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011588
Michael W. Hudson54241132001-12-07 15:38:26 +000011589
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011590fi
11591
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011592{ echo "$as_me:$LINENO: checking for long double support" >&5
11593echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011594have_long_double=no
11595cat >conftest.$ac_ext <<_ACEOF
11596/* confdefs.h. */
11597_ACEOF
11598cat confdefs.h >>conftest.$ac_ext
11599cat >>conftest.$ac_ext <<_ACEOF
11600/* end confdefs.h. */
11601
11602int
11603main ()
11604{
11605long double x; x = (long double)0;
11606 ;
11607 return 0;
11608}
11609_ACEOF
11610rm -f conftest.$ac_objext
11611if { (ac_try="$ac_compile"
11612case "(($ac_try" in
11613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11614 *) ac_try_echo=$ac_try;;
11615esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011617 (eval "$ac_compile") 2>conftest.er1
11618 ac_status=$?
11619 grep -v '^ *+' conftest.er1 >conftest.err
11620 rm -f conftest.er1
11621 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011623 (exit $ac_status); } && {
11624 test -z "$ac_c_werror_flag" ||
11625 test ! -s conftest.err
11626 } && test -s conftest.$ac_objext; then
11627
11628
11629cat >>confdefs.h <<\_ACEOF
11630#define HAVE_LONG_DOUBLE 1
11631_ACEOF
11632
11633 have_long_double=yes
11634
11635else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011636 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011637sed 's/^/| /' conftest.$ac_ext >&5
11638
11639
11640fi
11641
11642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011643{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11644echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011645if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011646{ echo "$as_me:$LINENO: checking for long double" >&5
11647echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11648if test "${ac_cv_type_long_double+set}" = set; then
11649 echo $ECHO_N "(cached) $ECHO_C" >&6
11650else
11651 cat >conftest.$ac_ext <<_ACEOF
11652/* confdefs.h. */
11653_ACEOF
11654cat confdefs.h >>conftest.$ac_ext
11655cat >>conftest.$ac_ext <<_ACEOF
11656/* end confdefs.h. */
11657$ac_includes_default
11658typedef long double ac__type_new_;
11659int
11660main ()
11661{
11662if ((ac__type_new_ *) 0)
11663 return 0;
11664if (sizeof (ac__type_new_))
11665 return 0;
11666 ;
11667 return 0;
11668}
11669_ACEOF
11670rm -f conftest.$ac_objext
11671if { (ac_try="$ac_compile"
11672case "(($ac_try" in
11673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11674 *) ac_try_echo=$ac_try;;
11675esac
11676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11677 (eval "$ac_compile") 2>conftest.er1
11678 ac_status=$?
11679 grep -v '^ *+' conftest.er1 >conftest.err
11680 rm -f conftest.er1
11681 cat conftest.err >&5
11682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11683 (exit $ac_status); } && {
11684 test -z "$ac_c_werror_flag" ||
11685 test ! -s conftest.err
11686 } && test -s conftest.$ac_objext; then
11687 ac_cv_type_long_double=yes
11688else
11689 echo "$as_me: failed program was:" >&5
11690sed 's/^/| /' conftest.$ac_ext >&5
11691
11692 ac_cv_type_long_double=no
11693fi
11694
11695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11696fi
11697{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11698echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11699
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011700# The cast to long int works around a bug in the HP C Compiler
11701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11703# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011704{ echo "$as_me:$LINENO: checking size of long double" >&5
11705echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011706if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011707 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011708else
11709 if test "$cross_compiling" = yes; then
11710 # Depending upon the size, compute the lo and hi bounds.
11711cat >conftest.$ac_ext <<_ACEOF
11712/* confdefs.h. */
11713_ACEOF
11714cat confdefs.h >>conftest.$ac_ext
11715cat >>conftest.$ac_ext <<_ACEOF
11716/* end confdefs.h. */
11717$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011718 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011719int
11720main ()
11721{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011722static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011723test_array [0] = 0
11724
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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011742 (exit $ac_status); } && {
11743 test -z "$ac_c_werror_flag" ||
11744 test ! -s conftest.err
11745 } && test -s conftest.$ac_objext; then
11746 ac_lo=0 ac_mid=0
11747 while :; do
11748 cat >conftest.$ac_ext <<_ACEOF
11749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
11754$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011755 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756int
11757main ()
11758{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011760test_array [0] = 0
11761
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766rm -f conftest.$ac_objext
11767if { (ac_try="$ac_compile"
11768case "(($ac_try" in
11769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11770 *) ac_try_echo=$ac_try;;
11771esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011773 (eval "$ac_compile") 2>conftest.er1
11774 ac_status=$?
11775 grep -v '^ *+' conftest.er1 >conftest.err
11776 rm -f conftest.er1
11777 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779 (exit $ac_status); } && {
11780 test -z "$ac_c_werror_flag" ||
11781 test ! -s conftest.err
11782 } && test -s conftest.$ac_objext; then
11783 ac_hi=$ac_mid; break
11784else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011785 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011786sed 's/^/| /' conftest.$ac_ext >&5
11787
11788 ac_lo=`expr $ac_mid + 1`
11789 if test $ac_lo -le $ac_mid; then
11790 ac_lo= ac_hi=
11791 break
11792 fi
11793 ac_mid=`expr 2 '*' $ac_mid + 1`
11794fi
11795
11796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11797 done
11798else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011799 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011800sed 's/^/| /' conftest.$ac_ext >&5
11801
11802 cat >conftest.$ac_ext <<_ACEOF
11803/* confdefs.h. */
11804_ACEOF
11805cat confdefs.h >>conftest.$ac_ext
11806cat >>conftest.$ac_ext <<_ACEOF
11807/* end confdefs.h. */
11808$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011809 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011810int
11811main ()
11812{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011814test_array [0] = 0
11815
11816 ;
11817 return 0;
11818}
11819_ACEOF
11820rm -f conftest.$ac_objext
11821if { (ac_try="$ac_compile"
11822case "(($ac_try" in
11823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11824 *) ac_try_echo=$ac_try;;
11825esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011827 (eval "$ac_compile") 2>conftest.er1
11828 ac_status=$?
11829 grep -v '^ *+' conftest.er1 >conftest.err
11830 rm -f conftest.er1
11831 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011833 (exit $ac_status); } && {
11834 test -z "$ac_c_werror_flag" ||
11835 test ! -s conftest.err
11836 } && test -s conftest.$ac_objext; then
11837 ac_hi=-1 ac_mid=-1
11838 while :; do
11839 cat >conftest.$ac_ext <<_ACEOF
11840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
11845$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011846 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847int
11848main ()
11849{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011851test_array [0] = 0
11852
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857rm -f conftest.$ac_objext
11858if { (ac_try="$ac_compile"
11859case "(($ac_try" in
11860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11861 *) ac_try_echo=$ac_try;;
11862esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011864 (eval "$ac_compile") 2>conftest.er1
11865 ac_status=$?
11866 grep -v '^ *+' conftest.er1 >conftest.err
11867 rm -f conftest.er1
11868 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870 (exit $ac_status); } && {
11871 test -z "$ac_c_werror_flag" ||
11872 test ! -s conftest.err
11873 } && test -s conftest.$ac_objext; then
11874 ac_lo=$ac_mid; break
11875else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011876 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011877sed 's/^/| /' conftest.$ac_ext >&5
11878
11879 ac_hi=`expr '(' $ac_mid ')' - 1`
11880 if test $ac_mid -le $ac_hi; then
11881 ac_lo= ac_hi=
11882 break
11883 fi
11884 ac_mid=`expr 2 '*' $ac_mid`
11885fi
11886
11887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11888 done
11889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011890 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011891sed 's/^/| /' conftest.$ac_ext >&5
11892
11893 ac_lo= ac_hi=
11894fi
11895
11896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11897fi
11898
11899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11900# Binary search between lo and hi bounds.
11901while test "x$ac_lo" != "x$ac_hi"; do
11902 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11903 cat >conftest.$ac_ext <<_ACEOF
11904/* confdefs.h. */
11905_ACEOF
11906cat confdefs.h >>conftest.$ac_ext
11907cat >>conftest.$ac_ext <<_ACEOF
11908/* end confdefs.h. */
11909$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011910 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011911int
11912main ()
11913{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011915test_array [0] = 0
11916
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921rm -f conftest.$ac_objext
11922if { (ac_try="$ac_compile"
11923case "(($ac_try" in
11924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11925 *) ac_try_echo=$ac_try;;
11926esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011928 (eval "$ac_compile") 2>conftest.er1
11929 ac_status=$?
11930 grep -v '^ *+' conftest.er1 >conftest.err
11931 rm -f conftest.er1
11932 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011934 (exit $ac_status); } && {
11935 test -z "$ac_c_werror_flag" ||
11936 test ! -s conftest.err
11937 } && test -s conftest.$ac_objext; then
11938 ac_hi=$ac_mid
11939else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011940 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011941sed 's/^/| /' conftest.$ac_ext >&5
11942
11943 ac_lo=`expr '(' $ac_mid ')' + 1`
11944fi
11945
11946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11947done
11948case $ac_lo in
11949?*) ac_cv_sizeof_long_double=$ac_lo;;
11950'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011951 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011953echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011955 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011956 else
11957 ac_cv_sizeof_long_double=0
11958 fi ;;
11959esac
11960else
11961 cat >conftest.$ac_ext <<_ACEOF
11962/* confdefs.h. */
11963_ACEOF
11964cat confdefs.h >>conftest.$ac_ext
11965cat >>conftest.$ac_ext <<_ACEOF
11966/* end confdefs.h. */
11967$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011968 typedef long double ac__type_sizeof_;
11969static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11970static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011971#include <stdio.h>
11972#include <stdlib.h>
11973int
11974main ()
11975{
11976
11977 FILE *f = fopen ("conftest.val", "w");
11978 if (! f)
11979 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011980 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011981 {
11982 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011983 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011984 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011985 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 }
11987 else
11988 {
11989 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011990 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011992 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 }
11994 return ferror (f) || fclose (f) != 0;
11995
11996 ;
11997 return 0;
11998}
11999_ACEOF
12000rm -f conftest$ac_exeext
12001if { (ac_try="$ac_link"
12002case "(($ac_try" in
12003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12004 *) ac_try_echo=$ac_try;;
12005esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007 (eval "$ac_link") 2>&5
12008 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12011 { (case "(($ac_try" in
12012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12013 *) ac_try_echo=$ac_try;;
12014esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012016 (eval "$ac_try") 2>&5
12017 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012019 (exit $ac_status); }; }; then
12020 ac_cv_sizeof_long_double=`cat conftest.val`
12021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012022 echo "$as_me: program exited with status $ac_status" >&5
12023echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012024sed 's/^/| /' conftest.$ac_ext >&5
12025
12026( exit $ac_status )
12027if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012028 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012029See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012030echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012031See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012032 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033 else
12034 ac_cv_sizeof_long_double=0
12035 fi
12036fi
12037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12038fi
12039rm -f conftest.val
12040fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012041{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12042echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043
12044
12045
12046cat >>confdefs.h <<_ACEOF
12047#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12048_ACEOF
12049
12050
12051fi
12052
12053
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012054{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12055echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012056have_c99_bool=no
12057cat >conftest.$ac_ext <<_ACEOF
12058/* confdefs.h. */
12059_ACEOF
12060cat confdefs.h >>conftest.$ac_ext
12061cat >>conftest.$ac_ext <<_ACEOF
12062/* end confdefs.h. */
12063
12064int
12065main ()
12066{
12067_Bool x; x = (_Bool)0;
12068 ;
12069 return 0;
12070}
12071_ACEOF
12072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073if { (ac_try="$ac_compile"
12074case "(($ac_try" in
12075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12076 *) ac_try_echo=$ac_try;;
12077esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012080 ac_status=$?
12081 grep -v '^ *+' conftest.er1 >conftest.err
12082 rm -f conftest.er1
12083 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085 (exit $ac_status); } && {
12086 test -z "$ac_c_werror_flag" ||
12087 test ! -s conftest.err
12088 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012089
12090
12091cat >>confdefs.h <<\_ACEOF
12092#define HAVE_C99_BOOL 1
12093_ACEOF
12094
12095 have_c99_bool=yes
12096
12097else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012098 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012099sed 's/^/| /' conftest.$ac_ext >&5
12100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101
Thomas Woutersb2137042007-02-01 18:02:27 +000012102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103
12104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012105{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12106echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012107if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012108{ echo "$as_me:$LINENO: checking for _Bool" >&5
12109echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12110if test "${ac_cv_type__Bool+set}" = set; then
12111 echo $ECHO_N "(cached) $ECHO_C" >&6
12112else
12113 cat >conftest.$ac_ext <<_ACEOF
12114/* confdefs.h. */
12115_ACEOF
12116cat confdefs.h >>conftest.$ac_ext
12117cat >>conftest.$ac_ext <<_ACEOF
12118/* end confdefs.h. */
12119$ac_includes_default
12120typedef _Bool ac__type_new_;
12121int
12122main ()
12123{
12124if ((ac__type_new_ *) 0)
12125 return 0;
12126if (sizeof (ac__type_new_))
12127 return 0;
12128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext
12133if { (ac_try="$ac_compile"
12134case "(($ac_try" in
12135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12136 *) ac_try_echo=$ac_try;;
12137esac
12138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12139 (eval "$ac_compile") 2>conftest.er1
12140 ac_status=$?
12141 grep -v '^ *+' conftest.er1 >conftest.err
12142 rm -f conftest.er1
12143 cat conftest.err >&5
12144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145 (exit $ac_status); } && {
12146 test -z "$ac_c_werror_flag" ||
12147 test ! -s conftest.err
12148 } && test -s conftest.$ac_objext; then
12149 ac_cv_type__Bool=yes
12150else
12151 echo "$as_me: failed program was:" >&5
12152sed 's/^/| /' conftest.$ac_ext >&5
12153
12154 ac_cv_type__Bool=no
12155fi
12156
12157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12158fi
12159{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12160echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162# The cast to long int works around a bug in the HP C Compiler
12163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12165# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012166{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12167echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012168if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012169 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012170else
12171 if test "$cross_compiling" = yes; then
12172 # Depending upon the size, compute the lo and hi bounds.
12173cat >conftest.$ac_ext <<_ACEOF
12174/* confdefs.h. */
12175_ACEOF
12176cat confdefs.h >>conftest.$ac_ext
12177cat >>conftest.$ac_ext <<_ACEOF
12178/* end confdefs.h. */
12179$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012180 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012181int
12182main ()
12183{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012185test_array [0] = 0
12186
12187 ;
12188 return 0;
12189}
12190_ACEOF
12191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192if { (ac_try="$ac_compile"
12193case "(($ac_try" in
12194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12195 *) ac_try_echo=$ac_try;;
12196esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012199 ac_status=$?
12200 grep -v '^ *+' conftest.er1 >conftest.err
12201 rm -f conftest.er1
12202 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204 (exit $ac_status); } && {
12205 test -z "$ac_c_werror_flag" ||
12206 test ! -s conftest.err
12207 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012208 ac_lo=0 ac_mid=0
12209 while :; do
12210 cat >conftest.$ac_ext <<_ACEOF
12211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
12216$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012217 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012218int
12219main ()
12220{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012221static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012222test_array [0] = 0
12223
12224 ;
12225 return 0;
12226}
12227_ACEOF
12228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229if { (ac_try="$ac_compile"
12230case "(($ac_try" in
12231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12232 *) ac_try_echo=$ac_try;;
12233esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012236 ac_status=$?
12237 grep -v '^ *+' conftest.er1 >conftest.err
12238 rm -f conftest.er1
12239 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241 (exit $ac_status); } && {
12242 test -z "$ac_c_werror_flag" ||
12243 test ! -s conftest.err
12244 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012245 ac_hi=$ac_mid; break
12246else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012247 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012248sed 's/^/| /' conftest.$ac_ext >&5
12249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250 ac_lo=`expr $ac_mid + 1`
12251 if test $ac_lo -le $ac_mid; then
12252 ac_lo= ac_hi=
12253 break
12254 fi
12255 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257
12258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012259 done
12260else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012261 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012262sed 's/^/| /' conftest.$ac_ext >&5
12263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012265/* confdefs.h. */
12266_ACEOF
12267cat confdefs.h >>conftest.$ac_ext
12268cat >>conftest.$ac_ext <<_ACEOF
12269/* end confdefs.h. */
12270$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012271 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012272int
12273main ()
12274{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012276test_array [0] = 0
12277
12278 ;
12279 return 0;
12280}
12281_ACEOF
12282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283if { (ac_try="$ac_compile"
12284case "(($ac_try" in
12285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12286 *) ac_try_echo=$ac_try;;
12287esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012290 ac_status=$?
12291 grep -v '^ *+' conftest.er1 >conftest.err
12292 rm -f conftest.er1
12293 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295 (exit $ac_status); } && {
12296 test -z "$ac_c_werror_flag" ||
12297 test ! -s conftest.err
12298 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012299 ac_hi=-1 ac_mid=-1
12300 while :; do
12301 cat >conftest.$ac_ext <<_ACEOF
12302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
12307$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012308 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012309int
12310main ()
12311{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012313test_array [0] = 0
12314
12315 ;
12316 return 0;
12317}
12318_ACEOF
12319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320if { (ac_try="$ac_compile"
12321case "(($ac_try" in
12322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12323 *) ac_try_echo=$ac_try;;
12324esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012327 ac_status=$?
12328 grep -v '^ *+' conftest.er1 >conftest.err
12329 rm -f conftest.er1
12330 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332 (exit $ac_status); } && {
12333 test -z "$ac_c_werror_flag" ||
12334 test ! -s conftest.err
12335 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012336 ac_lo=$ac_mid; break
12337else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012338 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012339sed 's/^/| /' conftest.$ac_ext >&5
12340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341 ac_hi=`expr '(' $ac_mid ')' - 1`
12342 if test $ac_mid -le $ac_hi; then
12343 ac_lo= ac_hi=
12344 break
12345 fi
12346 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348
12349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012350 done
12351else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012352 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012353sed 's/^/| /' conftest.$ac_ext >&5
12354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357
12358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360
12361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012362# Binary search between lo and hi bounds.
12363while test "x$ac_lo" != "x$ac_hi"; do
12364 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12365 cat >conftest.$ac_ext <<_ACEOF
12366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
12371$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012372 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012373int
12374main ()
12375{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012377test_array [0] = 0
12378
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384if { (ac_try="$ac_compile"
12385case "(($ac_try" in
12386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12387 *) ac_try_echo=$ac_try;;
12388esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012391 ac_status=$?
12392 grep -v '^ *+' conftest.er1 >conftest.err
12393 rm -f conftest.er1
12394 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396 (exit $ac_status); } && {
12397 test -z "$ac_c_werror_flag" ||
12398 test ! -s conftest.err
12399 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012400 ac_hi=$ac_mid
12401else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012402 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012403sed 's/^/| /' conftest.$ac_ext >&5
12404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407
12408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012409done
12410case $ac_lo in
12411?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012413 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012414See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012415echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012416See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012417 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418 else
12419 ac_cv_sizeof__Bool=0
12420 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012421esac
12422else
12423 cat >conftest.$ac_ext <<_ACEOF
12424/* confdefs.h. */
12425_ACEOF
12426cat confdefs.h >>conftest.$ac_ext
12427cat >>conftest.$ac_ext <<_ACEOF
12428/* end confdefs.h. */
12429$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012430 typedef _Bool ac__type_sizeof_;
12431static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12432static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012433#include <stdio.h>
12434#include <stdlib.h>
12435int
12436main ()
12437{
12438
12439 FILE *f = fopen ("conftest.val", "w");
12440 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012442 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012443 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012445 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012447 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012448 }
12449 else
12450 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012452 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012454 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012455 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012457
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463if { (ac_try="$ac_link"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012470 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473 { (case "(($ac_try" in
12474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12475 *) ac_try_echo=$ac_try;;
12476esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012479 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012481 (exit $ac_status); }; }; then
12482 ac_cv_sizeof__Bool=`cat conftest.val`
12483else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012484 echo "$as_me: program exited with status $ac_status" >&5
12485echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012486sed 's/^/| /' conftest.$ac_ext >&5
12487
12488( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012490 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012491See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012492echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012493See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495 else
12496 ac_cv_sizeof__Bool=0
12497 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012500fi
12501rm -f conftest.val
12502fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012503{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12504echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505
12506
12507
Thomas Woutersb2137042007-02-01 18:02:27 +000012508cat >>confdefs.h <<_ACEOF
12509#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12510_ACEOF
12511
12512
12513fi
12514
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012515{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12516echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012517if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012518 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012519else
12520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* confdefs.h. */
12522_ACEOF
12523cat confdefs.h >>conftest.$ac_ext
12524cat >>conftest.$ac_ext <<_ACEOF
12525/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012526#ifdef HAVE_STDINT_H
12527 #include <stdint.h>
12528 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012529
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012530typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012531int
12532main ()
12533{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012534if ((ac__type_new_ *) 0)
12535 return 0;
12536if (sizeof (ac__type_new_))
12537 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ;
12539 return 0;
12540}
12541_ACEOF
12542rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543if { (ac_try="$ac_compile"
12544case "(($ac_try" in
12545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12546 *) ac_try_echo=$ac_try;;
12547esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012551 grep -v '^ *+' conftest.er1 >conftest.err
12552 rm -f conftest.er1
12553 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555 (exit $ac_status); } && {
12556 test -z "$ac_c_werror_flag" ||
12557 test ! -s conftest.err
12558 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012559 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012560else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012562sed 's/^/| /' conftest.$ac_ext >&5
12563
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012564 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566
12567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012568fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012569{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12570echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12571if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012572
12573cat >>confdefs.h <<_ACEOF
12574#define HAVE_UINTPTR_T 1
12575_ACEOF
12576
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012577{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12578echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12579if test "${ac_cv_type_uintptr_t+set}" = set; then
12580 echo $ECHO_N "(cached) $ECHO_C" >&6
12581else
12582 cat >conftest.$ac_ext <<_ACEOF
12583/* confdefs.h. */
12584_ACEOF
12585cat confdefs.h >>conftest.$ac_ext
12586cat >>conftest.$ac_ext <<_ACEOF
12587/* end confdefs.h. */
12588$ac_includes_default
12589typedef uintptr_t ac__type_new_;
12590int
12591main ()
12592{
12593if ((ac__type_new_ *) 0)
12594 return 0;
12595if (sizeof (ac__type_new_))
12596 return 0;
12597 ;
12598 return 0;
12599}
12600_ACEOF
12601rm -f conftest.$ac_objext
12602if { (ac_try="$ac_compile"
12603case "(($ac_try" in
12604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12605 *) ac_try_echo=$ac_try;;
12606esac
12607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12608 (eval "$ac_compile") 2>conftest.er1
12609 ac_status=$?
12610 grep -v '^ *+' conftest.er1 >conftest.err
12611 rm -f conftest.er1
12612 cat conftest.err >&5
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); } && {
12615 test -z "$ac_c_werror_flag" ||
12616 test ! -s conftest.err
12617 } && test -s conftest.$ac_objext; then
12618 ac_cv_type_uintptr_t=yes
12619else
12620 echo "$as_me: failed program was:" >&5
12621sed 's/^/| /' conftest.$ac_ext >&5
12622
12623 ac_cv_type_uintptr_t=no
12624fi
12625
12626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627fi
12628{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12629echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631# The cast to long int works around a bug in the HP C Compiler
12632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12634# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012635{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12636echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012637if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012639else
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 if test "$cross_compiling" = yes; then
12641 # Depending upon the size, compute the lo and hi bounds.
12642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012643/* confdefs.h. */
12644_ACEOF
12645cat confdefs.h >>conftest.$ac_ext
12646cat >>conftest.$ac_ext <<_ACEOF
12647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012648$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012649 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012650int
12651main ()
12652{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012654test_array [0] = 0
12655
12656 ;
12657 return 0;
12658}
12659_ACEOF
12660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661if { (ac_try="$ac_compile"
12662case "(($ac_try" in
12663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12664 *) ac_try_echo=$ac_try;;
12665esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673 (exit $ac_status); } && {
12674 test -z "$ac_c_werror_flag" ||
12675 test ! -s conftest.err
12676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 ac_lo=0 ac_mid=0
12678 while :; do
12679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* confdefs.h. */
12681_ACEOF
12682cat confdefs.h >>conftest.$ac_ext
12683cat >>conftest.$ac_ext <<_ACEOF
12684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012685$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012686 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012691test_array [0] = 0
12692
12693 ;
12694 return 0;
12695}
12696_ACEOF
12697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698if { (ac_try="$ac_compile"
12699case "(($ac_try" in
12700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12701 *) ac_try_echo=$ac_try;;
12702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012706 grep -v '^ *+' conftest.er1 >conftest.err
12707 rm -f conftest.er1
12708 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710 (exit $ac_status); } && {
12711 test -z "$ac_c_werror_flag" ||
12712 test ! -s conftest.err
12713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_hi=$ac_mid; break
12715else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012717sed 's/^/| /' conftest.$ac_ext >&5
12718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719 ac_lo=`expr $ac_mid + 1`
12720 if test $ac_lo -le $ac_mid; then
12721 ac_lo= ac_hi=
12722 break
12723 fi
12724 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726
12727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 done
12729else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012731sed 's/^/| /' conftest.$ac_ext >&5
12732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012734/* confdefs.h. */
12735_ACEOF
12736cat confdefs.h >>conftest.$ac_ext
12737cat >>conftest.$ac_ext <<_ACEOF
12738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012739$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012740 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012745test_array [0] = 0
12746
12747 ;
12748 return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752if { (ac_try="$ac_compile"
12753case "(($ac_try" in
12754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12755 *) ac_try_echo=$ac_try;;
12756esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012760 grep -v '^ *+' conftest.er1 >conftest.err
12761 rm -f conftest.er1
12762 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764 (exit $ac_status); } && {
12765 test -z "$ac_c_werror_flag" ||
12766 test ! -s conftest.err
12767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ac_hi=-1 ac_mid=-1
12769 while :; do
12770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012776$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012777 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012782test_array [0] = 0
12783
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789if { (ac_try="$ac_compile"
12790case "(($ac_try" in
12791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12792 *) ac_try_echo=$ac_try;;
12793esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012797 grep -v '^ *+' conftest.er1 >conftest.err
12798 rm -f conftest.er1
12799 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801 (exit $ac_status); } && {
12802 test -z "$ac_c_werror_flag" ||
12803 test ! -s conftest.err
12804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_lo=$ac_mid; break
12806else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012808sed 's/^/| /' conftest.$ac_ext >&5
12809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810 ac_hi=`expr '(' $ac_mid ')' - 1`
12811 if test $ac_mid -le $ac_hi; then
12812 ac_lo= ac_hi=
12813 break
12814 fi
12815 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 done
12820else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012822sed 's/^/| /' conftest.$ac_ext >&5
12823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826
12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829
12830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012831# Binary search between lo and hi bounds.
12832while test "x$ac_lo" != "x$ac_hi"; do
12833 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* confdefs.h. */
12836_ACEOF
12837cat confdefs.h >>conftest.$ac_ext
12838cat >>conftest.$ac_ext <<_ACEOF
12839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012840$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012841 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012842int
12843main ()
12844{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012846test_array [0] = 0
12847
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853if { (ac_try="$ac_compile"
12854case "(($ac_try" in
12855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12856 *) ac_try_echo=$ac_try;;
12857esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012861 grep -v '^ *+' conftest.er1 >conftest.err
12862 rm -f conftest.er1
12863 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865 (exit $ac_status); } && {
12866 test -z "$ac_c_werror_flag" ||
12867 test ! -s conftest.err
12868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ac_hi=$ac_mid
12870else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012872sed 's/^/| /' conftest.$ac_ext >&5
12873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876
12877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012878done
12879case $ac_lo in
12880?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012882 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012883See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012884echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012885See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012886 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 else
12888 ac_cv_sizeof_uintptr_t=0
12889 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012890esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012891else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012893/* confdefs.h. */
12894_ACEOF
12895cat confdefs.h >>conftest.$ac_ext
12896cat >>conftest.$ac_ext <<_ACEOF
12897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012898$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012899 typedef uintptr_t ac__type_sizeof_;
12900static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12901static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012902#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012903#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012904int
12905main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012906{
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
12908 FILE *f = fopen ("conftest.val", "w");
12909 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012911 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012914 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012916 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 }
12918 else
12919 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012921 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012923 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926
12927 ;
12928 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012929}
Martin v. Löwis11437992002-04-12 09:54:03 +000012930_ACEOF
12931rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932if { (ac_try="$ac_link"
12933case "(($ac_try" in
12934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12935 *) ac_try_echo=$ac_try;;
12936esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942 { (case "(($ac_try" in
12943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12944 *) ac_try_echo=$ac_try;;
12945esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 (exit $ac_status); }; }; then
12951 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012952else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012953 echo "$as_me: program exited with status $ac_status" >&5
12954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012955sed 's/^/| /' conftest.$ac_ext >&5
12956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012959 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012960See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012961echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012962See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012963 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964 else
12965 ac_cv_sizeof_uintptr_t=0
12966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968rm -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 +000012969fi
12970rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012971fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012972{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12973echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974
12975
12976
Martin v. Löwis11437992002-04-12 09:54:03 +000012977cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012978#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012979_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012980
Michael W. Hudson54241132001-12-07 15:38:26 +000012981
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012982fi
12983
Thomas Wouters89f507f2006-12-13 04:49:30 +000012984
12985
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012986# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012987{ echo "$as_me:$LINENO: checking size of off_t" >&5
12988echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012989if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012991else
12992 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012993 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* confdefs.h. */
12997_ACEOF
12998cat confdefs.h >>conftest.$ac_ext
12999cat >>conftest.$ac_ext <<_ACEOF
13000/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013001#include <stdio.h>
13002#include <sys/types.h>
13003main()
13004{
13005 FILE *f=fopen("conftestval", "w");
13006 if (!f) exit(1);
13007 fprintf(f, "%d\n", sizeof(off_t));
13008 exit(0);
13009}
Martin v. Löwis11437992002-04-12 09:54:03 +000013010_ACEOF
13011rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012if { (ac_try="$ac_link"
13013case "(($ac_try" in
13014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13015 *) ac_try_echo=$ac_try;;
13016esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022 { (case "(($ac_try" in
13023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13024 *) ac_try_echo=$ac_try;;
13025esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013031 ac_cv_sizeof_off_t=`cat conftestval`
13032else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013033 echo "$as_me: program exited with status $ac_status" >&5
13034echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013035sed 's/^/| /' conftest.$ac_ext >&5
13036
Martin v. Löwis11437992002-04-12 09:54:03 +000013037( exit $ac_status )
13038ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040rm -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 +000013041fi
13042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043
13044
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045fi
13046
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013047{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13048echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
13050cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013051#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013052_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013053
Michael W. Hudson54241132001-12-07 15:38:26 +000013054
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013055{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13056echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013057if test "$have_long_long" = yes
13058then
13059if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013060 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013061
Martin v. Löwis11437992002-04-12 09:54:03 +000013062cat >>confdefs.h <<\_ACEOF
13063#define HAVE_LARGEFILE_SUPPORT 1
13064_ACEOF
13065
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013066 { echo "$as_me:$LINENO: result: yes" >&5
13067echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013069 { echo "$as_me:$LINENO: result: no" >&5
13070echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013071fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013072else
13073 { echo "$as_me:$LINENO: result: no" >&5
13074echo "${ECHO_T}no" >&6; }
13075fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013076
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013077# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013078{ echo "$as_me:$LINENO: checking size of time_t" >&5
13079echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013080if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013082else
13083 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013084 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013085else
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* confdefs.h. */
13088_ACEOF
13089cat confdefs.h >>conftest.$ac_ext
13090cat >>conftest.$ac_ext <<_ACEOF
13091/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013092#include <stdio.h>
13093#include <time.h>
13094main()
13095{
13096 FILE *f=fopen("conftestval", "w");
13097 if (!f) exit(1);
13098 fprintf(f, "%d\n", sizeof(time_t));
13099 exit(0);
13100}
Martin v. Löwis11437992002-04-12 09:54:03 +000013101_ACEOF
13102rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103if { (ac_try="$ac_link"
13104case "(($ac_try" in
13105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13106 *) ac_try_echo=$ac_try;;
13107esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013109 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013110 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113 { (case "(($ac_try" in
13114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13115 *) ac_try_echo=$ac_try;;
13116esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013122 ac_cv_sizeof_time_t=`cat conftestval`
13123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013124 echo "$as_me: program exited with status $ac_status" >&5
13125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013126sed 's/^/| /' conftest.$ac_ext >&5
13127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128( exit $ac_status )
13129ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131rm -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 +000013132fi
13133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134
13135
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013136fi
13137
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013138{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13139echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013140
13141cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013142#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013143_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013144
Michael W. Hudson54241132001-12-07 15:38:26 +000013145
13146
Trent Mick635f6fb2000-08-23 21:33:05 +000013147# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013148ac_save_cc="$CC"
13149if test "$ac_cv_kpthread" = "yes"
13150then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013151elif test "$ac_cv_kthread" = "yes"
13152then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013153elif test "$ac_cv_pthread" = "yes"
13154then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013155fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013156{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13157echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013158have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013160/* confdefs.h. */
13161_ACEOF
13162cat confdefs.h >>conftest.$ac_ext
13163cat >>conftest.$ac_ext <<_ACEOF
13164/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013165#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013166int
13167main ()
13168{
Guido van Rossum12580492000-09-24 16:47:19 +000013169pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 ;
13171 return 0;
13172}
13173_ACEOF
13174rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175if { (ac_try="$ac_compile"
13176case "(($ac_try" in
13177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13178 *) ac_try_echo=$ac_try;;
13179esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013183 grep -v '^ *+' conftest.er1 >conftest.err
13184 rm -f conftest.er1
13185 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187 (exit $ac_status); } && {
13188 test -z "$ac_c_werror_flag" ||
13189 test ! -s conftest.err
13190 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013191 have_pthread_t=yes
13192else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013194sed 's/^/| /' conftest.$ac_ext >&5
13195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196
Trent Mick635f6fb2000-08-23 21:33:05 +000013197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198
13199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013200{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13201echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013202if test "$have_pthread_t" = yes ; then
13203 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013204 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13205echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013207 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013208else
13209 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013210 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013211else
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* confdefs.h. */
13214_ACEOF
13215cat confdefs.h >>conftest.$ac_ext
13216cat >>conftest.$ac_ext <<_ACEOF
13217/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013218#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013219#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013220 main()
13221 {
13222 FILE *f=fopen("conftestval", "w");
13223 if (!f) exit(1);
13224 fprintf(f, "%d\n", sizeof(pthread_t));
13225 exit(0);
13226 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013227_ACEOF
13228rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013229if { (ac_try="$ac_link"
13230case "(($ac_try" in
13231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13232 *) ac_try_echo=$ac_try;;
13233esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239 { (case "(($ac_try" in
13240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13241 *) ac_try_echo=$ac_try;;
13242esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013245 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013248 ac_cv_sizeof_pthread_t=`cat conftestval`
13249else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013250 echo "$as_me: program exited with status $ac_status" >&5
13251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013252sed 's/^/| /' conftest.$ac_ext >&5
13253
Martin v. Löwis11437992002-04-12 09:54:03 +000013254( exit $ac_status )
13255ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257rm -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 +000013258fi
13259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260
13261
Trent Mick635f6fb2000-08-23 21:33:05 +000013262fi
13263
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013264 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13265echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
13267cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013268#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013269_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013270
13271fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013272CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013273
Michael W. Hudson54241132001-12-07 15:38:26 +000013274
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013275
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013276
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013277case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013278 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013279 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13280 ;;
13281 Darwin/*)
13282 OTHER_LIBTOOL_OPT=""
13283 ;;
13284esac
13285
13286
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013287ARCH_RUN_32BIT=""
13288
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013289case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013290 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013291 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13292 if test "${enable_universalsdk}"; then
13293 :
13294 else
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013295 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013296 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013297 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013298 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013299 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013300 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013301 if test ${gcc_version} '<' 4.0
13302 then
13303 LIBTOOL_CRUFT="-lcc_dynamic"
13304 else
13305 LIBTOOL_CRUFT=""
13306 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013307 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013308 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013309else
13310 cat >conftest.$ac_ext <<_ACEOF
13311/* confdefs.h. */
13312_ACEOF
13313cat confdefs.h >>conftest.$ac_ext
13314cat >>conftest.$ac_ext <<_ACEOF
13315/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013316
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013317 #include <unistd.h>
13318 int main(int argc, char*argv[])
13319 {
13320 if (sizeof(long) == 4) {
13321 return 0;
13322 } else {
13323 return 1;
13324 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013325 }
13326
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013327_ACEOF
13328rm -f conftest$ac_exeext
13329if { (ac_try="$ac_link"
13330case "(($ac_try" in
13331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13332 *) ac_try_echo=$ac_try;;
13333esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013335 (eval "$ac_link") 2>&5
13336 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13339 { (case "(($ac_try" in
13340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13341 *) ac_try_echo=$ac_try;;
13342esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013344 (eval "$ac_try") 2>&5
13345 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013347 (exit $ac_status); }; }; then
13348 ac_osx_32bit=yes
13349else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013350 echo "$as_me: program exited with status $ac_status" >&5
13351echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013352sed 's/^/| /' conftest.$ac_ext >&5
13353
13354( exit $ac_status )
13355ac_osx_32bit=no
13356fi
13357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13358fi
13359
13360
13361
13362 if test "${ac_osx_32bit}" = "yes"; then
13363 case `arch` in
13364 i386)
13365 MACOSX_DEFAULT_ARCH="i386"
13366 ;;
13367 ppc)
13368 MACOSX_DEFAULT_ARCH="ppc"
13369 ;;
13370 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013371 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13372echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013373 { (exit 1); exit 1; }; }
13374 ;;
13375 esac
13376 else
13377 case `arch` in
13378 i386)
13379 MACOSX_DEFAULT_ARCH="x86_64"
13380 ;;
13381 ppc)
13382 MACOSX_DEFAULT_ARCH="ppc64"
13383 ;;
13384 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013385 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13386echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013387 { (exit 1); exit 1; }; }
13388 ;;
13389 esac
13390
13391 #ARCH_RUN_32BIT="true"
13392 fi
13393
13394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013395 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013396 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013397esac
13398
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013399{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13400echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013401if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013402then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013403 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013405 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407cat >>confdefs.h <<\_ACEOF
13408#define WITH_NEXT_FRAMEWORK 1
13409_ACEOF
13410
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013411 { echo "$as_me:$LINENO: result: yes" >&5
13412echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013413 if test $enable_shared = "yes"
13414 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013415 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13416echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren99aab652009-06-08 21:22:57 +000013417 { (exit 1); exit 1; }; }
13418 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013419else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013420 { echo "$as_me:$LINENO: result: no" >&5
13421echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013422fi
13423
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013424{ echo "$as_me:$LINENO: checking for dyld" >&5
13425echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013426case $ac_sys_system/$ac_sys_release in
13427 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429cat >>confdefs.h <<\_ACEOF
13430#define WITH_DYLD 1
13431_ACEOF
13432
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013433 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13434echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013435 ;;
13436 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013437 { echo "$as_me:$LINENO: result: no" >&5
13438echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013439 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013440esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013441
Guido van Rossum0a516c91994-09-12 10:58:40 +000013442# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013443
Michael W. Hudson54241132001-12-07 15:38:26 +000013444
13445
13446
13447
Guido van Rossum0a516c91994-09-12 10:58:40 +000013448# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013449# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013450{ echo "$as_me:$LINENO: checking SO" >&5
13451echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013452if test -z "$SO"
13453then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013455 hp*|HP*)
13456 case `uname -m` in
13457 ia64) SO=.so;;
13458 *) SO=.sl;;
13459 esac
13460 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013461 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013462 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013463 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013464else
13465 # this might also be a termcap variable, see #610332
13466 echo
13467 echo '====================================================================='
13468 echo '+ +'
13469 echo '+ WARNING: You have set SO in your environment. +'
13470 echo '+ Do you really mean to change the extension for shared libraries? +'
13471 echo '+ Continuing in 10 seconds to let you to ponder. +'
13472 echo '+ +'
13473 echo '====================================================================='
13474 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013475fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013476{ echo "$as_me:$LINENO: result: $SO" >&5
13477echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013478
Georg Brandlb1441c72009-01-03 22:33:39 +000013479
Thomas Wouters477c8d52006-05-27 19:21:47 +000013480cat >>confdefs.h <<_ACEOF
13481#define SHLIB_EXT "$SO"
13482_ACEOF
13483
Guido van Rossum0a516c91994-09-12 10:58:40 +000013484# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013485# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013486# (Shared libraries in this instance are shared modules to be loaded into
13487# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013488{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13489echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013490if test -z "$LDSHARED"
13491then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013493 AIX*)
13494 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013495 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013496 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013497 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013498 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013500 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013501 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013502 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013503 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013504 hp*|HP*)
13505 if test "$GCC" = "yes"
13506 then LDSHARED='$(CC) -shared'
13507 else LDSHARED='ld -b';
13508 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013509 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013510 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013511 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13512 if test "$enable_framework" ; then
13513 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013514 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13515 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013516 else
13517 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013518 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013519 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013520 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013521 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13522 if test "$enable_framework" ; then
13523 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013524 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13525 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013526 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013527 # No framework, use the Python app as bundle-loader
13528 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013529 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013530 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013531 Darwin/*)
13532 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13533 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013534
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013535 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013536 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013537 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013538 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013539 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013540 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13541 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013542 else
13543 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13544 if test "$enable_framework" ; then
13545 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013546 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13547 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013548 else
13549 # No framework, use the Python app as bundle-loader
13550 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13551 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13552 fi
13553 fi
13554 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013555 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013556 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013557 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013558 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013559 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013560 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013561 else
13562 LDSHARED="ld -Bshareable ${LDFLAGS}"
13563 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013564 OpenBSD*)
13565 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13566 then
13567 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13568 else
13569 case `uname -r` in
13570 [01].* | 2.[0-7] | 2.[0-7].*)
13571 LDSHARED="ld -Bshareable ${LDFLAGS}"
13572 ;;
13573 *)
13574 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13575 ;;
13576 esac
13577 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013578 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013579 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013580 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013581 then LDSHARED='$(CC) -shared'
13582 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013583 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013584 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013585 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013586 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013587 *) LDSHARED="ld";;
13588 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013589fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013590{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13591echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013592BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013593# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013594# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013595{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13596echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013597if test -z "$CCSHARED"
13598then
Guido van Rossum07397971997-04-29 21:49:50 +000013599 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013600 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013601 then CCSHARED="-fPIC";
13602 elif test `uname -p` = sparc;
13603 then CCSHARED="-xcode=pic32";
13604 else CCSHARED="-Kpic";
13605 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013606 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013607 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013608 else CCSHARED="+z";
13609 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013610 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013611 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013612 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013613 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013614 if test "$GCC" = "yes"
13615 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013616 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013617 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013618 SCO_SV*)
13619 if test "$GCC" = "yes"
13620 then CCSHARED="-fPIC"
13621 else CCSHARED="-Kpic -belf"
13622 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013623 IRIX*/6*) case $CC in
13624 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013625 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013626 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013627 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013628 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013629fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013630{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13631echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013632# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013633# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013634{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13635echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013636if test -z "$LINKFORSHARED"
13637then
Guido van Rossum07397971997-04-29 21:49:50 +000013638 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013639 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013640 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013641 LINKFORSHARED="-Wl,-E -Wl,+s";;
13642# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013643 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013644 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013645 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013647 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013648 if test "$enable_framework"
13649 then
Jack Jansenda49e192005-01-07 13:08:22 +000013650 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013651 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013652 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013653 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013654 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013655 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013656 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013657 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13658 then
13659 LINKFORSHARED="-Wl,--export-dynamic"
13660 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013661 SunOS/5*) case $CC in
13662 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013663 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013664 then
13665 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013666 fi;;
13667 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013668 CYGWIN*)
13669 if test $enable_shared = "no"
13670 then
13671 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13672 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013673 QNX*)
13674 # -Wl,-E causes the symbols to be added to the dynamic
13675 # symbol table so that they can be found when a module
13676 # is loaded. -N 2048K causes the stack size to be set
13677 # to 2048 kilobytes so that the stack doesn't overflow
13678 # when running test_compile.py.
13679 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013681fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013682{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13683echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013684
Michael W. Hudson54241132001-12-07 15:38:26 +000013685
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013686
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013687{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13688echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013689if test ! "$LIBRARY" = "$LDLIBRARY"
13690then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013691 case $ac_sys_system in
13692 CYGWIN*)
13693 # Cygwin needs CCSHARED when building extension DLLs
13694 # but not when building the interpreter DLL.
13695 CFLAGSFORSHARED='';;
13696 *)
13697 CFLAGSFORSHARED='$(CCSHARED)'
13698 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013700{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13701echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013702
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013703# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13704# library (with --enable-shared).
13705# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013706# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13707# if it is not required, since it creates a dependency of the shared library
13708# to LIBS. This, in turn, means that applications linking the shared libpython
13709# don't need to link LIBS explicitly. The default should be only changed
13710# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013711
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013712{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13713echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013714case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013715 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013716 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013717esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013718{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13719echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013720
13721
Guido van Rossum627b2d71993-12-24 10:39:16 +000013722# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013723
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013724{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13725echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013726if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013727 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728else
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013730LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* confdefs.h. */
13733_ACEOF
13734cat confdefs.h >>conftest.$ac_ext
13735cat >>conftest.$ac_ext <<_ACEOF
13736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738/* Override any GCC internal prototype to avoid an error.
13739 Use char because int might match the return type of a GCC
13740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013741#ifdef __cplusplus
13742extern "C"
13743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013744char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013745int
13746main ()
13747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 ;
13750 return 0;
13751}
13752_ACEOF
13753rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754if { (ac_try="$ac_link"
13755case "(($ac_try" in
13756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13757 *) ac_try_echo=$ac_try;;
13758esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013762 grep -v '^ *+' conftest.er1 >conftest.err
13763 rm -f conftest.er1
13764 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766 (exit $ac_status); } && {
13767 test -z "$ac_c_werror_flag" ||
13768 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013769 } && test -s conftest$ac_exeext &&
13770 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013774sed 's/^/| /' conftest.$ac_ext >&5
13775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778
13779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013782fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013783{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13784echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13785if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 cat >>confdefs.h <<_ACEOF
13787#define HAVE_LIBDL 1
13788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013790 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792fi
13793 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013794
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013795{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13796echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013797if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799else
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013801LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013803/* confdefs.h. */
13804_ACEOF
13805cat confdefs.h >>conftest.$ac_ext
13806cat >>conftest.$ac_ext <<_ACEOF
13807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809/* Override any GCC internal prototype to avoid an error.
13810 Use char because int might match the return type of a GCC
13811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013812#ifdef __cplusplus
13813extern "C"
13814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013815char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013816int
13817main ()
13818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 ;
13821 return 0;
13822}
13823_ACEOF
13824rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825if { (ac_try="$ac_link"
13826case "(($ac_try" in
13827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13828 *) ac_try_echo=$ac_try;;
13829esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013833 grep -v '^ *+' conftest.er1 >conftest.err
13834 rm -f conftest.er1
13835 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 (exit $ac_status); } && {
13838 test -z "$ac_c_werror_flag" ||
13839 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013840 } && test -s conftest$ac_exeext &&
13841 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013845sed 's/^/| /' conftest.$ac_ext >&5
13846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013847 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849
13850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013851 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013852LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013853fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013854{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13855echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13856if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 cat >>confdefs.h <<_ACEOF
13858#define HAVE_LIBDLD 1
13859_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013861 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013862
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863fi
13864 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013865
Georg Brandlb1441c72009-01-03 22:33:39 +000013866# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013867if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013868 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13869echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013870if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013872else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013873 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013875/* confdefs.h. */
13876_ACEOF
13877cat confdefs.h >>conftest.$ac_ext
13878cat >>conftest.$ac_ext <<_ACEOF
13879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881/* Override any GCC internal prototype to avoid an error.
13882 Use char because int might match the return type of a GCC
13883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013884#ifdef __cplusplus
13885extern "C"
13886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013887char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013888int
13889main ()
13890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 ;
13893 return 0;
13894}
13895_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896for ac_lib in '' pthread rt posix4; do
13897 if test -z "$ac_lib"; then
13898 ac_res="none required"
13899 else
13900 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013901 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 fi
13903 rm -f conftest.$ac_objext conftest$ac_exeext
13904if { (ac_try="$ac_link"
13905case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013911 ac_status=$?
13912 grep -v '^ *+' conftest.er1 >conftest.err
13913 rm -f conftest.er1
13914 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 (exit $ac_status); } && {
13917 test -z "$ac_c_werror_flag" ||
13918 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013919 } && test -s conftest$ac_exeext &&
13920 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013922else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013923 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013924sed 's/^/| /' conftest.$ac_ext >&5
13925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926
Thomas Wouters477c8d52006-05-27 19:21:47 +000013927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928
13929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13930 conftest$ac_exeext
13931 if test "${ac_cv_search_sem_init+set}" = set; then
13932 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934done
13935if test "${ac_cv_search_sem_init+set}" = set; then
13936 :
13937else
13938 ac_cv_search_sem_init=no
13939fi
13940rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013941LIBS=$ac_func_search_save_LIBS
13942fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013943{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13944echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945ac_res=$ac_cv_search_sem_init
13946if test "$ac_res" != no; then
13947 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013948
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013949fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013950 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013951 # posix4 on Solaris 2.6
13952 # pthread (first!) on Linux
13953fi
13954
Martin v. Löwis19d17342003-06-14 21:03:05 +000013955# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013956{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13957echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013958if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013959 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013960else
13961 ac_check_lib_save_LIBS=$LIBS
13962LIBS="-lintl $LIBS"
13963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013964/* confdefs.h. */
13965_ACEOF
13966cat confdefs.h >>conftest.$ac_ext
13967cat >>conftest.$ac_ext <<_ACEOF
13968/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970/* Override any GCC internal prototype to avoid an error.
13971 Use char because int might match the return type of a GCC
13972 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013973#ifdef __cplusplus
13974extern "C"
13975#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013976char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013977int
13978main ()
13979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013981 ;
13982 return 0;
13983}
13984_ACEOF
13985rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986if { (ac_try="$ac_link"
13987case "(($ac_try" in
13988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13989 *) ac_try_echo=$ac_try;;
13990esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013994 grep -v '^ *+' conftest.er1 >conftest.err
13995 rm -f conftest.er1
13996 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998 (exit $ac_status); } && {
13999 test -z "$ac_c_werror_flag" ||
14000 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014001 } && test -s conftest$ac_exeext &&
14002 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014003 ac_cv_lib_intl_textdomain=yes
14004else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014006sed 's/^/| /' conftest.$ac_ext >&5
14007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010
14011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014013LIBS=$ac_check_lib_save_LIBS
14014fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014015{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14016echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14017if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014018
14019cat >>confdefs.h <<\_ACEOF
14020#define WITH_LIBINTL 1
14021_ACEOF
14022
Brett Cannonc6d936e2009-06-07 20:09:53 +000014023 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014024fi
14025
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014026
14027# checks for system dependent C++ extensions support
14028case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014029 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14030echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014032/* confdefs.h. */
14033_ACEOF
14034cat confdefs.h >>conftest.$ac_ext
14035cat >>conftest.$ac_ext <<_ACEOF
14036/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014037#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014038int
14039main ()
14040{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014041loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 ;
14043 return 0;
14044}
14045_ACEOF
14046rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047if { (ac_try="$ac_link"
14048case "(($ac_try" in
14049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14050 *) ac_try_echo=$ac_try;;
14051esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014055 grep -v '^ *+' conftest.er1 >conftest.err
14056 rm -f conftest.er1
14057 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059 (exit $ac_status); } && {
14060 test -z "$ac_c_werror_flag" ||
14061 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014062 } && test -s conftest$ac_exeext &&
14063 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014064
Martin v. Löwis11437992002-04-12 09:54:03 +000014065cat >>confdefs.h <<\_ACEOF
14066#define AIX_GENUINE_CPLUSPLUS 1
14067_ACEOF
14068
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014069 { echo "$as_me:$LINENO: result: yes" >&5
14070echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014071else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014073sed 's/^/| /' conftest.$ac_ext >&5
14074
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014075 { echo "$as_me:$LINENO: result: no" >&5
14076echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078
14079rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014080 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014081 *) ;;
14082esac
14083
Guido van Rossum70c7f481998-03-26 18:44:10 +000014084# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014085{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14086echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014087if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014089else
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014091LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014093/* confdefs.h. */
14094_ACEOF
14095cat confdefs.h >>conftest.$ac_ext
14096cat >>conftest.$ac_ext <<_ACEOF
14097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099/* Override any GCC internal prototype to avoid an error.
14100 Use char because int might match the return type of a GCC
14101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014102#ifdef __cplusplus
14103extern "C"
14104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014105char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014106int
14107main ()
14108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 ;
14111 return 0;
14112}
14113_ACEOF
14114rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115if { (ac_try="$ac_link"
14116case "(($ac_try" in
14117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14118 *) ac_try_echo=$ac_try;;
14119esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123 grep -v '^ *+' conftest.er1 >conftest.err
14124 rm -f conftest.er1
14125 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127 (exit $ac_status); } && {
14128 test -z "$ac_c_werror_flag" ||
14129 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014130 } && test -s conftest$ac_exeext &&
14131 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014133else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014135sed 's/^/| /' conftest.$ac_ext >&5
14136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139
14140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014142LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014143fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014144{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14145echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14146if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014147 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014148fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014149 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014150{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14151echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014152if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014154else
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014156LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014158/* confdefs.h. */
14159_ACEOF
14160cat confdefs.h >>conftest.$ac_ext
14161cat >>conftest.$ac_ext <<_ACEOF
14162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164/* Override any GCC internal prototype to avoid an error.
14165 Use char because int might match the return type of a GCC
14166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014167#ifdef __cplusplus
14168extern "C"
14169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014170char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014171int
14172main ()
14173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 ;
14176 return 0;
14177}
14178_ACEOF
14179rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180if { (ac_try="$ac_link"
14181case "(($ac_try" in
14182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14183 *) ac_try_echo=$ac_try;;
14184esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014188 grep -v '^ *+' conftest.er1 >conftest.err
14189 rm -f conftest.er1
14190 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192 (exit $ac_status); } && {
14193 test -z "$ac_c_werror_flag" ||
14194 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014195 } && test -s conftest$ac_exeext &&
14196 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014198else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014200sed 's/^/| /' conftest.$ac_ext >&5
14201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204
14205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014207LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014208fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014209{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14210echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14211if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014212 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014213fi
14214 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014216{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14217echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014220if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014222{ echo "$as_me:$LINENO: result: $withval" >&5
14223echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014224LIBS="$withval $LIBS"
14225
14226else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014227 { echo "$as_me:$LINENO: result: no" >&5
14228echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229fi
14230
Guido van Rossum7f43da71994-08-01 12:15:30 +000014231
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014232# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014233{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14234echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014237if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238 withval=$with_system_ffi;
14239fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014240
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014241
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014242{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14243echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014244
Matthias Klose55708cc2009-04-30 08:06:49 +000014245# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014246{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14247echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014248
14249# Check whether --with-dbmliborder was given.
14250if test "${with_dbmliborder+set}" = set; then
14251 withval=$with_dbmliborder;
14252if test x$with_dbmliborder = xyes
14253then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014254{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14255echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014256 { (exit 1); exit 1; }; }
14257else
14258 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14259 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14260 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014261 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14262echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014263 { (exit 1); exit 1; }; }
14264 fi
14265 done
14266fi
14267fi
14268
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014269{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14270echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014271
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014272# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014273
14274
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014275{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14276echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014279if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280 withval=$with_signal_module;
14281fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014282
14283
14284if test -z "$with_signal_module"
14285then with_signal_module="yes"
14286fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014287{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14288echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014289
14290if test "${with_signal_module}" = "yes"; then
14291 USE_SIGNAL_MODULE=""
14292 SIGNAL_OBJS=""
14293else
14294 USE_SIGNAL_MODULE="#"
14295 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14296fi
14297
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014298# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014299
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014300USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014301
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014302{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14303echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Guido van Rossumec2f0731997-01-22 20:54:01 +000014305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014307if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014309{ echo "$as_me:$LINENO: result: $withval" >&5
14310echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014311LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014312if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014313 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014314fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014315else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014316 { echo "$as_me:$LINENO: result: no" >&5
14317echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318fi
14319
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
14321# Templates for things AC_DEFINEd more than once.
14322# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014323
14324
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
14326
14327
14328
14329
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014330{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14331echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014334if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 withval=$with_threads;
14336fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014337
14338
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014339# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014342if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343 withval=$with_thread; with_threads=$with_thread
14344fi
14345
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014346
14347if test -z "$with_threads"
14348then with_threads="yes"
14349fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014350{ echo "$as_me:$LINENO: result: $with_threads" >&5
14351echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014352
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014353
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014354if test "$with_threads" = "no"
14355then
14356 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014357elif test "$ac_cv_pthread_is_default" = yes
14358then
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014360#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014361_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014362
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014363 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014365#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014366_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014367
14368 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014370elif test "$ac_cv_kpthread" = "yes"
14371then
14372 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014373 if test "$ac_cv_cxx_thread" = "yes"; then
14374 CXX="$CXX -Kpthread"
14375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014377#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014378_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014380 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014381 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014382elif test "$ac_cv_kthread" = "yes"
14383then
14384 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014385 if test "$ac_cv_cxx_thread" = "yes"; then
14386 CXX="$CXX -Kthread"
14387 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014388 cat >>confdefs.h <<\_ACEOF
14389#define WITH_THREAD 1
14390_ACEOF
14391
14392 posix_threads=yes
14393 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014394elif test "$ac_cv_pthread" = "yes"
14395then
14396 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014397 if test "$ac_cv_cxx_thread" = "yes"; then
14398 CXX="$CXX -pthread"
14399 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014400 cat >>confdefs.h <<\_ACEOF
14401#define WITH_THREAD 1
14402_ACEOF
14403
14404 posix_threads=yes
14405 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014406else
14407 if test ! -z "$with_threads" -a -d "$with_threads"
14408 then LDFLAGS="$LDFLAGS -L$with_threads"
14409 fi
14410 if test ! -z "$withval" -a -d "$withval"
14411 then LDFLAGS="$LDFLAGS -L$withval"
14412 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014413
14414 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014415 # define _POSIX_THREADS in unistd.h. Some apparently don't
14416 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014417 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14418echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014420/* confdefs.h. */
14421_ACEOF
14422cat confdefs.h >>conftest.$ac_ext
14423cat >>conftest.$ac_ext <<_ACEOF
14424/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014425
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014426#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014427#ifdef _POSIX_THREADS
14428yes
14429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014430
14431_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014433 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014434 unistd_defines_pthreads=yes
14435else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014436 unistd_defines_pthreads=no
14437fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000014438rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014439
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014440 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14441echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014444#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014445_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014446
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014448 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14449echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014450if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014452fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014453{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14454echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014455else
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014457{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14458echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014460/* confdefs.h. */
14461_ACEOF
14462cat confdefs.h >>conftest.$ac_ext
14463cat >>conftest.$ac_ext <<_ACEOF
14464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014465$ac_includes_default
14466#include <cthreads.h>
14467_ACEOF
14468rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469if { (ac_try="$ac_compile"
14470case "(($ac_try" in
14471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14472 *) ac_try_echo=$ac_try;;
14473esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014477 grep -v '^ *+' conftest.er1 >conftest.err
14478 rm -f conftest.er1
14479 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 (exit $ac_status); } && {
14482 test -z "$ac_c_werror_flag" ||
14483 test ! -s conftest.err
14484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ac_header_compiler=yes
14486else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014488sed 's/^/| /' conftest.$ac_ext >&5
14489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492
14493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014494{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14495echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
14497# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014498{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14499echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014500cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014501/* confdefs.h. */
14502_ACEOF
14503cat confdefs.h >>conftest.$ac_ext
14504cat >>conftest.$ac_ext <<_ACEOF
14505/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014506#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014507_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508if { (ac_try="$ac_cpp conftest.$ac_ext"
14509case "(($ac_try" in
14510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14511 *) ac_try_echo=$ac_try;;
14512esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014516 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 rm -f conftest.er1
14518 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520 (exit $ac_status); } >/dev/null && {
14521 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14522 test ! -s conftest.err
14523 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_header_preproc=yes
14525else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014527sed 's/^/| /' conftest.$ac_ext >&5
14528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014533{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14534echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
14536# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014537case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14538 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014539 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14540echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14541 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14542echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014543 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014544 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014545 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014546 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14547echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14548 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14549echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14550 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14551echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14552 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14553echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14554 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14555echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14556 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14557echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014559## -------------------------------------- ##
14560## Report this to http://bugs.python.org/ ##
14561## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014562_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014564 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014566{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14567echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014568if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014570else
14571 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014572fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014573{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14574echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
14576fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014577if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014579#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014580_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014581
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014583#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014584_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014585
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014588#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014589_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014590
14591 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014592 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014593else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014596 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14597echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014598if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014599 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014600fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014601{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14602echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014603else
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014605{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14606echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014608/* confdefs.h. */
14609_ACEOF
14610cat confdefs.h >>conftest.$ac_ext
14611cat >>conftest.$ac_ext <<_ACEOF
14612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014613$ac_includes_default
14614#include <mach/cthreads.h>
14615_ACEOF
14616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617if { (ac_try="$ac_compile"
14618case "(($ac_try" in
14619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14620 *) ac_try_echo=$ac_try;;
14621esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014625 grep -v '^ *+' conftest.er1 >conftest.err
14626 rm -f conftest.er1
14627 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 (exit $ac_status); } && {
14630 test -z "$ac_c_werror_flag" ||
14631 test ! -s conftest.err
14632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 ac_header_compiler=yes
14634else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014636sed 's/^/| /' conftest.$ac_ext >&5
14637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640
14641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014642{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14643echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
14645# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014646{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14647echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014649/* confdefs.h. */
14650_ACEOF
14651cat confdefs.h >>conftest.$ac_ext
14652cat >>conftest.$ac_ext <<_ACEOF
14653/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014654#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014655_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656if { (ac_try="$ac_cpp conftest.$ac_ext"
14657case "(($ac_try" in
14658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14659 *) ac_try_echo=$ac_try;;
14660esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014664 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014665 rm -f conftest.er1
14666 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668 (exit $ac_status); } >/dev/null && {
14669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14670 test ! -s conftest.err
14671 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 ac_header_preproc=yes
14673else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014675sed 's/^/| /' conftest.$ac_ext >&5
14676
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
Martin v. Löwis11437992002-04-12 09:54:03 +000014680rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014681{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14682echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014683
14684# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14686 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014687 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14688echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14689 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14690echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014691 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014692 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014693 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014694 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14695echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14696 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14697echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14698 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14699echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14700 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14701echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14702 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14703echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14705echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014707## -------------------------------------- ##
14708## Report this to http://bugs.python.org/ ##
14709## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014710_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014714{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14715echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014716if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014717 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014718else
14719 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014721{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14722echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014723
14724fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014725if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014727#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014728_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014731#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014732_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014733
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
14735cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014736#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014737_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014738
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014739 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014740else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014741
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014742 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14743echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014746if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014747 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14748echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014749 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014750#define WITH_THREAD 1
14751_ACEOF
14752
14753
14754cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014755#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014756_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014757
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014758 LIBS="-lpth $LIBS"
14759 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014760else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014761 { echo "$as_me:$LINENO: result: no" >&5
14762echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014763
14764 # Just looking for pthread_create in libpthread is not enough:
14765 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14766 # So we really have to include pthread.h, and then link.
14767 _libs=$LIBS
14768 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014769 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14770echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014772/* confdefs.h. */
14773_ACEOF
14774cat confdefs.h >>conftest.$ac_ext
14775cat >>conftest.$ac_ext <<_ACEOF
14776/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014777#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014778
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014779void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014780int
14781main ()
14782{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014783
14784pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014785 ;
14786 return 0;
14787}
14788_ACEOF
14789rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790if { (ac_try="$ac_link"
14791case "(($ac_try" in
14792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14793 *) ac_try_echo=$ac_try;;
14794esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014798 grep -v '^ *+' conftest.er1 >conftest.err
14799 rm -f conftest.er1
14800 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802 (exit $ac_status); } && {
14803 test -z "$ac_c_werror_flag" ||
14804 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014805 } && test -s conftest$ac_exeext &&
14806 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014807
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014808 { echo "$as_me:$LINENO: result: yes" >&5
14809echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014811#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014812_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014813
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014814 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014815 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014818sed 's/^/| /' conftest.$ac_ext >&5
14819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014821 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014822 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14823echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014824if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014826else
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014828/* confdefs.h. */
14829_ACEOF
14830cat confdefs.h >>conftest.$ac_ext
14831cat >>conftest.$ac_ext <<_ACEOF
14832/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014833/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14834 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14835#define pthread_detach innocuous_pthread_detach
14836
Guido van Rossumad678af1998-10-02 14:42:15 +000014837/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014838 which can conflict with char pthread_detach (); below.
14839 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014840 <limits.h> exists even on freestanding compilers. */
14841
14842#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014843# include <limits.h>
14844#else
14845# include <assert.h>
14846#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014847
14848#undef pthread_detach
14849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850/* Override any GCC internal prototype to avoid an error.
14851 Use char because int might match the return type of a GCC
14852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014853#ifdef __cplusplus
14854extern "C"
14855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014856char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014857/* The GNU C library defines this for functions which it implements
14858 to always fail with ENOSYS. Some functions are actually named
14859 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014861choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014862#endif
14863
Skip Montanaro6dead952003-09-25 14:50:04 +000014864int
14865main ()
14866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 ;
14869 return 0;
14870}
14871_ACEOF
14872rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873if { (ac_try="$ac_link"
14874case "(($ac_try" in
14875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14876 *) ac_try_echo=$ac_try;;
14877esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014881 grep -v '^ *+' conftest.er1 >conftest.err
14882 rm -f conftest.er1
14883 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885 (exit $ac_status); } && {
14886 test -z "$ac_c_werror_flag" ||
14887 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014888 } && test -s conftest$ac_exeext &&
14889 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014891else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014893sed 's/^/| /' conftest.$ac_ext >&5
14894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897
14898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014899 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014900fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014901{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14902echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14903if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014905#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014906_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014907
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014908 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014909 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014910else
Guido van Rossumad678af1998-10-02 14:42:15 +000014911
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014912 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014913 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14914echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014915if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014916 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014917fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014918{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14919echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920else
14921 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014922{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14923echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014925/* confdefs.h. */
14926_ACEOF
14927cat confdefs.h >>conftest.$ac_ext
14928cat >>conftest.$ac_ext <<_ACEOF
14929/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930$ac_includes_default
14931#include <atheos/threads.h>
14932_ACEOF
14933rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934if { (ac_try="$ac_compile"
14935case "(($ac_try" in
14936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14937 *) ac_try_echo=$ac_try;;
14938esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014942 grep -v '^ *+' conftest.er1 >conftest.err
14943 rm -f conftest.er1
14944 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946 (exit $ac_status); } && {
14947 test -z "$ac_c_werror_flag" ||
14948 test ! -s conftest.err
14949 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014950 ac_header_compiler=yes
14951else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014953sed 's/^/| /' conftest.$ac_ext >&5
14954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957
14958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014959{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14960echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014961
14962# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014963{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14964echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014966/* confdefs.h. */
14967_ACEOF
14968cat confdefs.h >>conftest.$ac_ext
14969cat >>conftest.$ac_ext <<_ACEOF
14970/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014971#include <atheos/threads.h>
14972_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973if { (ac_try="$ac_cpp conftest.$ac_ext"
14974case "(($ac_try" in
14975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14976 *) ac_try_echo=$ac_try;;
14977esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014980 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014981 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014982 rm -f conftest.er1
14983 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 (exit $ac_status); } >/dev/null && {
14986 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14987 test ! -s conftest.err
14988 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014989 ac_header_preproc=yes
14990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014992sed 's/^/| /' conftest.$ac_ext >&5
14993
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014994 ac_header_preproc=no
14995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014997rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014998{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14999echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015000
15001# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015002case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15003 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015004 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15005echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15006 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15007echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015008 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015009 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015010 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015011 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15012echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15013 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15014echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15015 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15016echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15017 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15018echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15019 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15020echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15021 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15022echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015024## -------------------------------------- ##
15025## Report this to http://bugs.python.org/ ##
15026## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015027_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015029 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015031{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15032echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015033if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015034 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015035else
15036 ac_cv_header_atheos_threads_h=$ac_header_preproc
15037fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015038{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15039echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015040
15041fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015042if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015043 cat >>confdefs.h <<\_ACEOF
15044#define WITH_THREAD 1
15045_ACEOF
15046
15047
15048cat >>confdefs.h <<\_ACEOF
15049#define ATHEOS_THREADS 1
15050_ACEOF
15051
15052 THREADOBJ="Python/thread.o"
15053else
15054
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015055 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15056echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015057if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015059else
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015061LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015063/* confdefs.h. */
15064_ACEOF
15065cat confdefs.h >>conftest.$ac_ext
15066cat >>conftest.$ac_ext <<_ACEOF
15067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069/* Override any GCC internal prototype to avoid an error.
15070 Use char because int might match the return type of a GCC
15071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015072#ifdef __cplusplus
15073extern "C"
15074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015075char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015076int
15077main ()
15078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ;
15081 return 0;
15082}
15083_ACEOF
15084rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085if { (ac_try="$ac_link"
15086case "(($ac_try" in
15087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15088 *) ac_try_echo=$ac_try;;
15089esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015093 grep -v '^ *+' conftest.er1 >conftest.err
15094 rm -f conftest.er1
15095 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097 (exit $ac_status); } && {
15098 test -z "$ac_c_werror_flag" ||
15099 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015100 } && test -s conftest$ac_exeext &&
15101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015103else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015105sed 's/^/| /' conftest.$ac_ext >&5
15106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109
15110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015112LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015113fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015114{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15115echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15116if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015118#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015119_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015121 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015122 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015123 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015124else
Greg Steinadf63d62000-07-05 10:38:09 +000015125
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015126 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15127echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015128if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015129 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015130else
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015132LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015134/* confdefs.h. */
15135_ACEOF
15136cat confdefs.h >>conftest.$ac_ext
15137cat >>conftest.$ac_ext <<_ACEOF
15138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140/* Override any GCC internal prototype to avoid an error.
15141 Use char because int might match the return type of a GCC
15142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015143#ifdef __cplusplus
15144extern "C"
15145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015146char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015147int
15148main ()
15149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ;
15152 return 0;
15153}
15154_ACEOF
15155rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156if { (ac_try="$ac_link"
15157case "(($ac_try" in
15158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15159 *) ac_try_echo=$ac_try;;
15160esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015164 grep -v '^ *+' conftest.er1 >conftest.err
15165 rm -f conftest.er1
15166 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168 (exit $ac_status); } && {
15169 test -z "$ac_c_werror_flag" ||
15170 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015171 } && test -s conftest$ac_exeext &&
15172 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015174else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015176sed 's/^/| /' conftest.$ac_ext >&5
15177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180
15181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015184fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015185{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15186echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15187if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015190_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015192 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015193 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015194 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015195else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015196
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015197 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15198echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015199if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015201else
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015203LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015205/* confdefs.h. */
15206_ACEOF
15207cat confdefs.h >>conftest.$ac_ext
15208cat >>conftest.$ac_ext <<_ACEOF
15209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211/* Override any GCC internal prototype to avoid an error.
15212 Use char because int might match the return type of a GCC
15213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015214#ifdef __cplusplus
15215extern "C"
15216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015217char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015218int
15219main ()
15220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 ;
15223 return 0;
15224}
15225_ACEOF
15226rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227if { (ac_try="$ac_link"
15228case "(($ac_try" in
15229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15230 *) ac_try_echo=$ac_try;;
15231esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 grep -v '^ *+' conftest.er1 >conftest.err
15236 rm -f conftest.er1
15237 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239 (exit $ac_status); } && {
15240 test -z "$ac_c_werror_flag" ||
15241 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015242 } && test -s conftest$ac_exeext &&
15243 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015245else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015247sed 's/^/| /' conftest.$ac_ext >&5
15248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251
15252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015254LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015255fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015256{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15257echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15258if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015260#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015261_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015263 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015264 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015265 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015266else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015267
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015268 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15269echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015270if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015271 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015272else
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015274LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015276/* confdefs.h. */
15277_ACEOF
15278cat confdefs.h >>conftest.$ac_ext
15279cat >>conftest.$ac_ext <<_ACEOF
15280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282/* Override any GCC internal prototype to avoid an error.
15283 Use char because int might match the return type of a GCC
15284 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015285#ifdef __cplusplus
15286extern "C"
15287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015288char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015289int
15290main ()
15291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 ;
15294 return 0;
15295}
15296_ACEOF
15297rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298if { (ac_try="$ac_link"
15299case "(($ac_try" in
15300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15301 *) ac_try_echo=$ac_try;;
15302esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015306 grep -v '^ *+' conftest.er1 >conftest.err
15307 rm -f conftest.er1
15308 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310 (exit $ac_status); } && {
15311 test -z "$ac_c_werror_flag" ||
15312 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015313 } && test -s conftest$ac_exeext &&
15314 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015318sed 's/^/| /' conftest.$ac_ext >&5
15319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322
15323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015324 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015325LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015326fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015327{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15328echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15329if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015331#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015332_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015333
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015334 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015335 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015336 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015337else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015338
Martin v. Löwis130fb172001-07-19 11:00:41 +000015339 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015340fi
15341
Guido van Rossum627b2d71993-12-24 10:39:16 +000015342
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015343fi
15344
Guido van Rossum0be3e491997-05-22 20:33:33 +000015345fi
15346
Guido van Rossum49545951997-12-02 19:28:29 +000015347fi
15348
Guido van Rossumb93a8621998-05-07 13:27:32 +000015349fi
15350
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015351
Michael W. Hudson54241132001-12-07 15:38:26 +000015352fi
15353
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355
15356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358fi
15359
Martin v. Löwis11437992002-04-12 09:54:03 +000015360fi
15361
15362
15363fi
15364
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015365
Michael W. Hudson54241132001-12-07 15:38:26 +000015366
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015367 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15368echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015369if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015373LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
15396rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397if { (ac_try="$ac_link"
15398case "(($ac_try" in
15399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15400 *) ac_try_echo=$ac_try;;
15401esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015405 grep -v '^ *+' conftest.er1 >conftest.err
15406 rm -f conftest.er1
15407 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409 (exit $ac_status); } && {
15410 test -z "$ac_c_werror_flag" ||
15411 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015412 } && test -s conftest$ac_exeext &&
15413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015415else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015417sed 's/^/| /' conftest.$ac_ext >&5
15418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421
15422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015424LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015425fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015426{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15427echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15428if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015430#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015431_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015432
Martin v. Löwis130fb172001-07-19 11:00:41 +000015433 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015434 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015435 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015436fi
15437
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015438
Neal Norwitza978ab02002-11-02 16:58:05 +000015439 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015440 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15441echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015442if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015444else
Martin v. Löwis11437992002-04-12 09:54:03 +000015445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015446LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015448/* confdefs.h. */
15449_ACEOF
15450cat confdefs.h >>conftest.$ac_ext
15451cat >>conftest.$ac_ext <<_ACEOF
15452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454/* Override any GCC internal prototype to avoid an error.
15455 Use char because int might match the return type of a GCC
15456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015457#ifdef __cplusplus
15458extern "C"
15459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015460char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015461int
15462main ()
15463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 ;
15466 return 0;
15467}
15468_ACEOF
15469rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470if { (ac_try="$ac_link"
15471case "(($ac_try" in
15472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15473 *) ac_try_echo=$ac_try;;
15474esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015478 grep -v '^ *+' conftest.er1 >conftest.err
15479 rm -f conftest.er1
15480 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482 (exit $ac_status); } && {
15483 test -z "$ac_c_werror_flag" ||
15484 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015485 } && test -s conftest$ac_exeext &&
15486 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015488else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015490sed 's/^/| /' conftest.$ac_ext >&5
15491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015494
15495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015497LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015498fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015499{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15500echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15501if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015503#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015504_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015505
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015506 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015507 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015508 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015509fi
15510
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015511 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015512
Martin v. Löwis130fb172001-07-19 11:00:41 +000015513 if test "$USE_THREAD_MODULE" != "#"
15514 then
15515 # If the above checks didn't disable threads, (at least) OSF1
15516 # needs this '-threads' argument during linking.
15517 case $ac_sys_system in
15518 OSF1) LDLAST=-threads;;
15519 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015520 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015521fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015522
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015523if test "$posix_threads" = "yes"; then
15524 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015525
15526cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015527#define _POSIX_THREADS 1
15528_ACEOF
15529
15530 fi
15531
15532 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15533 case $ac_sys_system/$ac_sys_release in
15534 SunOS/5.6)
15535cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015536#define HAVE_PTHREAD_DESTRUCTOR 1
15537_ACEOF
15538
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015539 ;;
15540 SunOS/5.8)
15541cat >>confdefs.h <<\_ACEOF
15542#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15543_ACEOF
15544
15545 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015546 AIX/5)
15547cat >>confdefs.h <<\_ACEOF
15548#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15549_ACEOF
15550
15551 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015552 esac
15553
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015554 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15555echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015556 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015558else
15559 if test "$cross_compiling" = yes; then
15560 ac_cv_pthread_system_supported=no
15561else
15562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015563/* confdefs.h. */
15564_ACEOF
15565cat confdefs.h >>conftest.$ac_ext
15566cat >>conftest.$ac_ext <<_ACEOF
15567/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015568#include <pthread.h>
15569 void *foo(void *parm) {
15570 return NULL;
15571 }
15572 main() {
15573 pthread_attr_t attr;
15574 pthread_t id;
15575 if (pthread_attr_init(&attr)) exit(-1);
15576 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15577 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15578 exit(0);
15579 }
15580_ACEOF
15581rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582if { (ac_try="$ac_link"
15583case "(($ac_try" in
15584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15585 *) ac_try_echo=$ac_try;;
15586esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015589 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592 { (case "(($ac_try" in
15593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15594 *) ac_try_echo=$ac_try;;
15595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015598 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015600 (exit $ac_status); }; }; then
15601 ac_cv_pthread_system_supported=yes
15602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015603 echo "$as_me: program exited with status $ac_status" >&5
15604echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015605sed 's/^/| /' conftest.$ac_ext >&5
15606
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015607( exit $ac_status )
15608ac_cv_pthread_system_supported=no
15609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610rm -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 +000015611fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015613
15614
Guido van Rossum627b2d71993-12-24 10:39:16 +000015615fi
15616
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015617 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15618echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015619 if test "$ac_cv_pthread_system_supported" = "yes"; then
15620
15621cat >>confdefs.h <<\_ACEOF
15622#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15623_ACEOF
15624
15625 fi
15626
15627for ac_func in pthread_sigmask
15628do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015629as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15630{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15631echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015633 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015634else
15635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* confdefs.h. */
15637_ACEOF
15638cat confdefs.h >>conftest.$ac_ext
15639cat >>conftest.$ac_ext <<_ACEOF
15640/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015641/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15642 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15643#define $ac_func innocuous_$ac_func
15644
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015645/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015646 which can conflict with char $ac_func (); below.
15647 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015648 <limits.h> exists even on freestanding compilers. */
15649
15650#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015651# include <limits.h>
15652#else
15653# include <assert.h>
15654#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015655
15656#undef $ac_func
15657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658/* Override any GCC internal prototype to avoid an error.
15659 Use char because int might match the return type of a GCC
15660 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015661#ifdef __cplusplus
15662extern "C"
15663#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015664char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015665/* The GNU C library defines this for functions which it implements
15666 to always fail with ENOSYS. Some functions are actually named
15667 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015669choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015670#endif
15671
Skip Montanaro6dead952003-09-25 14:50:04 +000015672int
15673main ()
15674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015675return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015676 ;
15677 return 0;
15678}
15679_ACEOF
15680rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681if { (ac_try="$ac_link"
15682case "(($ac_try" in
15683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15684 *) ac_try_echo=$ac_try;;
15685esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015687 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015689 grep -v '^ *+' conftest.er1 >conftest.err
15690 rm -f conftest.er1
15691 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693 (exit $ac_status); } && {
15694 test -z "$ac_c_werror_flag" ||
15695 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015696 } && test -s conftest$ac_exeext &&
15697 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015698 eval "$as_ac_var=yes"
15699else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015701sed 's/^/| /' conftest.$ac_ext >&5
15702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705
15706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015708fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015709ac_res=`eval echo '${'$as_ac_var'}'`
15710 { echo "$as_me:$LINENO: result: $ac_res" >&5
15711echo "${ECHO_T}$ac_res" >&6; }
15712if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015713 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015714#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015715_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015716 case $ac_sys_system in
15717 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015718
Jason Tishlerfac083d2003-07-22 15:20:49 +000015719cat >>confdefs.h <<\_ACEOF
15720#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15721_ACEOF
15722
15723 ;;
15724 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015725fi
15726done
15727
15728fi
15729
15730
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015731# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015732
15733
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015734{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15735echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015737if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015739 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015740 { echo "$as_me:$LINENO: result: no" >&5
15741echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015742 ipv6=no
15743 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015744 *) { echo "$as_me:$LINENO: result: yes" >&5
15745echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015747#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015748_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015749
15750 ipv6=yes
15751 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015753else
Martin v. Löwis11437992002-04-12 09:54:03 +000015754
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015755 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015756 { echo "$as_me:$LINENO: result: no" >&5
15757echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015758 ipv6=no
15759
15760else
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015762/* confdefs.h. */
15763_ACEOF
15764cat confdefs.h >>conftest.$ac_ext
15765cat >>conftest.$ac_ext <<_ACEOF
15766/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015767 /* AF_INET6 available check */
15768#include <sys/types.h>
15769#include <sys/socket.h>
15770main()
15771{
15772 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15773 exit(1);
15774 else
15775 exit(0);
15776}
15777
Martin v. Löwis11437992002-04-12 09:54:03 +000015778_ACEOF
15779rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780if { (ac_try="$ac_link"
15781case "(($ac_try" in
15782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15783 *) ac_try_echo=$ac_try;;
15784esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790 { (case "(($ac_try" in
15791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15792 *) ac_try_echo=$ac_try;;
15793esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015799 { echo "$as_me:$LINENO: result: yes" >&5
15800echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015801 ipv6=yes
15802else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015803 echo "$as_me: program exited with status $ac_status" >&5
15804echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015805sed 's/^/| /' conftest.$ac_ext >&5
15806
Martin v. Löwis11437992002-04-12 09:54:03 +000015807( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015808{ echo "$as_me:$LINENO: result: no" >&5
15809echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015810 ipv6=no
15811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812rm -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 +000015813fi
15814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015815
15816
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015817if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015818 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15819echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015821/* confdefs.h. */
15822_ACEOF
15823cat confdefs.h >>conftest.$ac_ext
15824cat >>conftest.$ac_ext <<_ACEOF
15825/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015826#include <sys/types.h>
15827#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015828int
15829main ()
15830{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015831struct sockaddr_in6 x;
15832x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 ;
15834 return 0;
15835}
15836_ACEOF
15837rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838if { (ac_try="$ac_compile"
15839case "(($ac_try" in
15840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15841 *) ac_try_echo=$ac_try;;
15842esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015846 grep -v '^ *+' conftest.er1 >conftest.err
15847 rm -f conftest.er1
15848 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850 (exit $ac_status); } && {
15851 test -z "$ac_c_werror_flag" ||
15852 test ! -s conftest.err
15853 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015854 { echo "$as_me:$LINENO: result: yes" >&5
15855echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015856 ipv6=yes
15857else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015859sed 's/^/| /' conftest.$ac_ext >&5
15860
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015861 { echo "$as_me:$LINENO: result: no" >&5
15862echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015863 ipv6=no
15864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865
15866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015867fi
15868
15869if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015871#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015873
15874fi
15875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876fi
15877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878
15879ipv6type=unknown
15880ipv6lib=none
15881ipv6trylibc=no
15882
15883if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015884 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15885echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015886 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15887 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015888 case $i in
15889 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015891/* confdefs.h. */
15892_ACEOF
15893cat confdefs.h >>conftest.$ac_ext
15894cat >>conftest.$ac_ext <<_ACEOF
15895/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015896
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015897#include <netinet/in.h>
15898#ifdef IPV6_INRIA_VERSION
15899yes
15900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015903 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015904 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015905fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015906rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015907
15908 ;;
15909 kame)
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. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015917#include <netinet/in.h>
15918#ifdef __KAME__
15919yes
15920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015923 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015924 ipv6type=$i;
15925 ipv6lib=inet6
15926 ipv6libdir=/usr/local/v6/lib
15927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015928fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015929rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015930
15931 ;;
15932 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015934/* confdefs.h. */
15935_ACEOF
15936cat confdefs.h >>conftest.$ac_ext
15937cat >>conftest.$ac_ext <<_ACEOF
15938/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015940#include <features.h>
15941#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15942yes
15943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015944_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015946 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015947 ipv6type=$i;
15948 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015949fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015950rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015951
15952 ;;
15953 linux-inet6)
15954 if test -d /usr/inet6; then
15955 ipv6type=$i
15956 ipv6lib=inet6
15957 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015958 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015959 fi
15960 ;;
15961 solaris)
15962 if test -f /etc/netconfig; then
15963 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15964 ipv6type=$i
15965 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966 fi
15967 fi
15968 ;;
15969 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015971/* confdefs.h. */
15972_ACEOF
15973cat confdefs.h >>conftest.$ac_ext
15974cat >>conftest.$ac_ext <<_ACEOF
15975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015977#include <sys/param.h>
15978#ifdef _TOSHIBA_INET6
15979yes
15980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015983 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015984 ipv6type=$i;
15985 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015986 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015987fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000015988rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015989
15990 ;;
15991 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015999#include </usr/local/v6/include/sys/v6config.h>
16000#ifdef __V6D__
16001yes
16002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016005 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016006 ipv6type=$i;
16007 ipv6lib=v6;
16008 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016009 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016010fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000016011rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016012
16013 ;;
16014 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022#include <sys/param.h>
16023#ifdef _ZETA_MINAMI_INET6
16024yes
16025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016026_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016028 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016029 ipv6type=$i;
16030 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016031 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016032fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000016033rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016034
16035 ;;
16036 esac
16037 if test "$ipv6type" != "unknown"; then
16038 break
16039 fi
16040 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016041 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16042echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016043fi
16044
16045if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16046 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16047 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16048 echo "using lib$ipv6lib"
16049 else
16050 if test $ipv6trylibc = "yes"; then
16051 echo "using libc"
16052 else
16053 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16054 echo "You need to fetch lib$ipv6lib.a from appropriate"
16055 echo 'ipv6 kit and compile beforehand.'
16056 exit 1
16057 fi
16058 fi
16059fi
16060
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016061{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16062echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016063cat >conftest.$ac_ext <<_ACEOF
16064/* confdefs.h. */
16065_ACEOF
16066cat confdefs.h >>conftest.$ac_ext
16067cat >>conftest.$ac_ext <<_ACEOF
16068/* end confdefs.h. */
16069#include <Carbon/Carbon.h>
16070int
16071main ()
16072{
16073FSIORefNum fRef = 0
16074 ;
16075 return 0;
16076}
16077_ACEOF
16078rm -f conftest.$ac_objext
16079if { (ac_try="$ac_compile"
16080case "(($ac_try" in
16081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16082 *) ac_try_echo=$ac_try;;
16083esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016085 (eval "$ac_compile") 2>conftest.er1
16086 ac_status=$?
16087 grep -v '^ *+' conftest.er1 >conftest.err
16088 rm -f conftest.er1
16089 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016091 (exit $ac_status); } && {
16092 test -z "$ac_c_werror_flag" ||
16093 test ! -s conftest.err
16094 } && test -s conftest.$ac_objext; then
16095
16096cat >>confdefs.h <<\_ACEOF
16097#define HAVE_OSX105_SDK 1
16098_ACEOF
16099
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016100 { echo "$as_me:$LINENO: result: yes" >&5
16101echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016103 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016104sed 's/^/| /' conftest.$ac_ext >&5
16105
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016106 { echo "$as_me:$LINENO: result: no" >&5
16107echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016108
16109fi
16110
16111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16112
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016113# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016114{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16115echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016118if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 withval=$with_doc_strings;
16120fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016121
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016122
16123if test -z "$with_doc_strings"
16124then with_doc_strings="yes"
16125fi
16126if test "$with_doc_strings" != "no"
16127then
16128
16129cat >>confdefs.h <<\_ACEOF
16130#define WITH_DOC_STRINGS 1
16131_ACEOF
16132
16133fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016134{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16135echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016136
Neil Schemenauera35c6882001-02-27 04:45:05 +000016137# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016138{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16139echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016142if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016144if test "$withval" != no
16145then
16146
16147cat >>confdefs.h <<\_ACEOF
16148#define WITH_TSC 1
16149_ACEOF
16150
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016151 { echo "$as_me:$LINENO: result: yes" >&5
16152echo "${ECHO_T}yes" >&6; }
16153else { echo "$as_me:$LINENO: result: no" >&5
16154echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016155fi
16156else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016157 { echo "$as_me:$LINENO: result: no" >&5
16158echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159fi
16160
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016161
16162# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016163{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16164echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016167if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168 withval=$with_pymalloc;
16169fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016170
Neil Schemenauera35c6882001-02-27 04:45:05 +000016171
Neil Schemenauer16c22972002-03-22 15:34:49 +000016172if test -z "$with_pymalloc"
16173then with_pymalloc="yes"
16174fi
16175if test "$with_pymalloc" != "no"
16176then
Martin v. Löwis11437992002-04-12 09:54:03 +000016177
16178cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016179#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016180_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016181
16182fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016183{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16184echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016185
Barry Warsawef82cd72000-06-30 16:21:01 +000016186# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016187{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16188echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016191if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016193if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016194then
16195
16196cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016197#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016198_ACEOF
16199
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016200 { echo "$as_me:$LINENO: result: yes" >&5
16201echo "${ECHO_T}yes" >&6; }
16202else { echo "$as_me:$LINENO: result: no" >&5
16203echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016204fi
16205else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016206 { echo "$as_me:$LINENO: result: no" >&5
16207echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208fi
16209
Barry Warsawef82cd72000-06-30 16:21:01 +000016210
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016211# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016212
Guido van Rossum98935bf2001-09-05 19:13:16 +000016213DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016214
Guido van Rossume97ee181999-12-20 21:27:22 +000016215# the dlopen() function means we might want to use dynload_shlib.o. some
16216# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016217
Thomas Wouters3a584202000-08-05 23:28:51 +000016218for ac_func in dlopen
16219do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16221{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016224 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016225else
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016227/* confdefs.h. */
16228_ACEOF
16229cat confdefs.h >>conftest.$ac_ext
16230cat >>conftest.$ac_ext <<_ACEOF
16231/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016232/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16233 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16234#define $ac_func innocuous_$ac_func
16235
Guido van Rossume97ee181999-12-20 21:27:22 +000016236/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016237 which can conflict with char $ac_func (); below.
16238 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016239 <limits.h> exists even on freestanding compilers. */
16240
16241#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016242# include <limits.h>
16243#else
16244# include <assert.h>
16245#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016246
16247#undef $ac_func
16248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249/* Override any GCC internal prototype to avoid an error.
16250 Use char because int might match the return type of a GCC
16251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016252#ifdef __cplusplus
16253extern "C"
16254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016255char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016256/* The GNU C library defines this for functions which it implements
16257 to always fail with ENOSYS. Some functions are actually named
16258 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016260choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016261#endif
16262
Skip Montanaro6dead952003-09-25 14:50:04 +000016263int
16264main ()
16265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 ;
16268 return 0;
16269}
16270_ACEOF
16271rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272if { (ac_try="$ac_link"
16273case "(($ac_try" in
16274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16275 *) ac_try_echo=$ac_try;;
16276esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016280 grep -v '^ *+' conftest.er1 >conftest.err
16281 rm -f conftest.er1
16282 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284 (exit $ac_status); } && {
16285 test -z "$ac_c_werror_flag" ||
16286 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016287 } && test -s conftest$ac_exeext &&
16288 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016292sed 's/^/| /' conftest.$ac_ext >&5
16293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296
16297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016298 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016299fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016300ac_res=`eval echo '${'$as_ac_var'}'`
16301 { echo "$as_me:$LINENO: result: $ac_res" >&5
16302echo "${ECHO_T}$ac_res" >&6; }
16303if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016305#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016306_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016307
Guido van Rossume97ee181999-12-20 21:27:22 +000016308fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016309done
Guido van Rossume97ee181999-12-20 21:27:22 +000016310
Michael W. Hudson54241132001-12-07 15:38:26 +000016311
Guido van Rossume97ee181999-12-20 21:27:22 +000016312# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16313# loading of modules.
16314
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016315{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16316echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016317if test -z "$DYNLOADFILE"
16318then
16319 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016320 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16321 if test "$ac_cv_func_dlopen" = yes
16322 then DYNLOADFILE="dynload_shlib.o"
16323 else DYNLOADFILE="dynload_aix.o"
16324 fi
16325 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016326 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016327 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16328 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016329 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016330 *)
16331 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16332 # out any dynamic loading
16333 if test "$ac_cv_func_dlopen" = yes
16334 then DYNLOADFILE="dynload_shlib.o"
16335 else DYNLOADFILE="dynload_stub.o"
16336 fi
16337 ;;
16338 esac
16339fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016340{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16341echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016342if test "$DYNLOADFILE" != "dynload_stub.o"
16343then
Martin v. Löwis11437992002-04-12 09:54:03 +000016344
16345cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016346#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016347_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016348
16349fi
16350
Neil Schemenauer4e425612001-06-19 15:44:15 +000016351# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16352
Michael W. Hudson54241132001-12-07 15:38:26 +000016353
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016354{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16355echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016356if test -z "$MACHDEP_OBJS"
16357then
Jack Jansene578a632001-08-15 01:27:14 +000016358 MACHDEP_OBJS=$extra_machdep_objs
16359else
16360 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016361fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016362{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16363echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016364
Guido van Rossum627b2d71993-12-24 10:39:16 +000016365# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
Martin v. Löwisd6320502004-08-12 13:45:08 +000016437
Martin v. Löwisc3001752005-01-23 09:27:24 +000016438
16439
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016440
16441
Thomas Wouterscf297e42007-02-23 15:07:44 +000016442
16443
Gregory P. Smith25523d22007-09-03 16:44:55 +000016444
Christian Heimes4e30a842007-11-30 22:12:06 +000016445
Martin v. Löwis92fab752008-03-08 10:40:41 +000016446
Martin v. Löwis823725e2008-03-24 13:39:54 +000016447
16448
Benjamin Peterson965ce872009-04-05 21:24:58 +000016449
16450
16451
16452
Martin v. Löwis011e8422009-05-05 04:43:17 +000016453
Martin v. Löwis113a0852009-05-29 17:25:39 +000016454
Martin v. Löwis823725e2008-03-24 13:39:54 +000016455for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16456 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016457 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016458 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016459 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016460 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016461 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016462 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16463 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016464 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016465 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016466 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016467 truncate uname unsetenv utimes waitpid wait3 wait4 \
16468 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016469do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016475else
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016477/* confdefs.h. */
16478_ACEOF
16479cat confdefs.h >>conftest.$ac_ext
16480cat >>conftest.$ac_ext <<_ACEOF
16481/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16484#define $ac_func innocuous_$ac_func
16485
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016486/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016487 which can conflict with char $ac_func (); below.
16488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016489 <limits.h> exists even on freestanding compilers. */
16490
16491#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016492# include <limits.h>
16493#else
16494# include <assert.h>
16495#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016496
16497#undef $ac_func
16498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499/* Override any GCC internal prototype to avoid an error.
16500 Use char because int might match the return type of a GCC
16501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016502#ifdef __cplusplus
16503extern "C"
16504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016505char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016506/* The GNU C library defines this for functions which it implements
16507 to always fail with ENOSYS. Some functions are actually named
16508 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016510choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016511#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016512
Skip Montanaro6dead952003-09-25 14:50:04 +000016513int
16514main ()
16515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 ;
16518 return 0;
16519}
16520_ACEOF
16521rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522if { (ac_try="$ac_link"
16523case "(($ac_try" in
16524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16525 *) ac_try_echo=$ac_try;;
16526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016530 grep -v '^ *+' conftest.er1 >conftest.err
16531 rm -f conftest.er1
16532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 (exit $ac_status); } && {
16535 test -z "$ac_c_werror_flag" ||
16536 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016537 } && test -s conftest$ac_exeext &&
16538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016540else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016542sed 's/^/| /' conftest.$ac_ext >&5
16543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546
16547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016548 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016549fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016550ac_res=`eval echo '${'$as_ac_var'}'`
16551 { echo "$as_me:$LINENO: result: $ac_res" >&5
16552echo "${ECHO_T}$ac_res" >&6; }
16553if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016556_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016557
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016558fi
16559done
16560
Michael W. Hudson54241132001-12-07 15:38:26 +000016561
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016562# For some functions, having a definition is not sufficient, since
16563# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016564{ echo "$as_me:$LINENO: checking for chroot" >&5
16565echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016567/* confdefs.h. */
16568_ACEOF
16569cat confdefs.h >>conftest.$ac_ext
16570cat >>conftest.$ac_ext <<_ACEOF
16571/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016572#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016573int
16574main ()
16575{
16576void *x=chroot
16577 ;
16578 return 0;
16579}
16580_ACEOF
16581rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582if { (ac_try="$ac_compile"
16583case "(($ac_try" in
16584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16585 *) ac_try_echo=$ac_try;;
16586esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016590 grep -v '^ *+' conftest.er1 >conftest.err
16591 rm -f conftest.er1
16592 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594 (exit $ac_status); } && {
16595 test -z "$ac_c_werror_flag" ||
16596 test ! -s conftest.err
16597 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016598
16599cat >>confdefs.h <<\_ACEOF
16600#define HAVE_CHROOT 1
16601_ACEOF
16602
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016603 { echo "$as_me:$LINENO: result: yes" >&5
16604echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016605else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016607sed 's/^/| /' conftest.$ac_ext >&5
16608
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016609 { echo "$as_me:$LINENO: result: no" >&5
16610echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016611
16612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613
16614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016615{ echo "$as_me:$LINENO: checking for link" >&5
16616echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016618/* confdefs.h. */
16619_ACEOF
16620cat confdefs.h >>conftest.$ac_ext
16621cat >>conftest.$ac_ext <<_ACEOF
16622/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016623#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016624int
16625main ()
16626{
16627void *x=link
16628 ;
16629 return 0;
16630}
16631_ACEOF
16632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633if { (ac_try="$ac_compile"
16634case "(($ac_try" in
16635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16636 *) ac_try_echo=$ac_try;;
16637esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016641 grep -v '^ *+' conftest.er1 >conftest.err
16642 rm -f conftest.er1
16643 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645 (exit $ac_status); } && {
16646 test -z "$ac_c_werror_flag" ||
16647 test ! -s conftest.err
16648 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016649
16650cat >>confdefs.h <<\_ACEOF
16651#define HAVE_LINK 1
16652_ACEOF
16653
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016654 { echo "$as_me:$LINENO: result: yes" >&5
16655echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016656else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016658sed 's/^/| /' conftest.$ac_ext >&5
16659
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016660 { echo "$as_me:$LINENO: result: no" >&5
16661echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016662
16663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664
16665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016666{ echo "$as_me:$LINENO: checking for symlink" >&5
16667echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016669/* confdefs.h. */
16670_ACEOF
16671cat confdefs.h >>conftest.$ac_ext
16672cat >>conftest.$ac_ext <<_ACEOF
16673/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016674#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016675int
16676main ()
16677{
16678void *x=symlink
16679 ;
16680 return 0;
16681}
16682_ACEOF
16683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684if { (ac_try="$ac_compile"
16685case "(($ac_try" in
16686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16687 *) ac_try_echo=$ac_try;;
16688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016692 grep -v '^ *+' conftest.er1 >conftest.err
16693 rm -f conftest.er1
16694 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 (exit $ac_status); } && {
16697 test -z "$ac_c_werror_flag" ||
16698 test ! -s conftest.err
16699 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016700
16701cat >>confdefs.h <<\_ACEOF
16702#define HAVE_SYMLINK 1
16703_ACEOF
16704
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016705 { echo "$as_me:$LINENO: result: yes" >&5
16706echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016709sed 's/^/| /' conftest.$ac_ext >&5
16710
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016711 { echo "$as_me:$LINENO: result: no" >&5
16712echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016713
16714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715
16716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016717{ echo "$as_me:$LINENO: checking for fchdir" >&5
16718echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016720/* confdefs.h. */
16721_ACEOF
16722cat confdefs.h >>conftest.$ac_ext
16723cat >>conftest.$ac_ext <<_ACEOF
16724/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016725#include <unistd.h>
16726int
16727main ()
16728{
16729void *x=fchdir
16730 ;
16731 return 0;
16732}
16733_ACEOF
16734rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735if { (ac_try="$ac_compile"
16736case "(($ac_try" in
16737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16738 *) ac_try_echo=$ac_try;;
16739esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016743 grep -v '^ *+' conftest.er1 >conftest.err
16744 rm -f conftest.er1
16745 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 (exit $ac_status); } && {
16748 test -z "$ac_c_werror_flag" ||
16749 test ! -s conftest.err
16750 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016751
16752cat >>confdefs.h <<\_ACEOF
16753#define HAVE_FCHDIR 1
16754_ACEOF
16755
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016756 { echo "$as_me:$LINENO: result: yes" >&5
16757echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016758else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016760sed 's/^/| /' conftest.$ac_ext >&5
16761
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016762 { echo "$as_me:$LINENO: result: no" >&5
16763echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016764
16765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766
16767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016768{ echo "$as_me:$LINENO: checking for fsync" >&5
16769echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016771/* confdefs.h. */
16772_ACEOF
16773cat confdefs.h >>conftest.$ac_ext
16774cat >>conftest.$ac_ext <<_ACEOF
16775/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016776#include <unistd.h>
16777int
16778main ()
16779{
16780void *x=fsync
16781 ;
16782 return 0;
16783}
16784_ACEOF
16785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786if { (ac_try="$ac_compile"
16787case "(($ac_try" in
16788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16789 *) ac_try_echo=$ac_try;;
16790esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016794 grep -v '^ *+' conftest.er1 >conftest.err
16795 rm -f conftest.er1
16796 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798 (exit $ac_status); } && {
16799 test -z "$ac_c_werror_flag" ||
16800 test ! -s conftest.err
16801 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016802
16803cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016804#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016805_ACEOF
16806
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016807 { echo "$as_me:$LINENO: result: yes" >&5
16808echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016811sed 's/^/| /' conftest.$ac_ext >&5
16812
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016813 { echo "$as_me:$LINENO: result: no" >&5
16814echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016815
16816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817
16818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016819{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16820echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016822/* confdefs.h. */
16823_ACEOF
16824cat confdefs.h >>conftest.$ac_ext
16825cat >>conftest.$ac_ext <<_ACEOF
16826/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016827#include <unistd.h>
16828int
16829main ()
16830{
16831void *x=fdatasync
16832 ;
16833 return 0;
16834}
16835_ACEOF
16836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016837if { (ac_try="$ac_compile"
16838case "(($ac_try" in
16839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16840 *) ac_try_echo=$ac_try;;
16841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016845 grep -v '^ *+' conftest.er1 >conftest.err
16846 rm -f conftest.er1
16847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849 (exit $ac_status); } && {
16850 test -z "$ac_c_werror_flag" ||
16851 test ! -s conftest.err
16852 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016853
16854cat >>confdefs.h <<\_ACEOF
16855#define HAVE_FDATASYNC 1
16856_ACEOF
16857
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016858 { echo "$as_me:$LINENO: result: yes" >&5
16859echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016860else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016862sed 's/^/| /' conftest.$ac_ext >&5
16863
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016864 { echo "$as_me:$LINENO: result: no" >&5
16865echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016866
16867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868
16869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016870{ echo "$as_me:$LINENO: checking for epoll" >&5
16871echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016872cat >conftest.$ac_ext <<_ACEOF
16873/* confdefs.h. */
16874_ACEOF
16875cat confdefs.h >>conftest.$ac_ext
16876cat >>conftest.$ac_ext <<_ACEOF
16877/* end confdefs.h. */
16878#include <sys/epoll.h>
16879int
16880main ()
16881{
16882void *x=epoll_create
16883 ;
16884 return 0;
16885}
16886_ACEOF
16887rm -f conftest.$ac_objext
16888if { (ac_try="$ac_compile"
16889case "(($ac_try" in
16890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16891 *) ac_try_echo=$ac_try;;
16892esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016894 (eval "$ac_compile") 2>conftest.er1
16895 ac_status=$?
16896 grep -v '^ *+' conftest.er1 >conftest.err
16897 rm -f conftest.er1
16898 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016900 (exit $ac_status); } && {
16901 test -z "$ac_c_werror_flag" ||
16902 test ! -s conftest.err
16903 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016904
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016905cat >>confdefs.h <<\_ACEOF
16906#define HAVE_EPOLL 1
16907_ACEOF
16908
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016909 { echo "$as_me:$LINENO: result: yes" >&5
16910echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016911else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016912 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016913sed 's/^/| /' conftest.$ac_ext >&5
16914
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016915 { echo "$as_me:$LINENO: result: no" >&5
16916echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016917
16918fi
16919
16920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016921{ echo "$as_me:$LINENO: checking for kqueue" >&5
16922echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016923cat >conftest.$ac_ext <<_ACEOF
16924/* confdefs.h. */
16925_ACEOF
16926cat confdefs.h >>conftest.$ac_ext
16927cat >>conftest.$ac_ext <<_ACEOF
16928/* end confdefs.h. */
16929
16930#include <sys/types.h>
16931#include <sys/event.h>
16932
16933int
16934main ()
16935{
16936int x=kqueue()
16937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext
16942if { (ac_try="$ac_compile"
16943case "(($ac_try" in
16944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16945 *) ac_try_echo=$ac_try;;
16946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016948 (eval "$ac_compile") 2>conftest.er1
16949 ac_status=$?
16950 grep -v '^ *+' conftest.er1 >conftest.err
16951 rm -f conftest.er1
16952 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016954 (exit $ac_status); } && {
16955 test -z "$ac_c_werror_flag" ||
16956 test ! -s conftest.err
16957 } && test -s conftest.$ac_objext; then
16958
16959cat >>confdefs.h <<\_ACEOF
16960#define HAVE_KQUEUE 1
16961_ACEOF
16962
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016963 { echo "$as_me:$LINENO: result: yes" >&5
16964echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016965else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016966 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016967sed 's/^/| /' conftest.$ac_ext >&5
16968
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016969 { echo "$as_me:$LINENO: result: no" >&5
16970echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016971
16972fi
16973
16974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016975# On some systems (eg. FreeBSD 5), we would find a definition of the
16976# functions ctermid_r, setgroups in the library, but no prototype
16977# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16978# address to avoid compiler warnings and potential miscompilations
16979# because of the missing prototypes.
16980
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016981{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16982echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016984/* confdefs.h. */
16985_ACEOF
16986cat confdefs.h >>conftest.$ac_ext
16987cat >>conftest.$ac_ext <<_ACEOF
16988/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016989
16990#include "confdefs.h"
16991#include <stdio.h>
16992
Martin v. Löwisd5843682002-11-21 20:41:28 +000016993int
16994main ()
16995{
16996void* p = ctermid_r
16997 ;
16998 return 0;
16999}
17000_ACEOF
17001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002if { (ac_try="$ac_compile"
17003case "(($ac_try" in
17004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17005 *) ac_try_echo=$ac_try;;
17006esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017010 grep -v '^ *+' conftest.er1 >conftest.err
17011 rm -f conftest.er1
17012 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014 (exit $ac_status); } && {
17015 test -z "$ac_c_werror_flag" ||
17016 test ! -s conftest.err
17017 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017018
17019cat >>confdefs.h <<\_ACEOF
17020#define HAVE_CTERMID_R 1
17021_ACEOF
17022
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017023 { echo "$as_me:$LINENO: result: yes" >&5
17024echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017025else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017027sed 's/^/| /' conftest.$ac_ext >&5
17028
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017029 { echo "$as_me:$LINENO: result: no" >&5
17030echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017031
17032fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17035
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017036{ echo "$as_me:$LINENO: checking for flock" >&5
17037echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017039/* confdefs.h. */
17040_ACEOF
17041cat confdefs.h >>conftest.$ac_ext
17042cat >>conftest.$ac_ext <<_ACEOF
17043/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017044
17045#include "confdefs.h"
17046#include <sys/file.h>
17047
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017048int
17049main ()
17050{
17051void* p = flock
17052 ;
17053 return 0;
17054}
17055_ACEOF
17056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057if { (ac_try="$ac_compile"
17058case "(($ac_try" in
17059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17060 *) ac_try_echo=$ac_try;;
17061esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017065 grep -v '^ *+' conftest.er1 >conftest.err
17066 rm -f conftest.er1
17067 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069 (exit $ac_status); } && {
17070 test -z "$ac_c_werror_flag" ||
17071 test ! -s conftest.err
17072 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017073
17074cat >>confdefs.h <<\_ACEOF
17075#define HAVE_FLOCK 1
17076_ACEOF
17077
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017078 { echo "$as_me:$LINENO: result: yes" >&5
17079echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017080else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017082sed 's/^/| /' conftest.$ac_ext >&5
17083
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017084 { echo "$as_me:$LINENO: result: no" >&5
17085echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017086
17087fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17090
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017091{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17092echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017094/* confdefs.h. */
17095_ACEOF
17096cat confdefs.h >>conftest.$ac_ext
17097cat >>conftest.$ac_ext <<_ACEOF
17098/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017099
17100#include "confdefs.h"
17101#include <unistd.h>
17102
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017103int
17104main ()
17105{
17106void* p = getpagesize
17107 ;
17108 return 0;
17109}
17110_ACEOF
17111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017112if { (ac_try="$ac_compile"
17113case "(($ac_try" in
17114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17115 *) ac_try_echo=$ac_try;;
17116esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017120 grep -v '^ *+' conftest.er1 >conftest.err
17121 rm -f conftest.er1
17122 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124 (exit $ac_status); } && {
17125 test -z "$ac_c_werror_flag" ||
17126 test ! -s conftest.err
17127 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017128
17129cat >>confdefs.h <<\_ACEOF
17130#define HAVE_GETPAGESIZE 1
17131_ACEOF
17132
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017133 { echo "$as_me:$LINENO: result: yes" >&5
17134echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017135else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017137sed 's/^/| /' conftest.$ac_ext >&5
17138
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017139 { echo "$as_me:$LINENO: result: no" >&5
17140echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017141
17142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017143
17144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017145
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146for ac_prog in true
17147do
17148 # Extract the first word of "$ac_prog", so it can be a program name with args.
17149set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017150{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17151echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017152if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017153 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017154else
17155 if test -n "$TRUE"; then
17156 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17157else
17158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17159for as_dir in $PATH
17160do
17161 IFS=$as_save_IFS
17162 test -z "$as_dir" && as_dir=.
17163 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164 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 +000017165 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017166 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017167 break 2
17168 fi
17169done
17170done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017172
17173fi
17174fi
17175TRUE=$ac_cv_prog_TRUE
17176if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017177 { echo "$as_me:$LINENO: result: $TRUE" >&5
17178echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017179else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017180 { echo "$as_me:$LINENO: result: no" >&5
17181echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017182fi
17183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017185 test -n "$TRUE" && break
17186done
17187test -n "$TRUE" || TRUE="/bin/true"
17188
17189
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017190{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17191echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017192if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017193 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017194else
17195 ac_check_lib_save_LIBS=$LIBS
17196LIBS="-lc $LIBS"
17197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017198/* confdefs.h. */
17199_ACEOF
17200cat confdefs.h >>conftest.$ac_ext
17201cat >>conftest.$ac_ext <<_ACEOF
17202/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204/* Override any GCC internal prototype to avoid an error.
17205 Use char because int might match the return type of a GCC
17206 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017207#ifdef __cplusplus
17208extern "C"
17209#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017210char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017211int
17212main ()
17213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017214return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017215 ;
17216 return 0;
17217}
17218_ACEOF
17219rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220if { (ac_try="$ac_link"
17221case "(($ac_try" in
17222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17223 *) ac_try_echo=$ac_try;;
17224esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017228 grep -v '^ *+' conftest.er1 >conftest.err
17229 rm -f conftest.er1
17230 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 (exit $ac_status); } && {
17233 test -z "$ac_c_werror_flag" ||
17234 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017235 } && test -s conftest$ac_exeext &&
17236 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017237 ac_cv_lib_c_inet_aton=yes
17238else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017240sed 's/^/| /' conftest.$ac_ext >&5
17241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244
17245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017247LIBS=$ac_check_lib_save_LIBS
17248fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017249{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17250echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17251if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017252 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017253else
17254
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017255{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17256echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017257if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017258 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017259else
17260 ac_check_lib_save_LIBS=$LIBS
17261LIBS="-lresolv $LIBS"
17262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017263/* confdefs.h. */
17264_ACEOF
17265cat confdefs.h >>conftest.$ac_ext
17266cat >>conftest.$ac_ext <<_ACEOF
17267/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017269/* Override any GCC internal prototype to avoid an error.
17270 Use char because int might match the return type of a GCC
17271 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017272#ifdef __cplusplus
17273extern "C"
17274#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017275char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017276int
17277main ()
17278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017280 ;
17281 return 0;
17282}
17283_ACEOF
17284rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285if { (ac_try="$ac_link"
17286case "(($ac_try" in
17287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17288 *) ac_try_echo=$ac_try;;
17289esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017293 grep -v '^ *+' conftest.er1 >conftest.err
17294 rm -f conftest.er1
17295 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297 (exit $ac_status); } && {
17298 test -z "$ac_c_werror_flag" ||
17299 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017300 } && test -s conftest$ac_exeext &&
17301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017302 ac_cv_lib_resolv_inet_aton=yes
17303else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017305sed 's/^/| /' conftest.$ac_ext >&5
17306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309
17310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017312LIBS=$ac_check_lib_save_LIBS
17313fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017314{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17315echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17316if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017317 cat >>confdefs.h <<_ACEOF
17318#define HAVE_LIBRESOLV 1
17319_ACEOF
17320
17321 LIBS="-lresolv $LIBS"
17322
17323fi
17324
17325
17326fi
17327
17328
Christian Heimesd0764e22007-12-04 15:00:33 +000017329# On Tru64, chflags seems to be present, but calling it will
17330# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017331{ echo "$as_me:$LINENO: checking for chflags" >&5
17332echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017333if test "${ac_cv_have_chflags+set}" = set; then
17334 echo $ECHO_N "(cached) $ECHO_C" >&6
17335else
17336 if test "$cross_compiling" = yes; then
17337 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017338else
17339 cat >conftest.$ac_ext <<_ACEOF
17340/* confdefs.h. */
17341_ACEOF
17342cat confdefs.h >>conftest.$ac_ext
17343cat >>conftest.$ac_ext <<_ACEOF
17344/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017345[
Christian Heimesd0764e22007-12-04 15:00:33 +000017346#include <sys/stat.h>
17347#include <unistd.h>
17348int main(int argc, char*argv[])
17349{
17350 if(chflags(argv[0], 0) != 0)
17351 return 1;
17352 return 0;
17353}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017354]
Christian Heimesd0764e22007-12-04 15:00:33 +000017355_ACEOF
17356rm -f conftest$ac_exeext
17357if { (ac_try="$ac_link"
17358case "(($ac_try" in
17359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17360 *) ac_try_echo=$ac_try;;
17361esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017363 (eval "$ac_link") 2>&5
17364 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17367 { (case "(($ac_try" in
17368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17369 *) ac_try_echo=$ac_try;;
17370esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017372 (eval "$ac_try") 2>&5
17373 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017375 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017376 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017378 echo "$as_me: program exited with status $ac_status" >&5
17379echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017380sed 's/^/| /' conftest.$ac_ext >&5
17381
17382( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017383ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017384fi
17385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17386fi
17387
17388
17389
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017390fi
17391{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17392echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17393if test "$ac_cv_have_chflags" = cross ; then
17394 { echo "$as_me:$LINENO: checking for chflags" >&5
17395echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17396if test "${ac_cv_func_chflags+set}" = set; then
17397 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017398else
17399 cat >conftest.$ac_ext <<_ACEOF
17400/* confdefs.h. */
17401_ACEOF
17402cat confdefs.h >>conftest.$ac_ext
17403cat >>conftest.$ac_ext <<_ACEOF
17404/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017405/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17406 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17407#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017408
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017409/* System header to define __stub macros and hopefully few prototypes,
17410 which can conflict with char chflags (); below.
17411 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17412 <limits.h> exists even on freestanding compilers. */
17413
17414#ifdef __STDC__
17415# include <limits.h>
17416#else
17417# include <assert.h>
17418#endif
17419
17420#undef chflags
17421
17422/* Override any GCC internal prototype to avoid an error.
17423 Use char because int might match the return type of a GCC
17424 builtin and then its argument prototype would still apply. */
17425#ifdef __cplusplus
17426extern "C"
17427#endif
17428char chflags ();
17429/* The GNU C library defines this for functions which it implements
17430 to always fail with ENOSYS. Some functions are actually named
17431 something starting with __ and the normal name is an alias. */
17432#if defined __stub_chflags || defined __stub___chflags
17433choke me
17434#endif
17435
17436int
17437main ()
17438{
17439return chflags ();
17440 ;
17441 return 0;
17442}
17443_ACEOF
17444rm -f conftest.$ac_objext conftest$ac_exeext
17445if { (ac_try="$ac_link"
17446case "(($ac_try" in
17447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17448 *) ac_try_echo=$ac_try;;
17449esac
17450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17451 (eval "$ac_link") 2>conftest.er1
17452 ac_status=$?
17453 grep -v '^ *+' conftest.er1 >conftest.err
17454 rm -f conftest.er1
17455 cat conftest.err >&5
17456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17457 (exit $ac_status); } && {
17458 test -z "$ac_c_werror_flag" ||
17459 test ! -s conftest.err
17460 } && test -s conftest$ac_exeext &&
17461 $as_test_x conftest$ac_exeext; then
17462 ac_cv_func_chflags=yes
17463else
17464 echo "$as_me: failed program was:" >&5
17465sed 's/^/| /' conftest.$ac_ext >&5
17466
17467 ac_cv_func_chflags=no
17468fi
17469
17470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17471 conftest$ac_exeext conftest.$ac_ext
17472fi
17473{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17474echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17475if test $ac_cv_func_chflags = yes; then
17476 ac_cv_have_chflags="yes"
17477else
17478 ac_cv_have_chflags="no"
17479fi
17480
17481fi
17482if test "$ac_cv_have_chflags" = yes ; then
17483
17484cat >>confdefs.h <<\_ACEOF
17485#define HAVE_CHFLAGS 1
17486_ACEOF
17487
17488fi
17489
17490{ echo "$as_me:$LINENO: checking for lchflags" >&5
17491echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17492if test "${ac_cv_have_lchflags+set}" = set; then
17493 echo $ECHO_N "(cached) $ECHO_C" >&6
17494else
17495 if test "$cross_compiling" = yes; then
17496 ac_cv_have_lchflags=cross
17497else
17498 cat >conftest.$ac_ext <<_ACEOF
17499/* confdefs.h. */
17500_ACEOF
17501cat confdefs.h >>conftest.$ac_ext
17502cat >>conftest.$ac_ext <<_ACEOF
17503/* end confdefs.h. */
17504[
Christian Heimesd0764e22007-12-04 15:00:33 +000017505#include <sys/stat.h>
17506#include <unistd.h>
17507int main(int argc, char*argv[])
17508{
17509 if(lchflags(argv[0], 0) != 0)
17510 return 1;
17511 return 0;
17512}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017513]
Christian Heimesd0764e22007-12-04 15:00:33 +000017514_ACEOF
17515rm -f conftest$ac_exeext
17516if { (ac_try="$ac_link"
17517case "(($ac_try" in
17518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17519 *) ac_try_echo=$ac_try;;
17520esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017522 (eval "$ac_link") 2>&5
17523 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017525 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17526 { (case "(($ac_try" in
17527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17528 *) ac_try_echo=$ac_try;;
17529esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017531 (eval "$ac_try") 2>&5
17532 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017534 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017535 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017536else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017537 echo "$as_me: program exited with status $ac_status" >&5
17538echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017539sed 's/^/| /' conftest.$ac_ext >&5
17540
17541( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017542ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017543fi
17544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17545fi
17546
17547
17548
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017549fi
17550{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17551echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17552if test "$ac_cv_have_lchflags" = cross ; then
17553 { echo "$as_me:$LINENO: checking for lchflags" >&5
17554echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17555if test "${ac_cv_func_lchflags+set}" = set; then
17556 echo $ECHO_N "(cached) $ECHO_C" >&6
17557else
17558 cat >conftest.$ac_ext <<_ACEOF
17559/* confdefs.h. */
17560_ACEOF
17561cat confdefs.h >>conftest.$ac_ext
17562cat >>conftest.$ac_ext <<_ACEOF
17563/* end confdefs.h. */
17564/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17565 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17566#define lchflags innocuous_lchflags
17567
17568/* System header to define __stub macros and hopefully few prototypes,
17569 which can conflict with char lchflags (); below.
17570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17571 <limits.h> exists even on freestanding compilers. */
17572
17573#ifdef __STDC__
17574# include <limits.h>
17575#else
17576# include <assert.h>
17577#endif
17578
17579#undef lchflags
17580
17581/* Override any GCC internal prototype to avoid an error.
17582 Use char because int might match the return type of a GCC
17583 builtin and then its argument prototype would still apply. */
17584#ifdef __cplusplus
17585extern "C"
17586#endif
17587char lchflags ();
17588/* The GNU C library defines this for functions which it implements
17589 to always fail with ENOSYS. Some functions are actually named
17590 something starting with __ and the normal name is an alias. */
17591#if defined __stub_lchflags || defined __stub___lchflags
17592choke me
17593#endif
17594
17595int
17596main ()
17597{
17598return lchflags ();
17599 ;
17600 return 0;
17601}
17602_ACEOF
17603rm -f conftest.$ac_objext conftest$ac_exeext
17604if { (ac_try="$ac_link"
17605case "(($ac_try" in
17606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17607 *) ac_try_echo=$ac_try;;
17608esac
17609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17610 (eval "$ac_link") 2>conftest.er1
17611 ac_status=$?
17612 grep -v '^ *+' conftest.er1 >conftest.err
17613 rm -f conftest.er1
17614 cat conftest.err >&5
17615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17616 (exit $ac_status); } && {
17617 test -z "$ac_c_werror_flag" ||
17618 test ! -s conftest.err
17619 } && test -s conftest$ac_exeext &&
17620 $as_test_x conftest$ac_exeext; then
17621 ac_cv_func_lchflags=yes
17622else
17623 echo "$as_me: failed program was:" >&5
17624sed 's/^/| /' conftest.$ac_ext >&5
17625
17626 ac_cv_func_lchflags=no
17627fi
17628
17629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17630 conftest$ac_exeext conftest.$ac_ext
17631fi
17632{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17633echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17634if test $ac_cv_func_lchflags = yes; then
17635 ac_cv_have_lchflags="yes"
17636else
17637 ac_cv_have_lchflags="no"
17638fi
17639
17640fi
17641if test "$ac_cv_have_lchflags" = yes ; then
17642
17643cat >>confdefs.h <<\_ACEOF
17644#define HAVE_LCHFLAGS 1
17645_ACEOF
17646
17647fi
17648
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017649case $ac_sys_system/$ac_sys_release in
17650Darwin/*)
17651 _CUR_CFLAGS="${CFLAGS}"
17652 _CUR_LDFLAGS="${LDFLAGS}"
17653 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17654 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17655 ;;
17656esac
17657
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017658{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17659echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017660if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017661 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017662else
17663 ac_check_lib_save_LIBS=$LIBS
17664LIBS="-lz $LIBS"
17665cat >conftest.$ac_ext <<_ACEOF
17666/* confdefs.h. */
17667_ACEOF
17668cat confdefs.h >>conftest.$ac_ext
17669cat >>conftest.$ac_ext <<_ACEOF
17670/* end confdefs.h. */
17671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672/* Override any GCC internal prototype to avoid an error.
17673 Use char because int might match the return type of a GCC
17674 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017675#ifdef __cplusplus
17676extern "C"
17677#endif
17678char inflateCopy ();
17679int
17680main ()
17681{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017683 ;
17684 return 0;
17685}
17686_ACEOF
17687rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688if { (ac_try="$ac_link"
17689case "(($ac_try" in
17690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17691 *) ac_try_echo=$ac_try;;
17692esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017695 ac_status=$?
17696 grep -v '^ *+' conftest.er1 >conftest.err
17697 rm -f conftest.er1
17698 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700 (exit $ac_status); } && {
17701 test -z "$ac_c_werror_flag" ||
17702 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017703 } && test -s conftest$ac_exeext &&
17704 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017705 ac_cv_lib_z_inflateCopy=yes
17706else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017707 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017708sed 's/^/| /' conftest.$ac_ext >&5
17709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712
17713rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017714 conftest$ac_exeext conftest.$ac_ext
17715LIBS=$ac_check_lib_save_LIBS
17716fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017717{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17718echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17719if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017720
17721cat >>confdefs.h <<\_ACEOF
17722#define HAVE_ZLIB_COPY 1
17723_ACEOF
17724
17725fi
17726
17727
17728case $ac_sys_system/$ac_sys_release in
17729Darwin/*)
17730 CFLAGS="${_CUR_CFLAGS}"
17731 LDFLAGS="${_CUR_LDFLAGS}"
17732 ;;
17733esac
17734
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017735{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17736echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017738/* confdefs.h. */
17739_ACEOF
17740cat confdefs.h >>conftest.$ac_ext
17741cat >>conftest.$ac_ext <<_ACEOF
17742/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017743
17744#include "confdefs.h"
17745#include <netdb.h>
17746
Martin v. Löwise9416172003-05-03 10:12:45 +000017747int
17748main ()
17749{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017750void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017751 ;
17752 return 0;
17753}
17754_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017755rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756if { (ac_try="$ac_link"
17757case "(($ac_try" in
17758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17759 *) ac_try_echo=$ac_try;;
17760esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017764 grep -v '^ *+' conftest.er1 >conftest.err
17765 rm -f conftest.er1
17766 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 (exit $ac_status); } && {
17769 test -z "$ac_c_werror_flag" ||
17770 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017771 } && test -s conftest$ac_exeext &&
17772 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017773
17774cat >>confdefs.h <<\_ACEOF
17775#define HAVE_HSTRERROR 1
17776_ACEOF
17777
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017778 { echo "$as_me:$LINENO: result: yes" >&5
17779echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017780else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017782sed 's/^/| /' conftest.$ac_ext >&5
17783
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017784 { echo "$as_me:$LINENO: result: no" >&5
17785echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017786
17787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788
17789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017791
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017792{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17793echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017795/* confdefs.h. */
17796_ACEOF
17797cat confdefs.h >>conftest.$ac_ext
17798cat >>conftest.$ac_ext <<_ACEOF
17799/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017800
17801#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017802#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017803#include <sys/socket.h>
17804#include <netinet/in.h>
17805#include <arpa/inet.h>
17806
Martin v. Löwise9416172003-05-03 10:12:45 +000017807int
17808main ()
17809{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017810void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017811 ;
17812 return 0;
17813}
17814_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017815rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816if { (ac_try="$ac_link"
17817case "(($ac_try" in
17818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17819 *) ac_try_echo=$ac_try;;
17820esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 grep -v '^ *+' conftest.er1 >conftest.err
17825 rm -f conftest.er1
17826 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828 (exit $ac_status); } && {
17829 test -z "$ac_c_werror_flag" ||
17830 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017831 } && test -s conftest$ac_exeext &&
17832 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017833
17834cat >>confdefs.h <<\_ACEOF
17835#define HAVE_INET_ATON 1
17836_ACEOF
17837
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017838 { echo "$as_me:$LINENO: result: yes" >&5
17839echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017840else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017842sed 's/^/| /' conftest.$ac_ext >&5
17843
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017844 { echo "$as_me:$LINENO: result: no" >&5
17845echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017846
17847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848
17849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017851
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017852{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17853echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017854cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017855/* confdefs.h. */
17856_ACEOF
17857cat confdefs.h >>conftest.$ac_ext
17858cat >>conftest.$ac_ext <<_ACEOF
17859/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017860
17861#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017862#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017863#include <sys/socket.h>
17864#include <netinet/in.h>
17865#include <arpa/inet.h>
17866
Martin v. Löwise9416172003-05-03 10:12:45 +000017867int
17868main ()
17869{
17870void* p = inet_pton
17871 ;
17872 return 0;
17873}
17874_ACEOF
17875rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876if { (ac_try="$ac_compile"
17877case "(($ac_try" in
17878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17879 *) ac_try_echo=$ac_try;;
17880esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017884 grep -v '^ *+' conftest.er1 >conftest.err
17885 rm -f conftest.er1
17886 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888 (exit $ac_status); } && {
17889 test -z "$ac_c_werror_flag" ||
17890 test ! -s conftest.err
17891 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017892
17893cat >>confdefs.h <<\_ACEOF
17894#define HAVE_INET_PTON 1
17895_ACEOF
17896
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017897 { echo "$as_me:$LINENO: result: yes" >&5
17898echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017899else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017901sed 's/^/| /' conftest.$ac_ext >&5
17902
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017903 { echo "$as_me:$LINENO: result: no" >&5
17904echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017905
17906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907
17908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017909
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017910# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017911{ echo "$as_me:$LINENO: checking for setgroups" >&5
17912echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017914/* confdefs.h. */
17915_ACEOF
17916cat confdefs.h >>conftest.$ac_ext
17917cat >>conftest.$ac_ext <<_ACEOF
17918/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017919
17920#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017921#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017922#ifdef HAVE_GRP_H
17923#include <grp.h>
17924#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017925
Martin v. Löwisd5843682002-11-21 20:41:28 +000017926int
17927main ()
17928{
17929void* p = setgroups
17930 ;
17931 return 0;
17932}
17933_ACEOF
17934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935if { (ac_try="$ac_compile"
17936case "(($ac_try" in
17937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17938 *) ac_try_echo=$ac_try;;
17939esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017943 grep -v '^ *+' conftest.er1 >conftest.err
17944 rm -f conftest.er1
17945 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947 (exit $ac_status); } && {
17948 test -z "$ac_c_werror_flag" ||
17949 test ! -s conftest.err
17950 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017951
17952cat >>confdefs.h <<\_ACEOF
17953#define HAVE_SETGROUPS 1
17954_ACEOF
17955
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017956 { echo "$as_me:$LINENO: result: yes" >&5
17957echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017958else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017960sed 's/^/| /' conftest.$ac_ext >&5
17961
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017962 { echo "$as_me:$LINENO: result: no" >&5
17963echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017964
17965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966
17967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017968
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017969# check for openpty and forkpty
17970
Martin v. Löwis11437992002-04-12 09:54:03 +000017971
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017972for ac_func in openpty
17973do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17975{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017979else
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017981/* confdefs.h. */
17982_ACEOF
17983cat confdefs.h >>conftest.$ac_ext
17984cat >>conftest.$ac_ext <<_ACEOF
17985/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017986/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17987 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17988#define $ac_func innocuous_$ac_func
17989
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017990/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017991 which can conflict with char $ac_func (); below.
17992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017993 <limits.h> exists even on freestanding compilers. */
17994
17995#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017996# include <limits.h>
17997#else
17998# include <assert.h>
17999#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018000
18001#undef $ac_func
18002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003/* Override any GCC internal prototype to avoid an error.
18004 Use char because int might match the return type of a GCC
18005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018006#ifdef __cplusplus
18007extern "C"
18008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018009char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018010/* The GNU C library defines this for functions which it implements
18011 to always fail with ENOSYS. Some functions are actually named
18012 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018014choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018015#endif
18016
Skip Montanaro6dead952003-09-25 14:50:04 +000018017int
18018main ()
18019{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018021 ;
18022 return 0;
18023}
18024_ACEOF
18025rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026if { (ac_try="$ac_link"
18027case "(($ac_try" in
18028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18029 *) ac_try_echo=$ac_try;;
18030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018034 grep -v '^ *+' conftest.er1 >conftest.err
18035 rm -f conftest.er1
18036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038 (exit $ac_status); } && {
18039 test -z "$ac_c_werror_flag" ||
18040 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018041 } && test -s conftest$ac_exeext &&
18042 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018044else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018046sed 's/^/| /' conftest.$ac_ext >&5
18047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050
18051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018052 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018053fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018054ac_res=`eval echo '${'$as_ac_var'}'`
18055 { echo "$as_me:$LINENO: result: $ac_res" >&5
18056echo "${ECHO_T}$ac_res" >&6; }
18057if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018058 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018059#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018060_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018062else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018063 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18064echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018065if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018066 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018067else
Martin v. Löwis11437992002-04-12 09:54:03 +000018068 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018069LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018071/* confdefs.h. */
18072_ACEOF
18073cat confdefs.h >>conftest.$ac_ext
18074cat >>conftest.$ac_ext <<_ACEOF
18075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077/* Override any GCC internal prototype to avoid an error.
18078 Use char because int might match the return type of a GCC
18079 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018080#ifdef __cplusplus
18081extern "C"
18082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018083char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018084int
18085main ()
18086{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 ;
18089 return 0;
18090}
18091_ACEOF
18092rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093if { (ac_try="$ac_link"
18094case "(($ac_try" in
18095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18096 *) ac_try_echo=$ac_try;;
18097esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018101 grep -v '^ *+' conftest.er1 >conftest.err
18102 rm -f conftest.er1
18103 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105 (exit $ac_status); } && {
18106 test -z "$ac_c_werror_flag" ||
18107 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018108 } && test -s conftest$ac_exeext &&
18109 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018110 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018111else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018113sed 's/^/| /' conftest.$ac_ext >&5
18114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117
18118rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018119 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018120LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018121fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018122{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18123echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18124if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018125 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018126#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018127_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018128 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018129else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018130 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18131echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018132if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018133 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018134else
18135 ac_check_lib_save_LIBS=$LIBS
18136LIBS="-lbsd $LIBS"
18137cat >conftest.$ac_ext <<_ACEOF
18138/* confdefs.h. */
18139_ACEOF
18140cat confdefs.h >>conftest.$ac_ext
18141cat >>conftest.$ac_ext <<_ACEOF
18142/* end confdefs.h. */
18143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144/* Override any GCC internal prototype to avoid an error.
18145 Use char because int might match the return type of a GCC
18146 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018147#ifdef __cplusplus
18148extern "C"
18149#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018150char openpty ();
18151int
18152main ()
18153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018155 ;
18156 return 0;
18157}
18158_ACEOF
18159rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160if { (ac_try="$ac_link"
18161case "(($ac_try" in
18162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18163 *) ac_try_echo=$ac_try;;
18164esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018167 ac_status=$?
18168 grep -v '^ *+' conftest.er1 >conftest.err
18169 rm -f conftest.er1
18170 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018172 (exit $ac_status); } && {
18173 test -z "$ac_c_werror_flag" ||
18174 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018175 } && test -s conftest$ac_exeext &&
18176 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018177 ac_cv_lib_bsd_openpty=yes
18178else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018179 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018180sed 's/^/| /' conftest.$ac_ext >&5
18181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184
18185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018186 conftest$ac_exeext conftest.$ac_ext
18187LIBS=$ac_check_lib_save_LIBS
18188fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018189{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18190echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18191if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018192 cat >>confdefs.h <<\_ACEOF
18193#define HAVE_OPENPTY 1
18194_ACEOF
18195 LIBS="$LIBS -lbsd"
18196fi
18197
18198
18199fi
18200
Fred Drake8cef4cf2000-06-28 16:40:38 +000018201
18202fi
18203done
18204
Martin v. Löwis11437992002-04-12 09:54:03 +000018205
Fred Drake8cef4cf2000-06-28 16:40:38 +000018206for ac_func in forkpty
18207do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018208as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18209{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18210echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018212 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018213else
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018215/* confdefs.h. */
18216_ACEOF
18217cat confdefs.h >>conftest.$ac_ext
18218cat >>conftest.$ac_ext <<_ACEOF
18219/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018220/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18222#define $ac_func innocuous_$ac_func
18223
Fred Drake8cef4cf2000-06-28 16:40:38 +000018224/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018225 which can conflict with char $ac_func (); below.
18226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018227 <limits.h> exists even on freestanding compilers. */
18228
18229#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018230# include <limits.h>
18231#else
18232# include <assert.h>
18233#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018234
18235#undef $ac_func
18236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237/* Override any GCC internal prototype to avoid an error.
18238 Use char because int might match the return type of a GCC
18239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018240#ifdef __cplusplus
18241extern "C"
18242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018243char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018244/* The GNU C library defines this for functions which it implements
18245 to always fail with ENOSYS. Some functions are actually named
18246 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018247#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018248choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018249#endif
18250
Skip Montanaro6dead952003-09-25 14:50:04 +000018251int
18252main ()
18253{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018254return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 ;
18256 return 0;
18257}
18258_ACEOF
18259rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018260if { (ac_try="$ac_link"
18261case "(($ac_try" in
18262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18263 *) ac_try_echo=$ac_try;;
18264esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018268 grep -v '^ *+' conftest.er1 >conftest.err
18269 rm -f conftest.er1
18270 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018272 (exit $ac_status); } && {
18273 test -z "$ac_c_werror_flag" ||
18274 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018275 } && test -s conftest$ac_exeext &&
18276 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018277 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018278else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018280sed 's/^/| /' conftest.$ac_ext >&5
18281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018282 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018284
18285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018286 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018287fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018288ac_res=`eval echo '${'$as_ac_var'}'`
18289 { echo "$as_me:$LINENO: result: $ac_res" >&5
18290echo "${ECHO_T}$ac_res" >&6; }
18291if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018293#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018294_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018295
Fred Drake8cef4cf2000-06-28 16:40:38 +000018296else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018297 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18298echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018299if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018300 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018301else
Martin v. Löwis11437992002-04-12 09:54:03 +000018302 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018303LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018305/* confdefs.h. */
18306_ACEOF
18307cat confdefs.h >>conftest.$ac_ext
18308cat >>conftest.$ac_ext <<_ACEOF
18309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311/* Override any GCC internal prototype to avoid an error.
18312 Use char because int might match the return type of a GCC
18313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018314#ifdef __cplusplus
18315extern "C"
18316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018317char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018318int
18319main ()
18320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 ;
18323 return 0;
18324}
18325_ACEOF
18326rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327if { (ac_try="$ac_link"
18328case "(($ac_try" in
18329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18330 *) ac_try_echo=$ac_try;;
18331esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018335 grep -v '^ *+' conftest.er1 >conftest.err
18336 rm -f conftest.er1
18337 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339 (exit $ac_status); } && {
18340 test -z "$ac_c_werror_flag" ||
18341 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018342 } && test -s conftest$ac_exeext &&
18343 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018345else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018347sed 's/^/| /' conftest.$ac_ext >&5
18348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351
18352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018354LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018355fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018356{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18357echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18358if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018360#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018361_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018362 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018363else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018364 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18365echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018366if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018367 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018368else
18369 ac_check_lib_save_LIBS=$LIBS
18370LIBS="-lbsd $LIBS"
18371cat >conftest.$ac_ext <<_ACEOF
18372/* confdefs.h. */
18373_ACEOF
18374cat confdefs.h >>conftest.$ac_ext
18375cat >>conftest.$ac_ext <<_ACEOF
18376/* end confdefs.h. */
18377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378/* Override any GCC internal prototype to avoid an error.
18379 Use char because int might match the return type of a GCC
18380 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018381#ifdef __cplusplus
18382extern "C"
18383#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018384char forkpty ();
18385int
18386main ()
18387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018388return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018389 ;
18390 return 0;
18391}
18392_ACEOF
18393rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394if { (ac_try="$ac_link"
18395case "(($ac_try" in
18396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18397 *) ac_try_echo=$ac_try;;
18398esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018401 ac_status=$?
18402 grep -v '^ *+' conftest.er1 >conftest.err
18403 rm -f conftest.er1
18404 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 (exit $ac_status); } && {
18407 test -z "$ac_c_werror_flag" ||
18408 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018409 } && test -s conftest$ac_exeext &&
18410 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018411 ac_cv_lib_bsd_forkpty=yes
18412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018413 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018414sed 's/^/| /' conftest.$ac_ext >&5
18415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418
18419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018420 conftest$ac_exeext conftest.$ac_ext
18421LIBS=$ac_check_lib_save_LIBS
18422fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018423{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18424echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18425if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018426 cat >>confdefs.h <<\_ACEOF
18427#define HAVE_FORKPTY 1
18428_ACEOF
18429 LIBS="$LIBS -lbsd"
18430fi
18431
18432
18433fi
18434
Fred Drake8cef4cf2000-06-28 16:40:38 +000018435
18436fi
18437done
18438
Jack Jansendd19cf82001-12-06 22:36:17 +000018439
Christian Heimesb186d002008-03-18 15:15:01 +000018440# Stuff for expat.
18441
18442for ac_func in memmove
18443do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18445{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018448 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018449else
18450 cat >conftest.$ac_ext <<_ACEOF
18451/* confdefs.h. */
18452_ACEOF
18453cat confdefs.h >>conftest.$ac_ext
18454cat >>conftest.$ac_ext <<_ACEOF
18455/* end confdefs.h. */
18456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18458#define $ac_func innocuous_$ac_func
18459
18460/* System header to define __stub macros and hopefully few prototypes,
18461 which can conflict with char $ac_func (); below.
18462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18463 <limits.h> exists even on freestanding compilers. */
18464
18465#ifdef __STDC__
18466# include <limits.h>
18467#else
18468# include <assert.h>
18469#endif
18470
18471#undef $ac_func
18472
18473/* Override any GCC internal prototype to avoid an error.
18474 Use char because int might match the return type of a GCC
18475 builtin and then its argument prototype would still apply. */
18476#ifdef __cplusplus
18477extern "C"
18478#endif
18479char $ac_func ();
18480/* The GNU C library defines this for functions which it implements
18481 to always fail with ENOSYS. Some functions are actually named
18482 something starting with __ and the normal name is an alias. */
18483#if defined __stub_$ac_func || defined __stub___$ac_func
18484choke me
18485#endif
18486
18487int
18488main ()
18489{
18490return $ac_func ();
18491 ;
18492 return 0;
18493}
18494_ACEOF
18495rm -f conftest.$ac_objext conftest$ac_exeext
18496if { (ac_try="$ac_link"
18497case "(($ac_try" in
18498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18499 *) ac_try_echo=$ac_try;;
18500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018502 (eval "$ac_link") 2>conftest.er1
18503 ac_status=$?
18504 grep -v '^ *+' conftest.er1 >conftest.err
18505 rm -f conftest.er1
18506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018508 (exit $ac_status); } && {
18509 test -z "$ac_c_werror_flag" ||
18510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018511 } && test -s conftest$ac_exeext &&
18512 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018513 eval "$as_ac_var=yes"
18514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018515 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018516sed 's/^/| /' conftest.$ac_ext >&5
18517
18518 eval "$as_ac_var=no"
18519fi
18520
18521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18522 conftest$ac_exeext conftest.$ac_ext
18523fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018524ac_res=`eval echo '${'$as_ac_var'}'`
18525 { echo "$as_me:$LINENO: result: $ac_res" >&5
18526echo "${ECHO_T}$ac_res" >&6; }
18527if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018528 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018530_ACEOF
18531
18532fi
18533done
18534
18535
Michael W. Hudson54241132001-12-07 15:38:26 +000018536# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018537
18538
18539
18540
18541
18542
Fred Drake8cef4cf2000-06-28 16:40:38 +000018543for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18544do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018545as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18546{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18547echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018550else
Martin v. Löwis11437992002-04-12 09:54:03 +000018551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018552/* confdefs.h. */
18553_ACEOF
18554cat confdefs.h >>conftest.$ac_ext
18555cat >>conftest.$ac_ext <<_ACEOF
18556/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018557/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18558 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18559#define $ac_func innocuous_$ac_func
18560
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018561/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018562 which can conflict with char $ac_func (); below.
18563 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018564 <limits.h> exists even on freestanding compilers. */
18565
18566#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018567# include <limits.h>
18568#else
18569# include <assert.h>
18570#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018571
18572#undef $ac_func
18573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574/* Override any GCC internal prototype to avoid an error.
18575 Use char because int might match the return type of a GCC
18576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018577#ifdef __cplusplus
18578extern "C"
18579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018580char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018581/* The GNU C library defines this for functions which it implements
18582 to always fail with ENOSYS. Some functions are actually named
18583 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018585choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018586#endif
18587
Skip Montanaro6dead952003-09-25 14:50:04 +000018588int
18589main ()
18590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018591return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018592 ;
18593 return 0;
18594}
18595_ACEOF
18596rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597if { (ac_try="$ac_link"
18598case "(($ac_try" in
18599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18600 *) ac_try_echo=$ac_try;;
18601esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018605 grep -v '^ *+' conftest.er1 >conftest.err
18606 rm -f conftest.er1
18607 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609 (exit $ac_status); } && {
18610 test -z "$ac_c_werror_flag" ||
18611 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018612 } && test -s conftest$ac_exeext &&
18613 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018615else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018617sed 's/^/| /' conftest.$ac_ext >&5
18618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621
18622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018623 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018624fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018625ac_res=`eval echo '${'$as_ac_var'}'`
18626 { echo "$as_me:$LINENO: result: $ac_res" >&5
18627echo "${ECHO_T}$ac_res" >&6; }
18628if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018629 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018630#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018631_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018632
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018633fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018634done
18635
Michael W. Hudson54241132001-12-07 15:38:26 +000018636
Martin v. Löwis11437992002-04-12 09:54:03 +000018637
18638
18639
Christian Heimesb186d002008-03-18 15:15:01 +000018640for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018641do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018642as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18643{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18644echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018647else
Martin v. Löwis11437992002-04-12 09:54:03 +000018648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018649/* confdefs.h. */
18650_ACEOF
18651cat confdefs.h >>conftest.$ac_ext
18652cat >>conftest.$ac_ext <<_ACEOF
18653/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018654/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18655 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18656#define $ac_func innocuous_$ac_func
18657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018658/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018659 which can conflict with char $ac_func (); below.
18660 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018661 <limits.h> exists even on freestanding compilers. */
18662
18663#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018664# include <limits.h>
18665#else
18666# include <assert.h>
18667#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018668
18669#undef $ac_func
18670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671/* Override any GCC internal prototype to avoid an error.
18672 Use char because int might match the return type of a GCC
18673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018674#ifdef __cplusplus
18675extern "C"
18676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018677char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018678/* The GNU C library defines this for functions which it implements
18679 to always fail with ENOSYS. Some functions are actually named
18680 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018681#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018682choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018683#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018684
Skip Montanaro6dead952003-09-25 14:50:04 +000018685int
18686main ()
18687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 ;
18690 return 0;
18691}
18692_ACEOF
18693rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694if { (ac_try="$ac_link"
18695case "(($ac_try" in
18696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18697 *) ac_try_echo=$ac_try;;
18698esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702 grep -v '^ *+' conftest.er1 >conftest.err
18703 rm -f conftest.er1
18704 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018706 (exit $ac_status); } && {
18707 test -z "$ac_c_werror_flag" ||
18708 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018709 } && test -s conftest$ac_exeext &&
18710 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018712else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018714sed 's/^/| /' conftest.$ac_ext >&5
18715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018716 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018718
18719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018721fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018722ac_res=`eval echo '${'$as_ac_var'}'`
18723 { echo "$as_me:$LINENO: result: $ac_res" >&5
18724echo "${ECHO_T}$ac_res" >&6; }
18725if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018726 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018727#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018728_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018729
Martin v. Löwis1142de32002-03-29 16:28:31 +000018730else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018732 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18734 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018735esac
18736
Martin v. Löwis1142de32002-03-29 16:28:31 +000018737fi
18738done
18739
18740
Martin v. Löwis11437992002-04-12 09:54:03 +000018741
Martin v. Löwis1142de32002-03-29 16:28:31 +000018742for ac_func in getpgrp
18743do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018744as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18745{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018747if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018749else
Martin v. Löwis11437992002-04-12 09:54:03 +000018750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018751/* confdefs.h. */
18752_ACEOF
18753cat confdefs.h >>conftest.$ac_ext
18754cat >>conftest.$ac_ext <<_ACEOF
18755/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018756/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18758#define $ac_func innocuous_$ac_func
18759
Martin v. Löwis1142de32002-03-29 16:28:31 +000018760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018761 which can conflict with char $ac_func (); below.
18762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018763 <limits.h> exists even on freestanding compilers. */
18764
18765#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018766# include <limits.h>
18767#else
18768# include <assert.h>
18769#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018770
18771#undef $ac_func
18772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018773/* Override any GCC internal prototype to avoid an error.
18774 Use char because int might match the return type of a GCC
18775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018776#ifdef __cplusplus
18777extern "C"
18778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018779char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018780/* The GNU C library defines this for functions which it implements
18781 to always fail with ENOSYS. Some functions are actually named
18782 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018783#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018784choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018785#endif
18786
Skip Montanaro6dead952003-09-25 14:50:04 +000018787int
18788main ()
18789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 ;
18792 return 0;
18793}
18794_ACEOF
18795rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796if { (ac_try="$ac_link"
18797case "(($ac_try" in
18798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799 *) ac_try_echo=$ac_try;;
18800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018804 grep -v '^ *+' conftest.er1 >conftest.err
18805 rm -f conftest.er1
18806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018808 (exit $ac_status); } && {
18809 test -z "$ac_c_werror_flag" ||
18810 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018811 } && test -s conftest$ac_exeext &&
18812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018814else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018816sed 's/^/| /' conftest.$ac_ext >&5
18817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820
18821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018822 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018823fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018824ac_res=`eval echo '${'$as_ac_var'}'`
18825 { echo "$as_me:$LINENO: result: $ac_res" >&5
18826echo "${ECHO_T}$ac_res" >&6; }
18827if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018829#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018830_ACEOF
18831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018832/* confdefs.h. */
18833_ACEOF
18834cat confdefs.h >>conftest.$ac_ext
18835cat >>conftest.$ac_ext <<_ACEOF
18836/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018837#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018838int
18839main ()
18840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018841getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018842 ;
18843 return 0;
18844}
18845_ACEOF
18846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018847if { (ac_try="$ac_compile"
18848case "(($ac_try" in
18849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18850 *) ac_try_echo=$ac_try;;
18851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018855 grep -v '^ *+' conftest.er1 >conftest.err
18856 rm -f conftest.er1
18857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859 (exit $ac_status); } && {
18860 test -z "$ac_c_werror_flag" ||
18861 test ! -s conftest.err
18862 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018863
18864cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018865#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018866_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018867
Martin v. Löwis11437992002-04-12 09:54:03 +000018868
Guido van Rossumf78abae1997-01-21 22:02:36 +000018869else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018871sed 's/^/| /' conftest.$ac_ext >&5
18872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873
Guido van Rossum627b2d71993-12-24 10:39:16 +000018874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018875
18876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018877
Guido van Rossum627b2d71993-12-24 10:39:16 +000018878fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018879done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018880
Jack Jansen150753c2003-03-29 22:07:47 +000018881
18882for ac_func in setpgrp
18883do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018884as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18885{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18886echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018887if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018889else
Martin v. Löwis11437992002-04-12 09:54:03 +000018890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018891/* confdefs.h. */
18892_ACEOF
18893cat confdefs.h >>conftest.$ac_ext
18894cat >>conftest.$ac_ext <<_ACEOF
18895/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018896/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18897 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18898#define $ac_func innocuous_$ac_func
18899
Jack Jansen150753c2003-03-29 22:07:47 +000018900/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018901 which can conflict with char $ac_func (); below.
18902 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018903 <limits.h> exists even on freestanding compilers. */
18904
18905#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018906# include <limits.h>
18907#else
18908# include <assert.h>
18909#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018910
18911#undef $ac_func
18912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018913/* Override any GCC internal prototype to avoid an error.
18914 Use char because int might match the return type of a GCC
18915 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018916#ifdef __cplusplus
18917extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018918#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018919char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018920/* The GNU C library defines this for functions which it implements
18921 to always fail with ENOSYS. Some functions are actually named
18922 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018923#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018924choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018925#endif
18926
Skip Montanaro6dead952003-09-25 14:50:04 +000018927int
18928main ()
18929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 ;
18932 return 0;
18933}
18934_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018935rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936if { (ac_try="$ac_link"
18937case "(($ac_try" in
18938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18939 *) ac_try_echo=$ac_try;;
18940esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018942 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018944 grep -v '^ *+' conftest.er1 >conftest.err
18945 rm -f conftest.er1
18946 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018948 (exit $ac_status); } && {
18949 test -z "$ac_c_werror_flag" ||
18950 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018951 } && test -s conftest$ac_exeext &&
18952 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018953 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018954else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018956sed 's/^/| /' conftest.$ac_ext >&5
18957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018958 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960
18961rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018962 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018963fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018964ac_res=`eval echo '${'$as_ac_var'}'`
18965 { echo "$as_me:$LINENO: result: $ac_res" >&5
18966echo "${ECHO_T}$ac_res" >&6; }
18967if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018968 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018969#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018970_ACEOF
18971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018972/* confdefs.h. */
18973_ACEOF
18974cat confdefs.h >>conftest.$ac_ext
18975cat >>conftest.$ac_ext <<_ACEOF
18976/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018977#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018978int
18979main ()
18980{
18981setpgrp(0,0);
18982 ;
18983 return 0;
18984}
18985_ACEOF
18986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018987if { (ac_try="$ac_compile"
18988case "(($ac_try" in
18989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18990 *) ac_try_echo=$ac_try;;
18991esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018995 grep -v '^ *+' conftest.er1 >conftest.err
18996 rm -f conftest.er1
18997 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999 (exit $ac_status); } && {
19000 test -z "$ac_c_werror_flag" ||
19001 test ! -s conftest.err
19002 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019003
19004cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019005#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019006_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019007
Jack Jansen150753c2003-03-29 22:07:47 +000019008
19009else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019011sed 's/^/| /' conftest.$ac_ext >&5
19012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019013
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019015
19016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019017
19018fi
19019done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019020
Martin v. Löwis11437992002-04-12 09:54:03 +000019021
Thomas Wouters3a584202000-08-05 23:28:51 +000019022for ac_func in gettimeofday
19023do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019024as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19025{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019029else
Martin v. Löwis11437992002-04-12 09:54:03 +000019030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019031/* confdefs.h. */
19032_ACEOF
19033cat confdefs.h >>conftest.$ac_ext
19034cat >>conftest.$ac_ext <<_ACEOF
19035/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019036/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19037 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19038#define $ac_func innocuous_$ac_func
19039
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019040/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019041 which can conflict with char $ac_func (); below.
19042 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019043 <limits.h> exists even on freestanding compilers. */
19044
19045#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019046# include <limits.h>
19047#else
19048# include <assert.h>
19049#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019050
19051#undef $ac_func
19052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053/* Override any GCC internal prototype to avoid an error.
19054 Use char because int might match the return type of a GCC
19055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019056#ifdef __cplusplus
19057extern "C"
19058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019059char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019060/* The GNU C library defines this for functions which it implements
19061 to always fail with ENOSYS. Some functions are actually named
19062 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019063#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019064choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019065#endif
19066
Skip Montanaro6dead952003-09-25 14:50:04 +000019067int
19068main ()
19069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019070return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 ;
19072 return 0;
19073}
19074_ACEOF
19075rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019076if { (ac_try="$ac_link"
19077case "(($ac_try" in
19078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19079 *) ac_try_echo=$ac_try;;
19080esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019082 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019084 grep -v '^ *+' conftest.er1 >conftest.err
19085 rm -f conftest.er1
19086 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019088 (exit $ac_status); } && {
19089 test -z "$ac_c_werror_flag" ||
19090 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019091 } && test -s conftest$ac_exeext &&
19092 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019094else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019096sed 's/^/| /' conftest.$ac_ext >&5
19097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019100
19101rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019102 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019103fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019104ac_res=`eval echo '${'$as_ac_var'}'`
19105 { echo "$as_me:$LINENO: result: $ac_res" >&5
19106echo "${ECHO_T}$ac_res" >&6; }
19107if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019108 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019109#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019110_ACEOF
19111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019112/* confdefs.h. */
19113_ACEOF
19114cat confdefs.h >>conftest.$ac_ext
19115cat >>conftest.$ac_ext <<_ACEOF
19116/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019117#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019118int
19119main ()
19120{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019121gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 ;
19123 return 0;
19124}
19125_ACEOF
19126rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019127if { (ac_try="$ac_compile"
19128case "(($ac_try" in
19129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19130 *) ac_try_echo=$ac_try;;
19131esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019135 grep -v '^ *+' conftest.er1 >conftest.err
19136 rm -f conftest.er1
19137 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019139 (exit $ac_status); } && {
19140 test -z "$ac_c_werror_flag" ||
19141 test ! -s conftest.err
19142 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019143 :
19144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019146sed 's/^/| /' conftest.$ac_ext >&5
19147
Martin v. Löwis11437992002-04-12 09:54:03 +000019148
19149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019150#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019152
Martin v. Löwis11437992002-04-12 09:54:03 +000019153
Guido van Rossum627b2d71993-12-24 10:39:16 +000019154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019155
19156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019157
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019158fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019159done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019160
Michael W. Hudson54241132001-12-07 15:38:26 +000019161
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019162{ echo "$as_me:$LINENO: checking for major" >&5
19163echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019164cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019165/* confdefs.h. */
19166_ACEOF
19167cat confdefs.h >>conftest.$ac_ext
19168cat >>conftest.$ac_ext <<_ACEOF
19169/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019170
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019171#if defined(MAJOR_IN_MKDEV)
19172#include <sys/mkdev.h>
19173#elif defined(MAJOR_IN_SYSMACROS)
19174#include <sys/sysmacros.h>
19175#else
19176#include <sys/types.h>
19177#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019178
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019179int
19180main ()
19181{
19182
19183 makedev(major(0),minor(0));
19184
19185 ;
19186 return 0;
19187}
19188_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019189rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019190if { (ac_try="$ac_link"
19191case "(($ac_try" in
19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19193 *) ac_try_echo=$ac_try;;
19194esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019198 grep -v '^ *+' conftest.er1 >conftest.err
19199 rm -f conftest.er1
19200 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019202 (exit $ac_status); } && {
19203 test -z "$ac_c_werror_flag" ||
19204 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019205 } && test -s conftest$ac_exeext &&
19206 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019207
19208
19209cat >>confdefs.h <<\_ACEOF
19210#define HAVE_DEVICE_MACROS 1
19211_ACEOF
19212
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019213 { echo "$as_me:$LINENO: result: yes" >&5
19214echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019215
19216else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019218sed 's/^/| /' conftest.$ac_ext >&5
19219
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019220
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019221 { echo "$as_me:$LINENO: result: no" >&5
19222echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019223
19224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019225
19226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019227 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019228
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019229# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019230# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019231{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19232echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019234/* confdefs.h. */
19235_ACEOF
19236cat confdefs.h >>conftest.$ac_ext
19237cat >>conftest.$ac_ext <<_ACEOF
19238/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019239
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019240#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019241#include <sys/socket.h>
19242#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019243#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019244
Martin v. Löwis11437992002-04-12 09:54:03 +000019245int
19246main ()
19247{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019248
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019249getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019250
Martin v. Löwis11437992002-04-12 09:54:03 +000019251 ;
19252 return 0;
19253}
19254_ACEOF
19255rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019256if { (ac_try="$ac_link"
19257case "(($ac_try" in
19258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19259 *) ac_try_echo=$ac_try;;
19260esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019262 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019264 grep -v '^ *+' conftest.er1 >conftest.err
19265 rm -f conftest.er1
19266 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019268 (exit $ac_status); } && {
19269 test -z "$ac_c_werror_flag" ||
19270 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019271 } && test -s conftest$ac_exeext &&
19272 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019273
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019274{ echo "$as_me:$LINENO: result: yes" >&5
19275echo "${ECHO_T}yes" >&6; }
19276{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19277echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019278if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019279 { echo "$as_me:$LINENO: result: buggy" >&5
19280echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019281buggygetaddrinfo=yes
19282else
Martin v. Löwis11437992002-04-12 09:54:03 +000019283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019284/* confdefs.h. */
19285_ACEOF
19286cat confdefs.h >>conftest.$ac_ext
19287cat >>conftest.$ac_ext <<_ACEOF
19288/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019289
19290#include <sys/types.h>
19291#include <netdb.h>
19292#include <string.h>
19293#include <sys/socket.h>
19294#include <netinet/in.h>
19295
19296main()
19297{
19298 int passive, gaierr, inet4 = 0, inet6 = 0;
19299 struct addrinfo hints, *ai, *aitop;
19300 char straddr[INET6_ADDRSTRLEN], strport[16];
19301
19302 for (passive = 0; passive <= 1; passive++) {
19303 memset(&hints, 0, sizeof(hints));
19304 hints.ai_family = AF_UNSPEC;
19305 hints.ai_flags = passive ? AI_PASSIVE : 0;
19306 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019307 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019308 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19309 (void)gai_strerror(gaierr);
19310 goto bad;
19311 }
19312 for (ai = aitop; ai; ai = ai->ai_next) {
19313 if (ai->ai_addr == NULL ||
19314 ai->ai_addrlen == 0 ||
19315 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19316 straddr, sizeof(straddr), strport, sizeof(strport),
19317 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19318 goto bad;
19319 }
19320 switch (ai->ai_family) {
19321 case AF_INET:
19322 if (strcmp(strport, "54321") != 0) {
19323 goto bad;
19324 }
19325 if (passive) {
19326 if (strcmp(straddr, "0.0.0.0") != 0) {
19327 goto bad;
19328 }
19329 } else {
19330 if (strcmp(straddr, "127.0.0.1") != 0) {
19331 goto bad;
19332 }
19333 }
19334 inet4++;
19335 break;
19336 case AF_INET6:
19337 if (strcmp(strport, "54321") != 0) {
19338 goto bad;
19339 }
19340 if (passive) {
19341 if (strcmp(straddr, "::") != 0) {
19342 goto bad;
19343 }
19344 } else {
19345 if (strcmp(straddr, "::1") != 0) {
19346 goto bad;
19347 }
19348 }
19349 inet6++;
19350 break;
19351 case AF_UNSPEC:
19352 goto bad;
19353 break;
19354 default:
19355 /* another family support? */
19356 break;
19357 }
19358 }
19359 }
19360
19361 if (!(inet4 == 0 || inet4 == 2))
19362 goto bad;
19363 if (!(inet6 == 0 || inet6 == 2))
19364 goto bad;
19365
19366 if (aitop)
19367 freeaddrinfo(aitop);
19368 exit(0);
19369
19370 bad:
19371 if (aitop)
19372 freeaddrinfo(aitop);
19373 exit(1);
19374}
19375
Martin v. Löwis11437992002-04-12 09:54:03 +000019376_ACEOF
19377rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019378if { (ac_try="$ac_link"
19379case "(($ac_try" in
19380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19381 *) ac_try_echo=$ac_try;;
19382esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019384 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019388 { (case "(($ac_try" in
19389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19390 *) ac_try_echo=$ac_try;;
19391esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019393 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019394 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019396 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019397 { echo "$as_me:$LINENO: result: good" >&5
19398echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019399buggygetaddrinfo=no
19400else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019401 echo "$as_me: program exited with status $ac_status" >&5
19402echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019403sed 's/^/| /' conftest.$ac_ext >&5
19404
Martin v. Löwis11437992002-04-12 09:54:03 +000019405( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019406{ echo "$as_me:$LINENO: result: buggy" >&5
19407echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019408buggygetaddrinfo=yes
19409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019410rm -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 +000019411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019412
19413
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019414else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019416sed 's/^/| /' conftest.$ac_ext >&5
19417
Martin v. Löwis11437992002-04-12 09:54:03 +000019418
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019419{ echo "$as_me:$LINENO: result: no" >&5
19420echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019421buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019422
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019424
19425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019427
19428if test "$buggygetaddrinfo" = "yes"; then
19429 if test "$ipv6" = "yes"; then
19430 echo 'Fatal: You must get working getaddrinfo() function.'
19431 echo ' or you can specify "--disable-ipv6"'.
19432 exit 1
19433 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019434else
Martin v. Löwis11437992002-04-12 09:54:03 +000019435
19436cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019437#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019438_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019439
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019441
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019442for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019443do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19445{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019449else
Martin v. Löwis11437992002-04-12 09:54:03 +000019450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019451/* confdefs.h. */
19452_ACEOF
19453cat confdefs.h >>conftest.$ac_ext
19454cat >>conftest.$ac_ext <<_ACEOF
19455/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19458#define $ac_func innocuous_$ac_func
19459
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019460/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019461 which can conflict with char $ac_func (); below.
19462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019463 <limits.h> exists even on freestanding compilers. */
19464
19465#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019466# include <limits.h>
19467#else
19468# include <assert.h>
19469#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019470
19471#undef $ac_func
19472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019473/* Override any GCC internal prototype to avoid an error.
19474 Use char because int might match the return type of a GCC
19475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019476#ifdef __cplusplus
19477extern "C"
19478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019479char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019480/* The GNU C library defines this for functions which it implements
19481 to always fail with ENOSYS. Some functions are actually named
19482 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019483#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019484choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019485#endif
19486
Skip Montanaro6dead952003-09-25 14:50:04 +000019487int
19488main ()
19489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019490return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 ;
19492 return 0;
19493}
19494_ACEOF
19495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019496if { (ac_try="$ac_link"
19497case "(($ac_try" in
19498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19499 *) ac_try_echo=$ac_try;;
19500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019502 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019504 grep -v '^ *+' conftest.er1 >conftest.err
19505 rm -f conftest.er1
19506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019508 (exit $ac_status); } && {
19509 test -z "$ac_c_werror_flag" ||
19510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019511 } && test -s conftest$ac_exeext &&
19512 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019513 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019516sed 's/^/| /' conftest.$ac_ext >&5
19517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019520
19521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019522 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019523fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019524ac_res=`eval echo '${'$as_ac_var'}'`
19525 { echo "$as_me:$LINENO: result: $ac_res" >&5
19526echo "${ECHO_T}$ac_res" >&6; }
19527if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019528 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019530_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019531
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019532fi
19533done
19534
Michael W. Hudson54241132001-12-07 15:38:26 +000019535
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019536# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019537{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19538echo $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 +000019539if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019541else
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019543/* confdefs.h. */
19544_ACEOF
19545cat confdefs.h >>conftest.$ac_ext
19546cat >>conftest.$ac_ext <<_ACEOF
19547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019548#include <sys/types.h>
19549#include <sys/time.h>
19550#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019551
Martin v. Löwis11437992002-04-12 09:54:03 +000019552int
19553main ()
19554{
19555if ((struct tm *) 0)
19556return 0;
19557 ;
19558 return 0;
19559}
19560_ACEOF
19561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019562if { (ac_try="$ac_compile"
19563case "(($ac_try" in
19564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19565 *) ac_try_echo=$ac_try;;
19566esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019570 grep -v '^ *+' conftest.er1 >conftest.err
19571 rm -f conftest.er1
19572 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019574 (exit $ac_status); } && {
19575 test -z "$ac_c_werror_flag" ||
19576 test ! -s conftest.err
19577 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019578 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019579else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019581sed 's/^/| /' conftest.$ac_ext >&5
19582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019583 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019585
19586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019587fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019588{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19589echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019590if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019591
19592cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019593#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019594_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019595
19596fi
19597
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019598{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19599echo $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 +000019600if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019601 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019602else
Martin v. Löwis11437992002-04-12 09:54:03 +000019603 cat >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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019609#include <sys/types.h>
19610#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019611
Martin v. Löwis11437992002-04-12 09:54:03 +000019612int
19613main ()
19614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615struct tm tm;
19616 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019617 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019618 ;
19619 return 0;
19620}
19621_ACEOF
19622rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019623if { (ac_try="$ac_compile"
19624case "(($ac_try" in
19625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19626 *) ac_try_echo=$ac_try;;
19627esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019631 grep -v '^ *+' conftest.er1 >conftest.err
19632 rm -f conftest.er1
19633 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019635 (exit $ac_status); } && {
19636 test -z "$ac_c_werror_flag" ||
19637 test ! -s conftest.err
19638 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019639 ac_cv_struct_tm=time.h
19640else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019642sed 's/^/| /' conftest.$ac_ext >&5
19643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019644 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019646
19647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019648fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019649{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19650echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019651if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019652
19653cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019654#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019655_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019656
19657fi
19658
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019659{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19660echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019661if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019663else
Martin v. Löwis11437992002-04-12 09:54:03 +000019664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019665/* confdefs.h. */
19666_ACEOF
19667cat confdefs.h >>conftest.$ac_ext
19668cat >>conftest.$ac_ext <<_ACEOF
19669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019670#include <sys/types.h>
19671#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019672
19673
Martin v. Löwis11437992002-04-12 09:54:03 +000019674int
19675main ()
19676{
19677static struct tm ac_aggr;
19678if (ac_aggr.tm_zone)
19679return 0;
19680 ;
19681 return 0;
19682}
19683_ACEOF
19684rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685if { (ac_try="$ac_compile"
19686case "(($ac_try" in
19687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19688 *) ac_try_echo=$ac_try;;
19689esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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öwis11437992002-04-12 09:54:03 +000019701 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019702else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019704sed 's/^/| /' conftest.$ac_ext >&5
19705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019707/* confdefs.h. */
19708_ACEOF
19709cat confdefs.h >>conftest.$ac_ext
19710cat >>conftest.$ac_ext <<_ACEOF
19711/* end confdefs.h. */
19712#include <sys/types.h>
19713#include <$ac_cv_struct_tm>
19714
19715
19716int
19717main ()
19718{
19719static struct tm ac_aggr;
19720if (sizeof ac_aggr.tm_zone)
19721return 0;
19722 ;
19723 return 0;
19724}
19725_ACEOF
19726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019727if { (ac_try="$ac_compile"
19728case "(($ac_try" in
19729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19730 *) ac_try_echo=$ac_try;;
19731esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019733 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019735 grep -v '^ *+' conftest.er1 >conftest.err
19736 rm -f conftest.er1
19737 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019739 (exit $ac_status); } && {
19740 test -z "$ac_c_werror_flag" ||
19741 test ! -s conftest.err
19742 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019743 ac_cv_member_struct_tm_tm_zone=yes
19744else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019746sed 's/^/| /' conftest.$ac_ext >&5
19747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019748 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019750
19751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019753
19754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019755fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019756{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19757echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19758if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019759
19760cat >>confdefs.h <<_ACEOF
19761#define HAVE_STRUCT_TM_TM_ZONE 1
19762_ACEOF
19763
19764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019765fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019766
Martin v. Löwis11437992002-04-12 09:54:03 +000019767if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19768
19769cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019770#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019771_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019772
19773else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019774 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19775echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019776if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019777 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019778else
19779 cat >conftest.$ac_ext <<_ACEOF
19780/* confdefs.h. */
19781_ACEOF
19782cat confdefs.h >>conftest.$ac_ext
19783cat >>conftest.$ac_ext <<_ACEOF
19784/* end confdefs.h. */
19785#include <time.h>
19786
19787int
19788main ()
19789{
19790#ifndef tzname
19791 (void) tzname;
19792#endif
19793
19794 ;
19795 return 0;
19796}
19797_ACEOF
19798rm -f conftest.$ac_objext
19799if { (ac_try="$ac_compile"
19800case "(($ac_try" in
19801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19802 *) ac_try_echo=$ac_try;;
19803esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019805 (eval "$ac_compile") 2>conftest.er1
19806 ac_status=$?
19807 grep -v '^ *+' conftest.er1 >conftest.err
19808 rm -f conftest.er1
19809 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019811 (exit $ac_status); } && {
19812 test -z "$ac_c_werror_flag" ||
19813 test ! -s conftest.err
19814 } && test -s conftest.$ac_objext; then
19815 ac_cv_have_decl_tzname=yes
19816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019817 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019818sed 's/^/| /' conftest.$ac_ext >&5
19819
19820 ac_cv_have_decl_tzname=no
19821fi
19822
19823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19824fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019825{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19826echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19827if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828
19829cat >>confdefs.h <<_ACEOF
19830#define HAVE_DECL_TZNAME 1
19831_ACEOF
19832
19833
19834else
19835 cat >>confdefs.h <<_ACEOF
19836#define HAVE_DECL_TZNAME 0
19837_ACEOF
19838
19839
19840fi
19841
19842
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019843 { echo "$as_me:$LINENO: checking for tzname" >&5
19844echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019845if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847else
Martin v. Löwis11437992002-04-12 09:54:03 +000019848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019849/* confdefs.h. */
19850_ACEOF
19851cat confdefs.h >>conftest.$ac_ext
19852cat >>conftest.$ac_ext <<_ACEOF
19853/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019854#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019855#if !HAVE_DECL_TZNAME
19856extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019858
Martin v. Löwis11437992002-04-12 09:54:03 +000019859int
19860main ()
19861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019863 ;
19864 return 0;
19865}
19866_ACEOF
19867rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019868if { (ac_try="$ac_link"
19869case "(($ac_try" in
19870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19871 *) ac_try_echo=$ac_try;;
19872esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019874 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019876 grep -v '^ *+' conftest.er1 >conftest.err
19877 rm -f conftest.er1
19878 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880 (exit $ac_status); } && {
19881 test -z "$ac_c_werror_flag" ||
19882 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019883 } && test -s conftest$ac_exeext &&
19884 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019885 ac_cv_var_tzname=yes
19886else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019888sed 's/^/| /' conftest.$ac_ext >&5
19889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019890 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019892
19893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019894 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019895fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019896{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19897echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019898 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019899
19900cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019901#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019902_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019904 fi
19905fi
19906
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019907{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19908echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019909if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019910 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019911else
19912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019913/* confdefs.h. */
19914_ACEOF
19915cat confdefs.h >>conftest.$ac_ext
19916cat >>conftest.$ac_ext <<_ACEOF
19917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019918$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019919int
19920main ()
19921{
19922static struct stat ac_aggr;
19923if (ac_aggr.st_rdev)
19924return 0;
19925 ;
19926 return 0;
19927}
19928_ACEOF
19929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019930if { (ac_try="$ac_compile"
19931case "(($ac_try" in
19932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19933 *) ac_try_echo=$ac_try;;
19934esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938 grep -v '^ *+' conftest.er1 >conftest.err
19939 rm -f conftest.er1
19940 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019942 (exit $ac_status); } && {
19943 test -z "$ac_c_werror_flag" ||
19944 test ! -s conftest.err
19945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 ac_cv_member_struct_stat_st_rdev=yes
19947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019949sed 's/^/| /' conftest.$ac_ext >&5
19950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019952/* confdefs.h. */
19953_ACEOF
19954cat confdefs.h >>conftest.$ac_ext
19955cat >>conftest.$ac_ext <<_ACEOF
19956/* end confdefs.h. */
19957$ac_includes_default
19958int
19959main ()
19960{
19961static struct stat ac_aggr;
19962if (sizeof ac_aggr.st_rdev)
19963return 0;
19964 ;
19965 return 0;
19966}
19967_ACEOF
19968rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019969if { (ac_try="$ac_compile"
19970case "(($ac_try" in
19971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19972 *) ac_try_echo=$ac_try;;
19973esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019975 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019977 grep -v '^ *+' conftest.er1 >conftest.err
19978 rm -f conftest.er1
19979 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019981 (exit $ac_status); } && {
19982 test -z "$ac_c_werror_flag" ||
19983 test ! -s conftest.err
19984 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019985 ac_cv_member_struct_stat_st_rdev=yes
19986else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019988sed 's/^/| /' conftest.$ac_ext >&5
19989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019990 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019992
19993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019995
19996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019997fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019998{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19999echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20000if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020001
20002cat >>confdefs.h <<_ACEOF
20003#define HAVE_STRUCT_STAT_ST_RDEV 1
20004_ACEOF
20005
20006
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020007fi
20008
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020009{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20010echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020011if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020013else
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020015/* confdefs.h. */
20016_ACEOF
20017cat confdefs.h >>conftest.$ac_ext
20018cat >>conftest.$ac_ext <<_ACEOF
20019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020020$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020021int
20022main ()
20023{
20024static struct stat ac_aggr;
20025if (ac_aggr.st_blksize)
20026return 0;
20027 ;
20028 return 0;
20029}
20030_ACEOF
20031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020032if { (ac_try="$ac_compile"
20033case "(($ac_try" in
20034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20035 *) ac_try_echo=$ac_try;;
20036esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020040 grep -v '^ *+' conftest.er1 >conftest.err
20041 rm -f conftest.er1
20042 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020044 (exit $ac_status); } && {
20045 test -z "$ac_c_werror_flag" ||
20046 test ! -s conftest.err
20047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020048 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020049else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020051sed 's/^/| /' conftest.$ac_ext >&5
20052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020054/* confdefs.h. */
20055_ACEOF
20056cat confdefs.h >>conftest.$ac_ext
20057cat >>conftest.$ac_ext <<_ACEOF
20058/* end confdefs.h. */
20059$ac_includes_default
20060int
20061main ()
20062{
20063static struct stat ac_aggr;
20064if (sizeof ac_aggr.st_blksize)
20065return 0;
20066 ;
20067 return 0;
20068}
20069_ACEOF
20070rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020071if { (ac_try="$ac_compile"
20072case "(($ac_try" in
20073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20074 *) ac_try_echo=$ac_try;;
20075esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020077 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020079 grep -v '^ *+' conftest.er1 >conftest.err
20080 rm -f conftest.er1
20081 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020083 (exit $ac_status); } && {
20084 test -z "$ac_c_werror_flag" ||
20085 test ! -s conftest.err
20086 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020087 ac_cv_member_struct_stat_st_blksize=yes
20088else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020090sed 's/^/| /' conftest.$ac_ext >&5
20091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020092 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020094
20095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020097
20098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020099fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020100{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20101echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20102if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020103
Martin v. Löwis11437992002-04-12 09:54:03 +000020104cat >>confdefs.h <<_ACEOF
20105#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20106_ACEOF
20107
20108
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020109fi
20110
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020111{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20112echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020113if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020114 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020115else
20116 cat >conftest.$ac_ext <<_ACEOF
20117/* confdefs.h. */
20118_ACEOF
20119cat confdefs.h >>conftest.$ac_ext
20120cat >>conftest.$ac_ext <<_ACEOF
20121/* end confdefs.h. */
20122$ac_includes_default
20123int
20124main ()
20125{
20126static struct stat ac_aggr;
20127if (ac_aggr.st_flags)
20128return 0;
20129 ;
20130 return 0;
20131}
20132_ACEOF
20133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020134if { (ac_try="$ac_compile"
20135case "(($ac_try" in
20136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20137 *) ac_try_echo=$ac_try;;
20138esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020140 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020141 ac_status=$?
20142 grep -v '^ *+' conftest.er1 >conftest.err
20143 rm -f conftest.er1
20144 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146 (exit $ac_status); } && {
20147 test -z "$ac_c_werror_flag" ||
20148 test ! -s conftest.err
20149 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020150 ac_cv_member_struct_stat_st_flags=yes
20151else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020152 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020153sed 's/^/| /' conftest.$ac_ext >&5
20154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020155 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020156/* confdefs.h. */
20157_ACEOF
20158cat confdefs.h >>conftest.$ac_ext
20159cat >>conftest.$ac_ext <<_ACEOF
20160/* end confdefs.h. */
20161$ac_includes_default
20162int
20163main ()
20164{
20165static struct stat ac_aggr;
20166if (sizeof ac_aggr.st_flags)
20167return 0;
20168 ;
20169 return 0;
20170}
20171_ACEOF
20172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020173if { (ac_try="$ac_compile"
20174case "(($ac_try" in
20175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20176 *) ac_try_echo=$ac_try;;
20177esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020179 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020180 ac_status=$?
20181 grep -v '^ *+' conftest.er1 >conftest.err
20182 rm -f conftest.er1
20183 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020185 (exit $ac_status); } && {
20186 test -z "$ac_c_werror_flag" ||
20187 test ! -s conftest.err
20188 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020189 ac_cv_member_struct_stat_st_flags=yes
20190else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020191 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020192sed 's/^/| /' conftest.$ac_ext >&5
20193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020194 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020196
20197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199
20200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020201fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020202{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20203echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20204if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020205
20206cat >>confdefs.h <<_ACEOF
20207#define HAVE_STRUCT_STAT_ST_FLAGS 1
20208_ACEOF
20209
20210
20211fi
20212
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020213{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20214echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020215if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020216 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020217else
20218 cat >conftest.$ac_ext <<_ACEOF
20219/* confdefs.h. */
20220_ACEOF
20221cat confdefs.h >>conftest.$ac_ext
20222cat >>conftest.$ac_ext <<_ACEOF
20223/* end confdefs.h. */
20224$ac_includes_default
20225int
20226main ()
20227{
20228static struct stat ac_aggr;
20229if (ac_aggr.st_gen)
20230return 0;
20231 ;
20232 return 0;
20233}
20234_ACEOF
20235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236if { (ac_try="$ac_compile"
20237case "(($ac_try" in
20238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20239 *) ac_try_echo=$ac_try;;
20240esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020243 ac_status=$?
20244 grep -v '^ *+' conftest.er1 >conftest.err
20245 rm -f conftest.er1
20246 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020248 (exit $ac_status); } && {
20249 test -z "$ac_c_werror_flag" ||
20250 test ! -s conftest.err
20251 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020252 ac_cv_member_struct_stat_st_gen=yes
20253else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020254 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020255sed 's/^/| /' conftest.$ac_ext >&5
20256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020257 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020258/* confdefs.h. */
20259_ACEOF
20260cat confdefs.h >>conftest.$ac_ext
20261cat >>conftest.$ac_ext <<_ACEOF
20262/* end confdefs.h. */
20263$ac_includes_default
20264int
20265main ()
20266{
20267static struct stat ac_aggr;
20268if (sizeof ac_aggr.st_gen)
20269return 0;
20270 ;
20271 return 0;
20272}
20273_ACEOF
20274rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020275if { (ac_try="$ac_compile"
20276case "(($ac_try" in
20277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20278 *) ac_try_echo=$ac_try;;
20279esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020282 ac_status=$?
20283 grep -v '^ *+' conftest.er1 >conftest.err
20284 rm -f conftest.er1
20285 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020287 (exit $ac_status); } && {
20288 test -z "$ac_c_werror_flag" ||
20289 test ! -s conftest.err
20290 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020291 ac_cv_member_struct_stat_st_gen=yes
20292else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020293 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020294sed 's/^/| /' conftest.$ac_ext >&5
20295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020298
20299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301
20302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020303fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020304{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20305echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20306if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020307
20308cat >>confdefs.h <<_ACEOF
20309#define HAVE_STRUCT_STAT_ST_GEN 1
20310_ACEOF
20311
20312
20313fi
20314
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020315{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20316echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020317if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020318 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020319else
20320 cat >conftest.$ac_ext <<_ACEOF
20321/* confdefs.h. */
20322_ACEOF
20323cat confdefs.h >>conftest.$ac_ext
20324cat >>conftest.$ac_ext <<_ACEOF
20325/* end confdefs.h. */
20326$ac_includes_default
20327int
20328main ()
20329{
20330static struct stat ac_aggr;
20331if (ac_aggr.st_birthtime)
20332return 0;
20333 ;
20334 return 0;
20335}
20336_ACEOF
20337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020338if { (ac_try="$ac_compile"
20339case "(($ac_try" in
20340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20341 *) ac_try_echo=$ac_try;;
20342esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020345 ac_status=$?
20346 grep -v '^ *+' conftest.er1 >conftest.err
20347 rm -f conftest.er1
20348 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020350 (exit $ac_status); } && {
20351 test -z "$ac_c_werror_flag" ||
20352 test ! -s conftest.err
20353 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020354 ac_cv_member_struct_stat_st_birthtime=yes
20355else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020356 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020357sed 's/^/| /' conftest.$ac_ext >&5
20358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020359 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020360/* confdefs.h. */
20361_ACEOF
20362cat confdefs.h >>conftest.$ac_ext
20363cat >>conftest.$ac_ext <<_ACEOF
20364/* end confdefs.h. */
20365$ac_includes_default
20366int
20367main ()
20368{
20369static struct stat ac_aggr;
20370if (sizeof ac_aggr.st_birthtime)
20371return 0;
20372 ;
20373 return 0;
20374}
20375_ACEOF
20376rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020377if { (ac_try="$ac_compile"
20378case "(($ac_try" in
20379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20380 *) ac_try_echo=$ac_try;;
20381esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020384 ac_status=$?
20385 grep -v '^ *+' conftest.er1 >conftest.err
20386 rm -f conftest.er1
20387 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020389 (exit $ac_status); } && {
20390 test -z "$ac_c_werror_flag" ||
20391 test ! -s conftest.err
20392 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020393 ac_cv_member_struct_stat_st_birthtime=yes
20394else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020395 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020396sed 's/^/| /' conftest.$ac_ext >&5
20397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020398 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020400
20401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403
20404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020405fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020406{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20407echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20408if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020409
20410cat >>confdefs.h <<_ACEOF
20411#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20412_ACEOF
20413
20414
20415fi
20416
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020417{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20418echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020419if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020420 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020421else
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020423/* confdefs.h. */
20424_ACEOF
20425cat confdefs.h >>conftest.$ac_ext
20426cat >>conftest.$ac_ext <<_ACEOF
20427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020428$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020429int
20430main ()
20431{
20432static struct stat ac_aggr;
20433if (ac_aggr.st_blocks)
20434return 0;
20435 ;
20436 return 0;
20437}
20438_ACEOF
20439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440if { (ac_try="$ac_compile"
20441case "(($ac_try" in
20442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20443 *) ac_try_echo=$ac_try;;
20444esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020448 grep -v '^ *+' conftest.er1 >conftest.err
20449 rm -f conftest.er1
20450 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020452 (exit $ac_status); } && {
20453 test -z "$ac_c_werror_flag" ||
20454 test ! -s conftest.err
20455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020457else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020459sed 's/^/| /' conftest.$ac_ext >&5
20460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020462/* confdefs.h. */
20463_ACEOF
20464cat confdefs.h >>conftest.$ac_ext
20465cat >>conftest.$ac_ext <<_ACEOF
20466/* end confdefs.h. */
20467$ac_includes_default
20468int
20469main ()
20470{
20471static struct stat ac_aggr;
20472if (sizeof ac_aggr.st_blocks)
20473return 0;
20474 ;
20475 return 0;
20476}
20477_ACEOF
20478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479if { (ac_try="$ac_compile"
20480case "(($ac_try" in
20481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20482 *) ac_try_echo=$ac_try;;
20483esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020485 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020487 grep -v '^ *+' conftest.er1 >conftest.err
20488 rm -f conftest.er1
20489 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491 (exit $ac_status); } && {
20492 test -z "$ac_c_werror_flag" ||
20493 test ! -s conftest.err
20494 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020495 ac_cv_member_struct_stat_st_blocks=yes
20496else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020498sed 's/^/| /' conftest.$ac_ext >&5
20499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020500 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020502
20503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020505
20506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020507fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020508{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20509echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20510if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020511
Martin v. Löwis11437992002-04-12 09:54:03 +000020512cat >>confdefs.h <<_ACEOF
20513#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20514_ACEOF
20515
20516
20517cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020518#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020519_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020520
20521else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020522 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020523 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020524 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20525 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020526esac
20527
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020528fi
20529
Michael W. Hudson54241132001-12-07 15:38:26 +000020530
Martin v. Löwis11437992002-04-12 09:54:03 +000020531
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020532{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20533echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020534if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020536else
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020538/* confdefs.h. */
20539_ACEOF
20540cat confdefs.h >>conftest.$ac_ext
20541cat >>conftest.$ac_ext <<_ACEOF
20542/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020543#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020544int
20545main ()
20546{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020547return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 ;
20549 return 0;
20550}
20551_ACEOF
20552rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020553if { (ac_try="$ac_compile"
20554case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020565 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err
20568 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020569 ac_cv_header_time_altzone=yes
20570else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020572sed 's/^/| /' conftest.$ac_ext >&5
20573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020574 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020575fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20578fi
20579
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020580{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20581echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020582if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020583
20584cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020585#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020586_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020587
20588fi
20589
Guido van Rossumda88dad1995-01-26 00:46:29 +000020590was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020591{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20592echo $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 +000020593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020599
20600#include <sys/types.h>
20601#include <sys/select.h>
20602#include <sys/time.h>
20603
Martin v. Löwis11437992002-04-12 09:54:03 +000020604int
20605main ()
20606{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020607;
Martin v. Löwis11437992002-04-12 09:54:03 +000020608 ;
20609 return 0;
20610}
20611_ACEOF
20612rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020613if { (ac_try="$ac_compile"
20614case "(($ac_try" in
20615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20616 *) ac_try_echo=$ac_try;;
20617esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020621 grep -v '^ *+' conftest.er1 >conftest.err
20622 rm -f conftest.er1
20623 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625 (exit $ac_status); } && {
20626 test -z "$ac_c_werror_flag" ||
20627 test ! -s conftest.err
20628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020629
20630
20631cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020632#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020633_ACEOF
20634
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020635 was_it_defined=yes
20636
Guido van Rossumf78abae1997-01-21 22:02:36 +000020637else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020639sed 's/^/| /' conftest.$ac_ext >&5
20640
Thomas Wouters477c8d52006-05-27 19:21:47 +000020641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020642fi
20643
20644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020645{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20646echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020647
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020648{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20649echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020650if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020651 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020652else
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020654/* confdefs.h. */
20655_ACEOF
20656cat confdefs.h >>conftest.$ac_ext
20657cat >>conftest.$ac_ext <<_ACEOF
20658/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020659
20660# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020661int
20662main ()
20663{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 ;
20666 return 0;
20667}
20668_ACEOF
20669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020670if { (ac_try="$ac_compile"
20671case "(($ac_try" in
20672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20673 *) ac_try_echo=$ac_try;;
20674esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020678 grep -v '^ *+' conftest.er1 >conftest.err
20679 rm -f conftest.er1
20680 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682 (exit $ac_status); } && {
20683 test -z "$ac_c_werror_flag" ||
20684 test ! -s conftest.err
20685 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020686 ac_cv_struct_addrinfo=yes
20687else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020689sed 's/^/| /' conftest.$ac_ext >&5
20690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020691 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020692fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20695fi
20696
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020697{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20698echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020699if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020700
20701cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020702#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020703_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020704
20705fi
20706
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020707{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20708echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020709if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020710 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020711else
Martin v. Löwis11437992002-04-12 09:54:03 +000020712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020713/* confdefs.h. */
20714_ACEOF
20715cat confdefs.h >>conftest.$ac_ext
20716cat >>conftest.$ac_ext <<_ACEOF
20717/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020718
20719# include <sys/types.h>
20720# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020721int
20722main ()
20723{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020724struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020725 ;
20726 return 0;
20727}
20728_ACEOF
20729rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020730if { (ac_try="$ac_compile"
20731case "(($ac_try" in
20732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20733 *) ac_try_echo=$ac_try;;
20734esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020738 grep -v '^ *+' conftest.er1 >conftest.err
20739 rm -f conftest.er1
20740 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742 (exit $ac_status); } && {
20743 test -z "$ac_c_werror_flag" ||
20744 test ! -s conftest.err
20745 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020746 ac_cv_struct_sockaddr_storage=yes
20747else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020749sed 's/^/| /' conftest.$ac_ext >&5
20750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020752fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20755fi
20756
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020757{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20758echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020759if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020760
20761cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020763_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020764
20765fi
20766
Guido van Rossum627b2d71993-12-24 10:39:16 +000020767# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020768
Michael W. Hudson54241132001-12-07 15:38:26 +000020769
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020770{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20771echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020772if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020773 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020774else
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020776/* confdefs.h. */
20777_ACEOF
20778cat confdefs.h >>conftest.$ac_ext
20779cat >>conftest.$ac_ext <<_ACEOF
20780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020781$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020782int
20783main ()
20784{
20785static int test_array [1 - 2 * !(((char) -1) < 0)];
20786test_array [0] = 0
20787
20788 ;
20789 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020790}
Martin v. Löwis11437992002-04-12 09:54:03 +000020791_ACEOF
20792rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793if { (ac_try="$ac_compile"
20794case "(($ac_try" in
20795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20796 *) ac_try_echo=$ac_try;;
20797esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020801 grep -v '^ *+' conftest.er1 >conftest.err
20802 rm -f conftest.er1
20803 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805 (exit $ac_status); } && {
20806 test -z "$ac_c_werror_flag" ||
20807 test ! -s conftest.err
20808 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020809 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020810else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020812sed 's/^/| /' conftest.$ac_ext >&5
20813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020814 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020816
20817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020818fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020819{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20820echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020821if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020823#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020824_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825
20826fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020827
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020828{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20829echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020830if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020831 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020832else
20833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020834/* confdefs.h. */
20835_ACEOF
20836cat confdefs.h >>conftest.$ac_ext
20837cat >>conftest.$ac_ext <<_ACEOF
20838/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020839
Martin v. Löwis11437992002-04-12 09:54:03 +000020840int
20841main ()
20842{
20843/* FIXME: Include the comments suggested by Paul. */
20844#ifndef __cplusplus
20845 /* Ultrix mips cc rejects this. */
20846 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020847 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849 char const *const *pcpcc;
20850 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 /* NEC SVR4.0.2 mips cc rejects this. */
20852 struct point {int x, y;};
20853 static struct point const zero = {0,0};
20854 /* AIX XL C 1.02.0.0 rejects this.
20855 It does not let you subtract one const X* pointer from another in
20856 an arm of an if-expression whose if-part is not a constant
20857 expression */
20858 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020859 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020861 ++pcpcc;
20862 ppc = (char**) pcpcc;
20863 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020864 { /* SCO 3.2v4 cc rejects this. */
20865 char *t;
20866 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020867
Martin v. Löwis11437992002-04-12 09:54:03 +000020868 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020869 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020870 }
20871 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20872 int x[] = {25, 17};
20873 const int *foo = &x[0];
20874 ++foo;
20875 }
20876 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20877 typedef const int *iptr;
20878 iptr p = 0;
20879 ++p;
20880 }
20881 { /* AIX XL C 1.02.0.0 rejects this saying
20882 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20883 struct s { int j; const int *ap[3]; };
20884 struct s *b; b->j = 5;
20885 }
20886 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20887 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020888 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020889 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020890 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020891#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020892
Martin v. Löwis11437992002-04-12 09:54:03 +000020893 ;
20894 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020895}
Martin v. Löwis11437992002-04-12 09:54:03 +000020896_ACEOF
20897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898if { (ac_try="$ac_compile"
20899case "(($ac_try" in
20900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20901 *) ac_try_echo=$ac_try;;
20902esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020906 grep -v '^ *+' conftest.er1 >conftest.err
20907 rm -f conftest.er1
20908 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910 (exit $ac_status); } && {
20911 test -z "$ac_c_werror_flag" ||
20912 test ! -s conftest.err
20913 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020914 ac_cv_c_const=yes
20915else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020917sed 's/^/| /' conftest.$ac_ext >&5
20918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020921
20922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020923fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020924{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20925echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020926if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020927
20928cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020929#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020930_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020931
20932fi
20933
Michael W. Hudson54241132001-12-07 15:38:26 +000020934
Guido van Rossumda88dad1995-01-26 00:46:29 +000020935works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020936{ echo "$as_me:$LINENO: checking for working volatile" >&5
20937echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020939/* confdefs.h. */
20940_ACEOF
20941cat confdefs.h >>conftest.$ac_ext
20942cat >>conftest.$ac_ext <<_ACEOF
20943/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020944
Martin v. Löwis11437992002-04-12 09:54:03 +000020945int
20946main ()
20947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020948volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020949 ;
20950 return 0;
20951}
20952_ACEOF
20953rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020954if { (ac_try="$ac_compile"
20955case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020962 grep -v '^ *+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966 (exit $ac_status); } && {
20967 test -z "$ac_c_werror_flag" ||
20968 test ! -s conftest.err
20969 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020970 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020971else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020973sed 's/^/| /' conftest.$ac_ext >&5
20974
Martin v. Löwis11437992002-04-12 09:54:03 +000020975
20976cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020977#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020978_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020980
Guido van Rossum627b2d71993-12-24 10:39:16 +000020981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020982
20983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020984{ echo "$as_me:$LINENO: result: $works" >&5
20985echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020986
Guido van Rossumda88dad1995-01-26 00:46:29 +000020987works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020988{ echo "$as_me:$LINENO: checking for working signed char" >&5
20989echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020991/* confdefs.h. */
20992_ACEOF
20993cat confdefs.h >>conftest.$ac_ext
20994cat >>conftest.$ac_ext <<_ACEOF
20995/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020996
Martin v. Löwis11437992002-04-12 09:54:03 +000020997int
20998main ()
20999{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021000signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021001 ;
21002 return 0;
21003}
21004_ACEOF
21005rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021006if { (ac_try="$ac_compile"
21007case "(($ac_try" in
21008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21009 *) ac_try_echo=$ac_try;;
21010esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021014 grep -v '^ *+' conftest.er1 >conftest.err
21015 rm -f conftest.er1
21016 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021018 (exit $ac_status); } && {
21019 test -z "$ac_c_werror_flag" ||
21020 test ! -s conftest.err
21021 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021022 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021023else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021025sed 's/^/| /' conftest.$ac_ext >&5
21026
Martin v. Löwis11437992002-04-12 09:54:03 +000021027
21028cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021029#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021030_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021031
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021032
Guido van Rossum7f43da71994-08-01 12:15:30 +000021033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034
21035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021036{ echo "$as_me:$LINENO: result: $works" >&5
21037echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021038
Guido van Rossumda88dad1995-01-26 00:46:29 +000021039have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021040{ echo "$as_me:$LINENO: checking for prototypes" >&5
21041echo $ECHO_N "checking for prototypes... $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. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021048int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021049int
21050main ()
21051{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021052return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021053 ;
21054 return 0;
21055}
21056_ACEOF
21057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021058if { (ac_try="$ac_compile"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021066 grep -v '^ *+' conftest.er1 >conftest.err
21067 rm -f conftest.er1
21068 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021070 (exit $ac_status); } && {
21071 test -z "$ac_c_werror_flag" ||
21072 test ! -s conftest.err
21073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021074
21075
21076cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021077#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021078_ACEOF
21079
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021080 have_prototypes=yes
21081
Guido van Rossumf78abae1997-01-21 22:02:36 +000021082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021084sed 's/^/| /' conftest.$ac_ext >&5
21085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021086
Guido van Rossum7f43da71994-08-01 12:15:30 +000021087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021088
21089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021090{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21091echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021092
Guido van Rossumda88dad1995-01-26 00:46:29 +000021093works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021094{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21095echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021097/* confdefs.h. */
21098_ACEOF
21099cat confdefs.h >>conftest.$ac_ext
21100cat >>conftest.$ac_ext <<_ACEOF
21101/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021102
21103#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021104int foo(int x, ...) {
21105 va_list va;
21106 va_start(va, x);
21107 va_arg(va, int);
21108 va_arg(va, char *);
21109 va_arg(va, double);
21110 return 0;
21111}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021112
Martin v. Löwis11437992002-04-12 09:54:03 +000021113int
21114main ()
21115{
Guido van Rossum90eea071996-08-30 20:58:57 +000021116return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021117 ;
21118 return 0;
21119}
21120_ACEOF
21121rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021122if { (ac_try="$ac_compile"
21123case "(($ac_try" in
21124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21125 *) ac_try_echo=$ac_try;;
21126esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021130 grep -v '^ *+' conftest.er1 >conftest.err
21131 rm -f conftest.er1
21132 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021134 (exit $ac_status); } && {
21135 test -z "$ac_c_werror_flag" ||
21136 test ! -s conftest.err
21137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021138
21139
21140cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021141#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021142_ACEOF
21143
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021144 works=yes
21145
Guido van Rossumf78abae1997-01-21 22:02:36 +000021146else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021148sed 's/^/| /' conftest.$ac_ext >&5
21149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021150
Guido van Rossum627b2d71993-12-24 10:39:16 +000021151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021152
21153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021154{ echo "$as_me:$LINENO: result: $works" >&5
21155echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021156
Martin v. Löwisd6320502004-08-12 13:45:08 +000021157# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021158{ echo "$as_me:$LINENO: checking for socketpair" >&5
21159echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021160cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021161/* confdefs.h. */
21162_ACEOF
21163cat confdefs.h >>conftest.$ac_ext
21164cat >>conftest.$ac_ext <<_ACEOF
21165/* end confdefs.h. */
21166
21167#include <sys/types.h>
21168#include <sys/socket.h>
21169
21170int
21171main ()
21172{
21173void *x=socketpair
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021179if { (ac_try="$ac_compile"
21180case "(($ac_try" in
21181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21182 *) ac_try_echo=$ac_try;;
21183esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021187 grep -v '^ *+' conftest.er1 >conftest.err
21188 rm -f conftest.er1
21189 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021191 (exit $ac_status); } && {
21192 test -z "$ac_c_werror_flag" ||
21193 test ! -s conftest.err
21194 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021195
21196cat >>confdefs.h <<\_ACEOF
21197#define HAVE_SOCKETPAIR 1
21198_ACEOF
21199
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021200 { echo "$as_me:$LINENO: result: yes" >&5
21201echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021202else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021203 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021204sed 's/^/| /' conftest.$ac_ext >&5
21205
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021206 { echo "$as_me:$LINENO: result: no" >&5
21207echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021208
21209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021210
21211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021212
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021213# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021214{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21215echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021217/* confdefs.h. */
21218_ACEOF
21219cat confdefs.h >>conftest.$ac_ext
21220cat >>conftest.$ac_ext <<_ACEOF
21221/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021222#include <sys/types.h>
21223#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021224int
21225main ()
21226{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021227struct sockaddr x;
21228x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021229 ;
21230 return 0;
21231}
21232_ACEOF
21233rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021234if { (ac_try="$ac_compile"
21235case "(($ac_try" in
21236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21237 *) ac_try_echo=$ac_try;;
21238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021242 grep -v '^ *+' conftest.er1 >conftest.err
21243 rm -f conftest.er1
21244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021246 (exit $ac_status); } && {
21247 test -z "$ac_c_werror_flag" ||
21248 test ! -s conftest.err
21249 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021250 { echo "$as_me:$LINENO: result: yes" >&5
21251echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021252
21253cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021254#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021255_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021256
21257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021259sed 's/^/| /' conftest.$ac_ext >&5
21260
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021261 { echo "$as_me:$LINENO: result: no" >&5
21262echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021264
21265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266
Guido van Rossumda88dad1995-01-26 00:46:29 +000021267va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021268{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21269echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021271/* confdefs.h. */
21272_ACEOF
21273cat confdefs.h >>conftest.$ac_ext
21274cat >>conftest.$ac_ext <<_ACEOF
21275/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021276
21277#ifdef HAVE_STDARG_PROTOTYPES
21278#include <stdarg.h>
21279#else
21280#include <varargs.h>
21281#endif
21282
Martin v. Löwis11437992002-04-12 09:54:03 +000021283int
21284main ()
21285{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021286va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 ;
21288 return 0;
21289}
21290_ACEOF
21291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021292if { (ac_try="$ac_compile"
21293case "(($ac_try" in
21294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21295 *) ac_try_echo=$ac_try;;
21296esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021300 grep -v '^ *+' conftest.er1 >conftest.err
21301 rm -f conftest.er1
21302 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021304 (exit $ac_status); } && {
21305 test -z "$ac_c_werror_flag" ||
21306 test ! -s conftest.err
21307 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021308 :
21309else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021311sed 's/^/| /' conftest.$ac_ext >&5
21312
Martin v. Löwis11437992002-04-12 09:54:03 +000021313
21314
21315cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021316#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021317_ACEOF
21318
Guido van Rossumda88dad1995-01-26 00:46:29 +000021319 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021322
21323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021324{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21325echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021327# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021328
21329
21330
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021331{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21332echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021333if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021335else
Martin v. Löwis11437992002-04-12 09:54:03 +000021336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021337/* confdefs.h. */
21338_ACEOF
21339cat confdefs.h >>conftest.$ac_ext
21340cat >>conftest.$ac_ext <<_ACEOF
21341/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021342/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21343 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21344#define gethostbyname_r innocuous_gethostbyname_r
21345
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021346/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021347 which can conflict with char gethostbyname_r (); below.
21348 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021349 <limits.h> exists even on freestanding compilers. */
21350
21351#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021352# include <limits.h>
21353#else
21354# include <assert.h>
21355#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021356
21357#undef gethostbyname_r
21358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021359/* Override any GCC internal prototype to avoid an error.
21360 Use char because int might match the return type of a GCC
21361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021362#ifdef __cplusplus
21363extern "C"
21364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021365char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021366/* The GNU C library defines this for functions which it implements
21367 to always fail with ENOSYS. Some functions are actually named
21368 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021370choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021371#endif
21372
Skip Montanaro6dead952003-09-25 14:50:04 +000021373int
21374main ()
21375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021377 ;
21378 return 0;
21379}
21380_ACEOF
21381rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021382if { (ac_try="$ac_link"
21383case "(($ac_try" in
21384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21385 *) ac_try_echo=$ac_try;;
21386esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021388 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021390 grep -v '^ *+' conftest.er1 >conftest.err
21391 rm -f conftest.er1
21392 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394 (exit $ac_status); } && {
21395 test -z "$ac_c_werror_flag" ||
21396 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021397 } && test -s conftest$ac_exeext &&
21398 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021400else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021402sed 's/^/| /' conftest.$ac_ext >&5
21403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021404 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021406
21407rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021408 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021409fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021410{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21411echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21412if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021413
Martin v. Löwis11437992002-04-12 09:54:03 +000021414 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021415#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021416_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021417
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021418 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21419echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021420 OLD_CFLAGS=$CFLAGS
21421 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021423/* confdefs.h. */
21424_ACEOF
21425cat confdefs.h >>conftest.$ac_ext
21426cat >>conftest.$ac_ext <<_ACEOF
21427/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021428
21429# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021430
Martin v. Löwis11437992002-04-12 09:54:03 +000021431int
21432main ()
21433{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021434
21435 char *name;
21436 struct hostent *he, *res;
21437 char buffer[2048];
21438 int buflen = 2048;
21439 int h_errnop;
21440
21441 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021442
21443 ;
21444 return 0;
21445}
21446_ACEOF
21447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021448if { (ac_try="$ac_compile"
21449case "(($ac_try" in
21450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21451 *) ac_try_echo=$ac_try;;
21452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021456 grep -v '^ *+' conftest.er1 >conftest.err
21457 rm -f conftest.er1
21458 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460 (exit $ac_status); } && {
21461 test -z "$ac_c_werror_flag" ||
21462 test ! -s conftest.err
21463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021464
21465 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021466#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021467_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021468
Martin v. Löwis11437992002-04-12 09:54:03 +000021469
21470cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021471#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021472_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021473
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021474 { echo "$as_me:$LINENO: result: yes" >&5
21475echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021476
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021477else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021479sed 's/^/| /' conftest.$ac_ext >&5
21480
Martin v. Löwis11437992002-04-12 09:54:03 +000021481
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021482 { echo "$as_me:$LINENO: result: no" >&5
21483echo "${ECHO_T}no" >&6; }
21484 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21485echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021487/* confdefs.h. */
21488_ACEOF
21489cat confdefs.h >>conftest.$ac_ext
21490cat >>conftest.$ac_ext <<_ACEOF
21491/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021492
21493# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021494
Martin v. Löwis11437992002-04-12 09:54:03 +000021495int
21496main ()
21497{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021498
21499 char *name;
21500 struct hostent *he;
21501 char buffer[2048];
21502 int buflen = 2048;
21503 int h_errnop;
21504
21505 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021506
21507 ;
21508 return 0;
21509}
21510_ACEOF
21511rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021512if { (ac_try="$ac_compile"
21513case "(($ac_try" in
21514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21515 *) ac_try_echo=$ac_try;;
21516esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021520 grep -v '^ *+' conftest.er1 >conftest.err
21521 rm -f conftest.er1
21522 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021524 (exit $ac_status); } && {
21525 test -z "$ac_c_werror_flag" ||
21526 test ! -s conftest.err
21527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021528
21529 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021530#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021531_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021532
Martin v. Löwis11437992002-04-12 09:54:03 +000021533
21534cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021535#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021536_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021537
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021538 { echo "$as_me:$LINENO: result: yes" >&5
21539echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021541else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021543sed 's/^/| /' conftest.$ac_ext >&5
21544
Martin v. Löwis11437992002-04-12 09:54:03 +000021545
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021546 { echo "$as_me:$LINENO: result: no" >&5
21547echo "${ECHO_T}no" >&6; }
21548 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21549echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021551/* confdefs.h. */
21552_ACEOF
21553cat confdefs.h >>conftest.$ac_ext
21554cat >>conftest.$ac_ext <<_ACEOF
21555/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021556
21557# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021558
Martin v. Löwis11437992002-04-12 09:54:03 +000021559int
21560main ()
21561{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021562
21563 char *name;
21564 struct hostent *he;
21565 struct hostent_data data;
21566
21567 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021568
21569 ;
21570 return 0;
21571}
21572_ACEOF
21573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021574if { (ac_try="$ac_compile"
21575case "(($ac_try" in
21576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21577 *) ac_try_echo=$ac_try;;
21578esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021582 grep -v '^ *+' conftest.er1 >conftest.err
21583 rm -f conftest.er1
21584 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021586 (exit $ac_status); } && {
21587 test -z "$ac_c_werror_flag" ||
21588 test ! -s conftest.err
21589 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021590
21591 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021592#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021593_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021594
Martin v. Löwis11437992002-04-12 09:54:03 +000021595
21596cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021597#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021598_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021599
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021600 { echo "$as_me:$LINENO: result: yes" >&5
21601echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021602
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021603else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021605sed 's/^/| /' conftest.$ac_ext >&5
21606
Martin v. Löwis11437992002-04-12 09:54:03 +000021607
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021608 { echo "$as_me:$LINENO: result: no" >&5
21609echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612
21613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021616
21617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021620
21621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021622 CFLAGS=$OLD_CFLAGS
21623
21624else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021625
Martin v. Löwis11437992002-04-12 09:54:03 +000021626
21627for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021628do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021629as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21630{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21631echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021632if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021634else
Martin v. Löwis11437992002-04-12 09:54:03 +000021635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021636/* confdefs.h. */
21637_ACEOF
21638cat confdefs.h >>conftest.$ac_ext
21639cat >>conftest.$ac_ext <<_ACEOF
21640/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021641/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21642 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21643#define $ac_func innocuous_$ac_func
21644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021645/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021646 which can conflict with char $ac_func (); below.
21647 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021648 <limits.h> exists even on freestanding compilers. */
21649
21650#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021651# include <limits.h>
21652#else
21653# include <assert.h>
21654#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021655
21656#undef $ac_func
21657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021658/* Override any GCC internal prototype to avoid an error.
21659 Use char because int might match the return type of a GCC
21660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021661#ifdef __cplusplus
21662extern "C"
21663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021664char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021665/* The GNU C library defines this for functions which it implements
21666 to always fail with ENOSYS. Some functions are actually named
21667 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021668#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021669choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021670#endif
21671
Skip Montanaro6dead952003-09-25 14:50:04 +000021672int
21673main ()
21674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021676 ;
21677 return 0;
21678}
21679_ACEOF
21680rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021681if { (ac_try="$ac_link"
21682case "(($ac_try" in
21683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21684 *) ac_try_echo=$ac_try;;
21685esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021687 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021689 grep -v '^ *+' conftest.er1 >conftest.err
21690 rm -f conftest.er1
21691 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021693 (exit $ac_status); } && {
21694 test -z "$ac_c_werror_flag" ||
21695 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021696 } && test -s conftest$ac_exeext &&
21697 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021698 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021699else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021701sed 's/^/| /' conftest.$ac_ext >&5
21702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021703 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021705
21706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021707 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021708fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021709ac_res=`eval echo '${'$as_ac_var'}'`
21710 { echo "$as_me:$LINENO: result: $ac_res" >&5
21711echo "${ECHO_T}$ac_res" >&6; }
21712if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021713 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021714#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021715_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021716
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021717fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021718done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021719
Michael W. Hudson54241132001-12-07 15:38:26 +000021720
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021721fi
21722
Michael W. Hudson54241132001-12-07 15:38:26 +000021723
21724
21725
21726
21727
21728
Guido van Rossum627b2d71993-12-24 10:39:16 +000021729# checks for system services
21730# (none yet)
21731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021732# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021733{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21734echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021735if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021736 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021737else
Martin v. Löwis11437992002-04-12 09:54:03 +000021738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021739/* confdefs.h. */
21740_ACEOF
21741cat confdefs.h >>conftest.$ac_ext
21742cat >>conftest.$ac_ext <<_ACEOF
21743/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021744/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21745 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21746#define __fpu_control innocuous___fpu_control
21747
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021748/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021749 which can conflict with char __fpu_control (); below.
21750 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021751 <limits.h> exists even on freestanding compilers. */
21752
21753#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021754# include <limits.h>
21755#else
21756# include <assert.h>
21757#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021758
21759#undef __fpu_control
21760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021761/* Override any GCC internal prototype to avoid an error.
21762 Use char because int might match the return type of a GCC
21763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021764#ifdef __cplusplus
21765extern "C"
21766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021767char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021768/* The GNU C library defines this for functions which it implements
21769 to always fail with ENOSYS. Some functions are actually named
21770 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021772choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021773#endif
21774
Skip Montanaro6dead952003-09-25 14:50:04 +000021775int
21776main ()
21777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021778return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 ;
21780 return 0;
21781}
21782_ACEOF
21783rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021784if { (ac_try="$ac_link"
21785case "(($ac_try" in
21786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21787 *) ac_try_echo=$ac_try;;
21788esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021790 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021792 grep -v '^ *+' conftest.er1 >conftest.err
21793 rm -f conftest.er1
21794 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021796 (exit $ac_status); } && {
21797 test -z "$ac_c_werror_flag" ||
21798 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021799 } && test -s conftest$ac_exeext &&
21800 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021802else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021804sed 's/^/| /' conftest.$ac_ext >&5
21805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021806 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021808
21809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021810 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021811fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021812{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21813echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21814if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021815 :
21816else
Martin v. Löwis11437992002-04-12 09:54:03 +000021817
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021818{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21819echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021820if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021822else
Martin v. Löwis11437992002-04-12 09:54:03 +000021823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021824LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021826/* confdefs.h. */
21827_ACEOF
21828cat confdefs.h >>conftest.$ac_ext
21829cat >>conftest.$ac_ext <<_ACEOF
21830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021832/* Override any GCC internal prototype to avoid an error.
21833 Use char because int might match the return type of a GCC
21834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021835#ifdef __cplusplus
21836extern "C"
21837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021838char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021839int
21840main ()
21841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021842return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021843 ;
21844 return 0;
21845}
21846_ACEOF
21847rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021848if { (ac_try="$ac_link"
21849case "(($ac_try" in
21850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21851 *) ac_try_echo=$ac_try;;
21852esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021856 grep -v '^ *+' conftest.er1 >conftest.err
21857 rm -f conftest.er1
21858 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021860 (exit $ac_status); } && {
21861 test -z "$ac_c_werror_flag" ||
21862 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021863 } && test -s conftest$ac_exeext &&
21864 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021865 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021866else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021868sed 's/^/| /' conftest.$ac_ext >&5
21869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021870 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021872
21873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021875LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021876fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021877{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21878echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21879if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021880 cat >>confdefs.h <<_ACEOF
21881#define HAVE_LIBIEEE 1
21882_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021883
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021884 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021885
Guido van Rossum627b2d71993-12-24 10:39:16 +000021886fi
21887
Michael W. Hudson54241132001-12-07 15:38:26 +000021888
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021889fi
21890
Michael W. Hudson54241132001-12-07 15:38:26 +000021891
Guido van Rossum7f253911997-05-09 02:42:48 +000021892# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021893{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21894echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021896# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021897if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021898 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021899if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021900then
21901
21902cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021903#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021904_ACEOF
21905
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021906 { echo "$as_me:$LINENO: result: yes" >&5
21907echo "${ECHO_T}yes" >&6; }
21908else { echo "$as_me:$LINENO: result: no" >&5
21909echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021910fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021911else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021912 { echo "$as_me:$LINENO: result: no" >&5
21913echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021914fi
21915
Guido van Rossum7f253911997-05-09 02:42:48 +000021916
Guido van Rossum7f43da71994-08-01 12:15:30 +000021917# check for --with-libm=...
21918
Guido van Rossum563e7081996-09-10 18:20:48 +000021919case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021920Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021921*) LIBM=-lm
21922esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021923{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21924echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021926# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021927if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021928 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021929if test "$withval" = no
21930then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021931 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21932echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021933elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021934then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021935 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21936echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21937else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21938echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021939 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021940fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021941else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021942 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21943echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021944fi
21945
Guido van Rossum7f43da71994-08-01 12:15:30 +000021946
21947# check for --with-libc=...
21948
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021949{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21950echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021952# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021953if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021954 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021955if test "$withval" = no
21956then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021957 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21958echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021959elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021960then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021961 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21962echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21963else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21964echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021965 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021966fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021967else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021968 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21969echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021970fi
21971
Guido van Rossum7f43da71994-08-01 12:15:30 +000021972
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021973# **************************************************
21974# * Check for various properties of floating point *
21975# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021976
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021977{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21978echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021979if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021980 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021981else
21982
21983if test "$cross_compiling" = yes; then
21984 ac_cv_little_endian_double=no
21985else
21986 cat >conftest.$ac_ext <<_ACEOF
21987/* confdefs.h. */
21988_ACEOF
21989cat confdefs.h >>conftest.$ac_ext
21990cat >>conftest.$ac_ext <<_ACEOF
21991/* end confdefs.h. */
21992
21993#include <string.h>
21994int main() {
21995 double x = 9006104071832581.0;
21996 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
21997 return 0;
21998 else
21999 return 1;
22000}
22001
22002_ACEOF
22003rm -f conftest$ac_exeext
22004if { (ac_try="$ac_link"
22005case "(($ac_try" in
22006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22007 *) ac_try_echo=$ac_try;;
22008esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022010 (eval "$ac_link") 2>&5
22011 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22014 { (case "(($ac_try" in
22015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22016 *) ac_try_echo=$ac_try;;
22017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022019 (eval "$ac_try") 2>&5
22020 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022022 (exit $ac_status); }; }; then
22023 ac_cv_little_endian_double=yes
22024else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022025 echo "$as_me: program exited with status $ac_status" >&5
22026echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022027sed 's/^/| /' conftest.$ac_ext >&5
22028
22029( exit $ac_status )
22030ac_cv_little_endian_double=no
22031fi
22032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22033fi
22034
22035
22036fi
22037
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022038{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22039echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022040if test "$ac_cv_little_endian_double" = yes
22041then
22042
22043cat >>confdefs.h <<\_ACEOF
22044#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22045_ACEOF
22046
22047fi
22048
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022049{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22050echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022051if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022052 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022053else
22054
22055if test "$cross_compiling" = yes; then
22056 ac_cv_big_endian_double=no
22057else
22058 cat >conftest.$ac_ext <<_ACEOF
22059/* confdefs.h. */
22060_ACEOF
22061cat confdefs.h >>conftest.$ac_ext
22062cat >>conftest.$ac_ext <<_ACEOF
22063/* end confdefs.h. */
22064
22065#include <string.h>
22066int main() {
22067 double x = 9006104071832581.0;
22068 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22069 return 0;
22070 else
22071 return 1;
22072}
22073
22074_ACEOF
22075rm -f conftest$ac_exeext
22076if { (ac_try="$ac_link"
22077case "(($ac_try" in
22078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22079 *) ac_try_echo=$ac_try;;
22080esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022082 (eval "$ac_link") 2>&5
22083 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22086 { (case "(($ac_try" in
22087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22088 *) ac_try_echo=$ac_try;;
22089esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022091 (eval "$ac_try") 2>&5
22092 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022094 (exit $ac_status); }; }; then
22095 ac_cv_big_endian_double=yes
22096else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022097 echo "$as_me: program exited with status $ac_status" >&5
22098echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022099sed 's/^/| /' conftest.$ac_ext >&5
22100
22101( exit $ac_status )
22102ac_cv_big_endian_double=no
22103fi
22104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22105fi
22106
22107
22108fi
22109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022110{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22111echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022112if test "$ac_cv_big_endian_double" = yes
22113then
22114
22115cat >>confdefs.h <<\_ACEOF
22116#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22117_ACEOF
22118
22119fi
22120
22121# Some ARM platforms use a mixed-endian representation for doubles.
22122# While Python doesn't currently have full support for these platforms
22123# (see e.g., issue 1762561), we can at least make sure that float <-> string
22124# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022125{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22126echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022127if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022128 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022129else
22130
22131if test "$cross_compiling" = yes; then
22132 ac_cv_mixed_endian_double=no
22133else
22134 cat >conftest.$ac_ext <<_ACEOF
22135/* confdefs.h. */
22136_ACEOF
22137cat confdefs.h >>conftest.$ac_ext
22138cat >>conftest.$ac_ext <<_ACEOF
22139/* end confdefs.h. */
22140
22141#include <string.h>
22142int main() {
22143 double x = 9006104071832581.0;
22144 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22145 return 0;
22146 else
22147 return 1;
22148}
22149
22150_ACEOF
22151rm -f conftest$ac_exeext
22152if { (ac_try="$ac_link"
22153case "(($ac_try" in
22154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22155 *) ac_try_echo=$ac_try;;
22156esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022158 (eval "$ac_link") 2>&5
22159 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022161 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22162 { (case "(($ac_try" in
22163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22164 *) ac_try_echo=$ac_try;;
22165esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022167 (eval "$ac_try") 2>&5
22168 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022170 (exit $ac_status); }; }; then
22171 ac_cv_mixed_endian_double=yes
22172else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022173 echo "$as_me: program exited with status $ac_status" >&5
22174echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022175sed 's/^/| /' conftest.$ac_ext >&5
22176
22177( exit $ac_status )
22178ac_cv_mixed_endian_double=no
22179fi
22180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22181fi
22182
22183
22184fi
22185
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022186{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22187echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022188if test "$ac_cv_mixed_endian_double" = yes
22189then
22190
22191cat >>confdefs.h <<\_ACEOF
22192#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22193_ACEOF
22194
22195fi
22196
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022197# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022198# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022199# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022200# rounding; this is a problem on x86, where the x87 FPU has a default
22201# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22202# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022203if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22204then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022205 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022206 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022207 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22208echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022209 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022210/* confdefs.h. */
22211_ACEOF
22212cat confdefs.h >>conftest.$ac_ext
22213cat >>conftest.$ac_ext <<_ACEOF
22214/* end confdefs.h. */
22215
22216int
22217main ()
22218{
22219
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022220 unsigned short cw;
22221 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22222 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022223
22224 ;
22225 return 0;
22226}
22227_ACEOF
22228rm -f conftest.$ac_objext
22229if { (ac_try="$ac_compile"
22230case "(($ac_try" in
22231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22232 *) ac_try_echo=$ac_try;;
22233esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022235 (eval "$ac_compile") 2>conftest.er1
22236 ac_status=$?
22237 grep -v '^ *+' conftest.er1 >conftest.err
22238 rm -f conftest.er1
22239 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022241 (exit $ac_status); } && {
22242 test -z "$ac_c_werror_flag" ||
22243 test ! -s conftest.err
22244 } && test -s conftest.$ac_objext; then
22245 have_gcc_asm_for_x87=yes
22246else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022247 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022248sed 's/^/| /' conftest.$ac_ext >&5
22249
22250 have_gcc_asm_for_x87=no
22251fi
22252
22253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022254 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22255echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022256 if test "$have_gcc_asm_for_x87" = yes
22257 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022258
22259cat >>confdefs.h <<\_ACEOF
22260#define HAVE_GCC_ASM_FOR_X87 1
22261_ACEOF
22262
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022263 fi
22264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022265
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022266# Detect whether system arithmetic is subject to x87-style double
22267# rounding issues. The result of this test has little meaning on non
22268# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22269# mode is round-to-nearest and double rounding issues are present, and
22270# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022271{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22272echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022273# $BASECFLAGS may affect the result
22274ac_save_cc="$CC"
22275CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022276if test "$cross_compiling" = yes; then
22277 ac_cv_x87_double_rounding=no
22278else
22279 cat >conftest.$ac_ext <<_ACEOF
22280/* confdefs.h. */
22281_ACEOF
22282cat confdefs.h >>conftest.$ac_ext
22283cat >>conftest.$ac_ext <<_ACEOF
22284/* end confdefs.h. */
22285
22286#include <stdlib.h>
22287#include <math.h>
22288int main() {
22289 volatile double x, y, z;
22290 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22291 x = 0.99999999999999989; /* 1-2**-53 */
22292 y = 1./x;
22293 if (y != 1.)
22294 exit(0);
22295 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22296 x = 1e16;
22297 y = 2.99999;
22298 z = x + y;
22299 if (z != 1e16+4.)
22300 exit(0);
22301 /* both tests show evidence of double rounding */
22302 exit(1);
22303}
22304
22305_ACEOF
22306rm -f conftest$ac_exeext
22307if { (ac_try="$ac_link"
22308case "(($ac_try" in
22309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22310 *) ac_try_echo=$ac_try;;
22311esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022313 (eval "$ac_link") 2>&5
22314 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22317 { (case "(($ac_try" in
22318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22319 *) ac_try_echo=$ac_try;;
22320esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022322 (eval "$ac_try") 2>&5
22323 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022325 (exit $ac_status); }; }; then
22326 ac_cv_x87_double_rounding=no
22327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022328 echo "$as_me: program exited with status $ac_status" >&5
22329echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022330sed 's/^/| /' conftest.$ac_ext >&5
22331
22332( exit $ac_status )
22333ac_cv_x87_double_rounding=yes
22334fi
22335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22336fi
22337
22338
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022339CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022340{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22341echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022342if test "$ac_cv_x87_double_rounding" = yes
22343then
22344
22345cat >>confdefs.h <<\_ACEOF
22346#define X87_DOUBLE_ROUNDING 1
22347_ACEOF
22348
22349fi
22350
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022351# ************************************
22352# * Check for mathematical functions *
22353# ************************************
22354
22355LIBS_SAVE=$LIBS
22356LIBS="$LIBS $LIBM"
22357
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022358# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22359# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022360{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22361echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022362if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022363 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022364else
22365
22366if test "$cross_compiling" = yes; then
22367 ac_cv_tanh_preserves_zero_sign=no
22368else
22369 cat >conftest.$ac_ext <<_ACEOF
22370/* confdefs.h. */
22371_ACEOF
22372cat confdefs.h >>conftest.$ac_ext
22373cat >>conftest.$ac_ext <<_ACEOF
22374/* end confdefs.h. */
22375
22376#include <math.h>
22377#include <stdlib.h>
22378int main() {
22379 /* return 0 if either negative zeros don't exist
22380 on this platform or if negative zeros exist
22381 and tanh(-0.) == -0. */
22382 if (atan2(0., -1.) == atan2(-0., -1.) ||
22383 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22384 else exit(1);
22385}
22386
22387_ACEOF
22388rm -f conftest$ac_exeext
22389if { (ac_try="$ac_link"
22390case "(($ac_try" in
22391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22392 *) ac_try_echo=$ac_try;;
22393esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022395 (eval "$ac_link") 2>&5
22396 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22399 { (case "(($ac_try" in
22400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22401 *) ac_try_echo=$ac_try;;
22402esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022404 (eval "$ac_try") 2>&5
22405 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022407 (exit $ac_status); }; }; then
22408 ac_cv_tanh_preserves_zero_sign=yes
22409else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022410 echo "$as_me: program exited with status $ac_status" >&5
22411echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022412sed 's/^/| /' conftest.$ac_ext >&5
22413
22414( exit $ac_status )
22415ac_cv_tanh_preserves_zero_sign=no
22416fi
22417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22418fi
22419
22420
22421fi
22422
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022423{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22424echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022425if test "$ac_cv_tanh_preserves_zero_sign" = yes
22426then
22427
22428cat >>confdefs.h <<\_ACEOF
22429#define TANH_PRESERVES_ZERO_SIGN 1
22430_ACEOF
22431
22432fi
22433
22434
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022435
Michael W. Hudson54241132001-12-07 15:38:26 +000022436
Christian Heimes99170a52007-12-19 02:07:34 +000022437
22438
22439
22440
22441
Mark Dickinsonf2537862009-04-18 13:58:18 +000022442
22443for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022444do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022445as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22446{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22447echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022448if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022449 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022450else
22451 cat >conftest.$ac_ext <<_ACEOF
22452/* confdefs.h. */
22453_ACEOF
22454cat confdefs.h >>conftest.$ac_ext
22455cat >>conftest.$ac_ext <<_ACEOF
22456/* end confdefs.h. */
22457/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22458 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22459#define $ac_func innocuous_$ac_func
22460
22461/* System header to define __stub macros and hopefully few prototypes,
22462 which can conflict with char $ac_func (); below.
22463 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22464 <limits.h> exists even on freestanding compilers. */
22465
22466#ifdef __STDC__
22467# include <limits.h>
22468#else
22469# include <assert.h>
22470#endif
22471
22472#undef $ac_func
22473
22474/* Override any GCC internal prototype to avoid an error.
22475 Use char because int might match the return type of a GCC
22476 builtin and then its argument prototype would still apply. */
22477#ifdef __cplusplus
22478extern "C"
22479#endif
22480char $ac_func ();
22481/* The GNU C library defines this for functions which it implements
22482 to always fail with ENOSYS. Some functions are actually named
22483 something starting with __ and the normal name is an alias. */
22484#if defined __stub_$ac_func || defined __stub___$ac_func
22485choke me
22486#endif
22487
22488int
22489main ()
22490{
22491return $ac_func ();
22492 ;
22493 return 0;
22494}
22495_ACEOF
22496rm -f conftest.$ac_objext conftest$ac_exeext
22497if { (ac_try="$ac_link"
22498case "(($ac_try" in
22499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22500 *) ac_try_echo=$ac_try;;
22501esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022503 (eval "$ac_link") 2>conftest.er1
22504 ac_status=$?
22505 grep -v '^ *+' conftest.er1 >conftest.err
22506 rm -f conftest.er1
22507 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022509 (exit $ac_status); } && {
22510 test -z "$ac_c_werror_flag" ||
22511 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022512 } && test -s conftest$ac_exeext &&
22513 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022514 eval "$as_ac_var=yes"
22515else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022516 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022517sed 's/^/| /' conftest.$ac_ext >&5
22518
22519 eval "$as_ac_var=no"
22520fi
22521
22522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22523 conftest$ac_exeext conftest.$ac_ext
22524fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022525ac_res=`eval echo '${'$as_ac_var'}'`
22526 { echo "$as_me:$LINENO: result: $ac_res" >&5
22527echo "${ECHO_T}$ac_res" >&6; }
22528if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022529 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022530#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022531_ACEOF
22532
22533fi
22534done
22535
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022536{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22537echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022538if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022539 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022540else
22541 cat >conftest.$ac_ext <<_ACEOF
22542/* confdefs.h. */
22543_ACEOF
22544cat confdefs.h >>conftest.$ac_ext
22545cat >>conftest.$ac_ext <<_ACEOF
22546/* end confdefs.h. */
22547#include <math.h>
22548
22549int
22550main ()
22551{
22552#ifndef isinf
22553 (void) isinf;
22554#endif
22555
22556 ;
22557 return 0;
22558}
22559_ACEOF
22560rm -f conftest.$ac_objext
22561if { (ac_try="$ac_compile"
22562case "(($ac_try" in
22563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22564 *) ac_try_echo=$ac_try;;
22565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022567 (eval "$ac_compile") 2>conftest.er1
22568 ac_status=$?
22569 grep -v '^ *+' conftest.er1 >conftest.err
22570 rm -f conftest.er1
22571 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022573 (exit $ac_status); } && {
22574 test -z "$ac_c_werror_flag" ||
22575 test ! -s conftest.err
22576 } && test -s conftest.$ac_objext; then
22577 ac_cv_have_decl_isinf=yes
22578else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022579 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022580sed 's/^/| /' conftest.$ac_ext >&5
22581
22582 ac_cv_have_decl_isinf=no
22583fi
22584
22585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22586fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022587{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22588echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22589if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022590
22591cat >>confdefs.h <<_ACEOF
22592#define HAVE_DECL_ISINF 1
22593_ACEOF
22594
22595
22596else
22597 cat >>confdefs.h <<_ACEOF
22598#define HAVE_DECL_ISINF 0
22599_ACEOF
22600
22601
22602fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022603{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22604echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022605if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022606 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022607else
22608 cat >conftest.$ac_ext <<_ACEOF
22609/* confdefs.h. */
22610_ACEOF
22611cat confdefs.h >>conftest.$ac_ext
22612cat >>conftest.$ac_ext <<_ACEOF
22613/* end confdefs.h. */
22614#include <math.h>
22615
22616int
22617main ()
22618{
22619#ifndef isnan
22620 (void) isnan;
22621#endif
22622
22623 ;
22624 return 0;
22625}
22626_ACEOF
22627rm -f conftest.$ac_objext
22628if { (ac_try="$ac_compile"
22629case "(($ac_try" in
22630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22631 *) ac_try_echo=$ac_try;;
22632esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022634 (eval "$ac_compile") 2>conftest.er1
22635 ac_status=$?
22636 grep -v '^ *+' conftest.er1 >conftest.err
22637 rm -f conftest.er1
22638 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022640 (exit $ac_status); } && {
22641 test -z "$ac_c_werror_flag" ||
22642 test ! -s conftest.err
22643 } && test -s conftest.$ac_objext; then
22644 ac_cv_have_decl_isnan=yes
22645else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022646 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022647sed 's/^/| /' conftest.$ac_ext >&5
22648
22649 ac_cv_have_decl_isnan=no
22650fi
22651
22652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22653fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022654{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22655echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22656if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022657
22658cat >>confdefs.h <<_ACEOF
22659#define HAVE_DECL_ISNAN 1
22660_ACEOF
22661
22662
22663else
22664 cat >>confdefs.h <<_ACEOF
22665#define HAVE_DECL_ISNAN 0
22666_ACEOF
22667
22668
22669fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022670{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22671echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022672if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022673 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022674else
22675 cat >conftest.$ac_ext <<_ACEOF
22676/* confdefs.h. */
22677_ACEOF
22678cat confdefs.h >>conftest.$ac_ext
22679cat >>conftest.$ac_ext <<_ACEOF
22680/* end confdefs.h. */
22681#include <math.h>
22682
22683int
22684main ()
22685{
22686#ifndef isfinite
22687 (void) isfinite;
22688#endif
22689
22690 ;
22691 return 0;
22692}
22693_ACEOF
22694rm -f conftest.$ac_objext
22695if { (ac_try="$ac_compile"
22696case "(($ac_try" in
22697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22698 *) ac_try_echo=$ac_try;;
22699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022701 (eval "$ac_compile") 2>conftest.er1
22702 ac_status=$?
22703 grep -v '^ *+' conftest.er1 >conftest.err
22704 rm -f conftest.er1
22705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022707 (exit $ac_status); } && {
22708 test -z "$ac_c_werror_flag" ||
22709 test ! -s conftest.err
22710 } && test -s conftest.$ac_objext; then
22711 ac_cv_have_decl_isfinite=yes
22712else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022713 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022714sed 's/^/| /' conftest.$ac_ext >&5
22715
22716 ac_cv_have_decl_isfinite=no
22717fi
22718
22719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022721{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22722echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22723if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022724
22725cat >>confdefs.h <<_ACEOF
22726#define HAVE_DECL_ISFINITE 1
22727_ACEOF
22728
22729
22730else
22731 cat >>confdefs.h <<_ACEOF
22732#define HAVE_DECL_ISFINITE 0
22733_ACEOF
22734
22735
22736fi
22737
22738
Christian Heimes99170a52007-12-19 02:07:34 +000022739
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022740LIBS=$LIBS_SAVE
22741
Mark Dickinson875ada42009-11-28 12:52:39 +000022742# For multiprocessing module, check that sem_open
22743# actually works. For FreeBSD versions <= 7.2,
22744# the kernel module that provides POSIX semaphores
22745# isn't loaded by default, so an attempt to call
22746# sem_open results in a 'Signal 12' error.
22747{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22748echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22749if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22750 echo $ECHO_N "(cached) $ECHO_C" >&6
22751else
22752 if test "$cross_compiling" = yes; then
22753 ac_cv_posix_semaphores_enabled=yes
22754else
22755 cat >conftest.$ac_ext <<_ACEOF
22756/* confdefs.h. */
22757_ACEOF
22758cat confdefs.h >>conftest.$ac_ext
22759cat >>conftest.$ac_ext <<_ACEOF
22760/* end confdefs.h. */
22761
22762#include <unistd.h>
22763#include <fcntl.h>
22764#include <stdio.h>
22765#include <semaphore.h>
22766#include <sys/stat.h>
22767
22768int main(void) {
22769 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22770 if (a == SEM_FAILED) {
22771 perror("sem_open");
22772 return 1;
22773 }
22774 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022775 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022776 return 0;
22777}
22778
22779_ACEOF
22780rm -f conftest$ac_exeext
22781if { (ac_try="$ac_link"
22782case "(($ac_try" in
22783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22784 *) ac_try_echo=$ac_try;;
22785esac
22786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22787 (eval "$ac_link") 2>&5
22788 ac_status=$?
22789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22791 { (case "(($ac_try" in
22792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22793 *) ac_try_echo=$ac_try;;
22794esac
22795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22796 (eval "$ac_try") 2>&5
22797 ac_status=$?
22798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22799 (exit $ac_status); }; }; then
22800 ac_cv_posix_semaphores_enabled=yes
22801else
22802 echo "$as_me: program exited with status $ac_status" >&5
22803echo "$as_me: failed program was:" >&5
22804sed 's/^/| /' conftest.$ac_ext >&5
22805
22806( exit $ac_status )
22807ac_cv_posix_semaphores_enabled=no
22808fi
22809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22810fi
22811
22812
22813
22814fi
22815
22816{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22817echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22818if test $ac_cv_posix_semaphores_enabled = no
22819then
22820
22821cat >>confdefs.h <<\_ACEOF
22822#define POSIX_SEMAPHORES_NOT_ENABLED 1
22823_ACEOF
22824
22825fi
22826
Mark Dickinson10683072009-04-18 21:18:19 +000022827# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022828{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22829echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022830if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022831 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022832See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022833echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022834See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022835 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022836else
22837 cat >conftest.$ac_ext <<_ACEOF
22838/* confdefs.h. */
22839_ACEOF
22840cat confdefs.h >>conftest.$ac_ext
22841cat >>conftest.$ac_ext <<_ACEOF
22842/* end confdefs.h. */
22843
22844#include <unistd.h>
22845#include <fcntl.h>
22846#include <stdio.h>
22847#include <semaphore.h>
22848#include <sys/stat.h>
22849
22850int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022851 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022852 int count;
22853 int res;
22854 if(a==SEM_FAILED){
22855 perror("sem_open");
22856 return 1;
22857
22858 }
22859 res = sem_getvalue(a, &count);
22860 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022861 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022862 return res==-1 ? 1 : 0;
22863}
22864
22865
22866_ACEOF
22867rm -f conftest$ac_exeext
22868if { (ac_try="$ac_link"
22869case "(($ac_try" in
22870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22871 *) ac_try_echo=$ac_try;;
22872esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022874 (eval "$ac_link") 2>&5
22875 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22878 { (case "(($ac_try" in
22879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22880 *) ac_try_echo=$ac_try;;
22881esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022883 (eval "$ac_try") 2>&5
22884 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022886 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022887 { echo "$as_me:$LINENO: result: no" >&5
22888echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022890 echo "$as_me: program exited with status $ac_status" >&5
22891echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022892sed 's/^/| /' conftest.$ac_ext >&5
22893
22894( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022895{ echo "$as_me:$LINENO: result: yes" >&5
22896echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022897
22898cat >>confdefs.h <<\_ACEOF
22899#define HAVE_BROKEN_SEM_GETVALUE 1
22900_ACEOF
22901
22902
22903fi
22904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22905fi
22906
22907
22908
Mark Dickinsonbd792642009-03-18 20:06:12 +000022909# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022910{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22911echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022912# Check whether --enable-big-digits was given.
22913if test "${enable_big_digits+set}" = set; then
22914 enableval=$enable_big_digits; case $enable_big_digits in
22915yes)
22916 enable_big_digits=30 ;;
22917no)
22918 enable_big_digits=15 ;;
2291915|30)
22920 ;;
22921*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022922 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22923echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonbd792642009-03-18 20:06:12 +000022924 { (exit 1); exit 1; }; } ;;
22925esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022926{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22927echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022928
22929cat >>confdefs.h <<_ACEOF
22930#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22931_ACEOF
22932
22933
22934else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022935 { echo "$as_me:$LINENO: result: no value specified" >&5
22936echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022937fi
22938
22939
Guido van Rossumef2255b2000-03-10 22:30:29 +000022940# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022941if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022942 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22943echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022944if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022945 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022946fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022947{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22948echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022949else
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022951{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22952echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022954/* confdefs.h. */
22955_ACEOF
22956cat confdefs.h >>conftest.$ac_ext
22957cat >>conftest.$ac_ext <<_ACEOF
22958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022959$ac_includes_default
22960#include <wchar.h>
22961_ACEOF
22962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022963if { (ac_try="$ac_compile"
22964case "(($ac_try" in
22965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22966 *) ac_try_echo=$ac_try;;
22967esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022971 grep -v '^ *+' conftest.er1 >conftest.err
22972 rm -f conftest.er1
22973 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022975 (exit $ac_status); } && {
22976 test -z "$ac_c_werror_flag" ||
22977 test ! -s conftest.err
22978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022979 ac_header_compiler=yes
22980else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022982sed 's/^/| /' conftest.$ac_ext >&5
22983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022984 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022986
22987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022988{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22989echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022990
22991# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022992{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22993echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022994cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022995/* confdefs.h. */
22996_ACEOF
22997cat confdefs.h >>conftest.$ac_ext
22998cat >>conftest.$ac_ext <<_ACEOF
22999/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023000#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023001_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023002if { (ac_try="$ac_cpp conftest.$ac_ext"
23003case "(($ac_try" in
23004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23005 *) ac_try_echo=$ac_try;;
23006esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023008 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023009 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023010 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023011 rm -f conftest.er1
23012 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023014 (exit $ac_status); } >/dev/null && {
23015 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23016 test ! -s conftest.err
23017 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023018 ac_header_preproc=yes
23019else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023021sed 's/^/| /' conftest.$ac_ext >&5
23022
Martin v. Löwis11437992002-04-12 09:54:03 +000023023 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023025
Martin v. Löwis11437992002-04-12 09:54:03 +000023026rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023027{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23028echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023029
23030# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023031case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23032 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023033 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23034echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23035 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23036echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023037 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023038 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023039 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023040 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23041echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23042 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23043echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23044 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23045echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23046 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23047echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23048 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23049echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23050 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23051echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023052 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023053## -------------------------------------- ##
23054## Report this to http://bugs.python.org/ ##
23055## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023056_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023057 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023058 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023060{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23061echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023062if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023064else
23065 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023066fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023067{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23068echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023069
23070fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023071if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023072
23073
23074cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023075#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023076_ACEOF
23077
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023078 wchar_h="yes"
23079
Guido van Rossumef2255b2000-03-10 22:30:29 +000023080else
Martin v. Löwis11437992002-04-12 09:54:03 +000023081 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023082
23083fi
23084
Michael W. Hudson54241132001-12-07 15:38:26 +000023085
Martin v. Löwis11437992002-04-12 09:54:03 +000023086
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023087# determine wchar_t size
23088if test "$wchar_h" = yes
23089then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023090 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23091echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23092if test "${ac_cv_type_wchar_t+set}" = set; then
23093 echo $ECHO_N "(cached) $ECHO_C" >&6
23094else
23095 cat >conftest.$ac_ext <<_ACEOF
23096/* confdefs.h. */
23097_ACEOF
23098cat confdefs.h >>conftest.$ac_ext
23099cat >>conftest.$ac_ext <<_ACEOF
23100/* end confdefs.h. */
23101#include <wchar.h>
23102
23103typedef wchar_t ac__type_new_;
23104int
23105main ()
23106{
23107if ((ac__type_new_ *) 0)
23108 return 0;
23109if (sizeof (ac__type_new_))
23110 return 0;
23111 ;
23112 return 0;
23113}
23114_ACEOF
23115rm -f conftest.$ac_objext
23116if { (ac_try="$ac_compile"
23117case "(($ac_try" in
23118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23119 *) ac_try_echo=$ac_try;;
23120esac
23121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23122 (eval "$ac_compile") 2>conftest.er1
23123 ac_status=$?
23124 grep -v '^ *+' conftest.er1 >conftest.err
23125 rm -f conftest.er1
23126 cat conftest.err >&5
23127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23128 (exit $ac_status); } && {
23129 test -z "$ac_c_werror_flag" ||
23130 test ! -s conftest.err
23131 } && test -s conftest.$ac_objext; then
23132 ac_cv_type_wchar_t=yes
23133else
23134 echo "$as_me: failed program was:" >&5
23135sed 's/^/| /' conftest.$ac_ext >&5
23136
23137 ac_cv_type_wchar_t=no
23138fi
23139
23140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23141fi
23142{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23143echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23144
23145# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23148# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023149{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23150echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023151if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023152 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023153else
Martin v. Löwis11437992002-04-12 09:54:03 +000023154 if test "$cross_compiling" = yes; then
23155 # Depending upon the size, compute the lo and hi bounds.
23156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023157/* confdefs.h. */
23158_ACEOF
23159cat confdefs.h >>conftest.$ac_ext
23160cat >>conftest.$ac_ext <<_ACEOF
23161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023162#include <wchar.h>
23163
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023164 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023165int
23166main ()
23167{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023169test_array [0] = 0
23170
23171 ;
23172 return 0;
23173}
23174_ACEOF
23175rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023176if { (ac_try="$ac_compile"
23177case "(($ac_try" in
23178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23179 *) ac_try_echo=$ac_try;;
23180esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023184 grep -v '^ *+' conftest.er1 >conftest.err
23185 rm -f conftest.er1
23186 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023188 (exit $ac_status); } && {
23189 test -z "$ac_c_werror_flag" ||
23190 test ! -s conftest.err
23191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023192 ac_lo=0 ac_mid=0
23193 while :; do
23194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023195/* confdefs.h. */
23196_ACEOF
23197cat confdefs.h >>conftest.$ac_ext
23198cat >>conftest.$ac_ext <<_ACEOF
23199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023200#include <wchar.h>
23201
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023202 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023203int
23204main ()
23205{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023207test_array [0] = 0
23208
23209 ;
23210 return 0;
23211}
23212_ACEOF
23213rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023214if { (ac_try="$ac_compile"
23215case "(($ac_try" in
23216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23217 *) ac_try_echo=$ac_try;;
23218esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023222 grep -v '^ *+' conftest.er1 >conftest.err
23223 rm -f conftest.er1
23224 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023226 (exit $ac_status); } && {
23227 test -z "$ac_c_werror_flag" ||
23228 test ! -s conftest.err
23229 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023230 ac_hi=$ac_mid; break
23231else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023233sed 's/^/| /' conftest.$ac_ext >&5
23234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023235 ac_lo=`expr $ac_mid + 1`
23236 if test $ac_lo -le $ac_mid; then
23237 ac_lo= ac_hi=
23238 break
23239 fi
23240 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023242
23243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023244 done
23245else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023247sed 's/^/| /' conftest.$ac_ext >&5
23248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023250/* confdefs.h. */
23251_ACEOF
23252cat confdefs.h >>conftest.$ac_ext
23253cat >>conftest.$ac_ext <<_ACEOF
23254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023255#include <wchar.h>
23256
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023257 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023258int
23259main ()
23260{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023262test_array [0] = 0
23263
23264 ;
23265 return 0;
23266}
23267_ACEOF
23268rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023269if { (ac_try="$ac_compile"
23270case "(($ac_try" in
23271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23272 *) ac_try_echo=$ac_try;;
23273esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023277 grep -v '^ *+' conftest.er1 >conftest.err
23278 rm -f conftest.er1
23279 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023281 (exit $ac_status); } && {
23282 test -z "$ac_c_werror_flag" ||
23283 test ! -s conftest.err
23284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023285 ac_hi=-1 ac_mid=-1
23286 while :; do
23287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023288/* confdefs.h. */
23289_ACEOF
23290cat confdefs.h >>conftest.$ac_ext
23291cat >>conftest.$ac_ext <<_ACEOF
23292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023293#include <wchar.h>
23294
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023295 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023296int
23297main ()
23298{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023299static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023300test_array [0] = 0
23301
23302 ;
23303 return 0;
23304}
23305_ACEOF
23306rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023307if { (ac_try="$ac_compile"
23308case "(($ac_try" in
23309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23310 *) ac_try_echo=$ac_try;;
23311esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023313 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023315 grep -v '^ *+' conftest.er1 >conftest.err
23316 rm -f conftest.er1
23317 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023319 (exit $ac_status); } && {
23320 test -z "$ac_c_werror_flag" ||
23321 test ! -s conftest.err
23322 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023323 ac_lo=$ac_mid; break
23324else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023326sed 's/^/| /' conftest.$ac_ext >&5
23327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023328 ac_hi=`expr '(' $ac_mid ')' - 1`
23329 if test $ac_mid -le $ac_hi; then
23330 ac_lo= ac_hi=
23331 break
23332 fi
23333 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023335
23336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023337 done
23338else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023340sed 's/^/| /' conftest.$ac_ext >&5
23341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023342 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023344
23345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023347
23348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023349# Binary search between lo and hi bounds.
23350while test "x$ac_lo" != "x$ac_hi"; do
23351 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023353/* confdefs.h. */
23354_ACEOF
23355cat confdefs.h >>conftest.$ac_ext
23356cat >>conftest.$ac_ext <<_ACEOF
23357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023358#include <wchar.h>
23359
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023360 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023361int
23362main ()
23363{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023365test_array [0] = 0
23366
23367 ;
23368 return 0;
23369}
23370_ACEOF
23371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023372if { (ac_try="$ac_compile"
23373case "(($ac_try" in
23374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23375 *) ac_try_echo=$ac_try;;
23376esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023380 grep -v '^ *+' conftest.er1 >conftest.err
23381 rm -f conftest.er1
23382 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023384 (exit $ac_status); } && {
23385 test -z "$ac_c_werror_flag" ||
23386 test ! -s conftest.err
23387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023388 ac_hi=$ac_mid
23389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023391sed 's/^/| /' conftest.$ac_ext >&5
23392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023393 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023395
23396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023397done
23398case $ac_lo in
23399?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023400'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023401 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023402See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023403echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023404See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023405 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023406 else
23407 ac_cv_sizeof_wchar_t=0
23408 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023409esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023410else
Martin v. Löwis11437992002-04-12 09:54:03 +000023411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023412/* confdefs.h. */
23413_ACEOF
23414cat confdefs.h >>conftest.$ac_ext
23415cat >>conftest.$ac_ext <<_ACEOF
23416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023417#include <wchar.h>
23418
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023419 typedef wchar_t ac__type_sizeof_;
23420static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23421static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023422#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023423#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023424int
23425main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023426{
Martin v. Löwis11437992002-04-12 09:54:03 +000023427
23428 FILE *f = fopen ("conftest.val", "w");
23429 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023430 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023431 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023432 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023433 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023434 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023435 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023436 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023437 }
23438 else
23439 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023440 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023441 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023442 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023443 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023444 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023445 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023446
23447 ;
23448 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023449}
Martin v. Löwis11437992002-04-12 09:54:03 +000023450_ACEOF
23451rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023452if { (ac_try="$ac_link"
23453case "(($ac_try" in
23454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23455 *) ac_try_echo=$ac_try;;
23456esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023458 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023462 { (case "(($ac_try" in
23463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23464 *) ac_try_echo=$ac_try;;
23465esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023467 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023468 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023470 (exit $ac_status); }; }; then
23471 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023472else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023473 echo "$as_me: program exited with status $ac_status" >&5
23474echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023475sed 's/^/| /' conftest.$ac_ext >&5
23476
Martin v. Löwis11437992002-04-12 09:54:03 +000023477( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023478if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023479 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023480See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023481echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023482See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023483 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023484 else
23485 ac_cv_sizeof_wchar_t=0
23486 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023488rm -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 +000023489fi
23490rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023491fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023492{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23493echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023494
23495
23496
Martin v. Löwis11437992002-04-12 09:54:03 +000023497cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023498#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023499_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023500
Michael W. Hudson54241132001-12-07 15:38:26 +000023501
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023502fi
23503
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023504{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23505echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023506have_ucs4_tcl=no
23507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023508/* confdefs.h. */
23509_ACEOF
23510cat confdefs.h >>conftest.$ac_ext
23511cat >>conftest.$ac_ext <<_ACEOF
23512/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023513
23514#include <tcl.h>
23515#if TCL_UTF_MAX != 6
23516# error "NOT UCS4_TCL"
23517#endif
23518int
23519main ()
23520{
23521
23522 ;
23523 return 0;
23524}
23525_ACEOF
23526rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023527if { (ac_try="$ac_compile"
23528case "(($ac_try" in
23529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23530 *) ac_try_echo=$ac_try;;
23531esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023535 grep -v '^ *+' conftest.er1 >conftest.err
23536 rm -f conftest.er1
23537 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023539 (exit $ac_status); } && {
23540 test -z "$ac_c_werror_flag" ||
23541 test ! -s conftest.err
23542 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023543
23544
23545cat >>confdefs.h <<\_ACEOF
23546#define HAVE_UCS4_TCL 1
23547_ACEOF
23548
23549 have_ucs4_tcl=yes
23550
23551else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023553sed 's/^/| /' conftest.$ac_ext >&5
23554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023555
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023557
23558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023559{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23560echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023561
Skip Montanaro6dead952003-09-25 14:50:04 +000023562# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023563if test "$wchar_h" = yes
23564then
23565 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023566 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23567echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023568 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023569 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023570else
23571
23572 if test "$cross_compiling" = yes; then
23573 ac_cv_wchar_t_signed=yes
23574else
23575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023576/* confdefs.h. */
23577_ACEOF
23578cat confdefs.h >>conftest.$ac_ext
23579cat >>conftest.$ac_ext <<_ACEOF
23580/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023581
23582 #include <wchar.h>
23583 int main()
23584 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023585 /* Success: exit code 0 */
23586 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023587 }
23588
23589_ACEOF
23590rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023591if { (ac_try="$ac_link"
23592case "(($ac_try" in
23593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23594 *) ac_try_echo=$ac_try;;
23595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023597 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023598 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023601 { (case "(($ac_try" in
23602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23603 *) ac_try_echo=$ac_try;;
23604esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023606 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023607 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023609 (exit $ac_status); }; }; then
23610 ac_cv_wchar_t_signed=yes
23611else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023612 echo "$as_me: program exited with status $ac_status" >&5
23613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023614sed 's/^/| /' conftest.$ac_ext >&5
23615
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023616( exit $ac_status )
23617ac_cv_wchar_t_signed=no
23618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023619rm -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 +000023620fi
23621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023622
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023623fi
23624
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023625 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23626echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023627fi
23628
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023629{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23630echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023631
23632# Check whether --with-wide-unicode was given.
23633if test "${with_wide_unicode+set}" = set; then
23634 withval=$with_wide_unicode;
23635if test "$withval" != no
23636then unicode_size="4"
23637else unicode_size="2"
23638fi
23639
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023640else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023641
Georg Brandl52d168a2008-01-07 18:10:24 +000023642case "$have_ucs4_tcl" in
23643 yes) unicode_size="4" ;;
23644 *) unicode_size="2" ;;
23645esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023646
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023647fi
23648
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023649
23650
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023651
Georg Brandl52d168a2008-01-07 18:10:24 +000023652case "$unicode_size" in
23653 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023654#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023655_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023656 ;;
23657 *) cat >>confdefs.h <<\_ACEOF
23658#define Py_UNICODE_SIZE 2
23659_ACEOF
23660 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023661esac
23662
Michael W. Hudson54241132001-12-07 15:38:26 +000023663
Martin v. Löwis11437992002-04-12 09:54:03 +000023664
23665
Georg Brandl52d168a2008-01-07 18:10:24 +000023666# wchar_t is only usable if it maps to an unsigned type
23667if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023668 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023669then
23670 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023671
Martin v. Löwis11437992002-04-12 09:54:03 +000023672cat >>confdefs.h <<\_ACEOF
23673#define HAVE_USABLE_WCHAR_T 1
23674_ACEOF
23675
Georg Brandl52d168a2008-01-07 18:10:24 +000023676 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023677#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023678_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023679
Georg Brandl52d168a2008-01-07 18:10:24 +000023680elif test "$ac_cv_sizeof_short" = "$unicode_size"
23681then
23682 PY_UNICODE_TYPE="unsigned short"
23683 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023684#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023685_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023686
Georg Brandl52d168a2008-01-07 18:10:24 +000023687elif test "$ac_cv_sizeof_long" = "$unicode_size"
23688then
23689 PY_UNICODE_TYPE="unsigned long"
23690 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023691#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023692_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023693
Georg Brandl52d168a2008-01-07 18:10:24 +000023694else
23695 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023696fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023697{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23698echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023699
23700# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023701{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23702echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023703if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023705else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023706 # See if sys/param.h defines the BYTE_ORDER macro.
23707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023708/* confdefs.h. */
23709_ACEOF
23710cat confdefs.h >>conftest.$ac_ext
23711cat >>conftest.$ac_ext <<_ACEOF
23712/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023713#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023714#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023715
Martin v. Löwis11437992002-04-12 09:54:03 +000023716int
23717main ()
23718{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023719#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23720 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23721 bogus endian macros
23722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023723
23724 ;
23725 return 0;
23726}
23727_ACEOF
23728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023729if { (ac_try="$ac_compile"
23730case "(($ac_try" in
23731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23732 *) ac_try_echo=$ac_try;;
23733esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023737 grep -v '^ *+' conftest.er1 >conftest.err
23738 rm -f conftest.er1
23739 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023741 (exit $ac_status); } && {
23742 test -z "$ac_c_werror_flag" ||
23743 test ! -s conftest.err
23744 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023745 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023747/* confdefs.h. */
23748_ACEOF
23749cat confdefs.h >>conftest.$ac_ext
23750cat >>conftest.$ac_ext <<_ACEOF
23751/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023752#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023753#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023754
Martin v. Löwis11437992002-04-12 09:54:03 +000023755int
23756main ()
23757{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023758#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023759 not big endian
23760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023761
23762 ;
23763 return 0;
23764}
23765_ACEOF
23766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023767if { (ac_try="$ac_compile"
23768case "(($ac_try" in
23769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23770 *) ac_try_echo=$ac_try;;
23771esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023775 grep -v '^ *+' conftest.er1 >conftest.err
23776 rm -f conftest.er1
23777 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023779 (exit $ac_status); } && {
23780 test -z "$ac_c_werror_flag" ||
23781 test ! -s conftest.err
23782 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023783 ac_cv_c_bigendian=yes
23784else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023786sed 's/^/| /' conftest.$ac_ext >&5
23787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023788 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023790
23791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023792else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023794sed 's/^/| /' conftest.$ac_ext >&5
23795
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023796 # It does not; compile a test program.
23797if test "$cross_compiling" = yes; then
23798 # try to guess the endianness by grepping values into an object file
23799 ac_cv_c_bigendian=unknown
23800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023801/* confdefs.h. */
23802_ACEOF
23803cat confdefs.h >>conftest.$ac_ext
23804cat >>conftest.$ac_ext <<_ACEOF
23805/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023806short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23807short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23808void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23809short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23810short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23811void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023812int
23813main ()
23814{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023815 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023816 ;
23817 return 0;
23818}
23819_ACEOF
23820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023821if { (ac_try="$ac_compile"
23822case "(($ac_try" in
23823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23824 *) ac_try_echo=$ac_try;;
23825esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023829 grep -v '^ *+' conftest.er1 >conftest.err
23830 rm -f conftest.er1
23831 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023833 (exit $ac_status); } && {
23834 test -z "$ac_c_werror_flag" ||
23835 test ! -s conftest.err
23836 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023837 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023838 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023839fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023840if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23841 if test "$ac_cv_c_bigendian" = unknown; then
23842 ac_cv_c_bigendian=no
23843 else
23844 # finding both strings is unlikely to happen, but who knows?
23845 ac_cv_c_bigendian=unknown
23846 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023847fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023850sed 's/^/| /' conftest.$ac_ext >&5
23851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023852
Martin v. Löwis11437992002-04-12 09:54:03 +000023853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023854
23855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023856else
23857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023858/* confdefs.h. */
23859_ACEOF
23860cat confdefs.h >>conftest.$ac_ext
23861cat >>conftest.$ac_ext <<_ACEOF
23862/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023863$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023864int
23865main ()
23866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023867
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023868 /* Are we little or big endian? From Harbison&Steele. */
23869 union
23870 {
23871 long int l;
23872 char c[sizeof (long int)];
23873 } u;
23874 u.l = 1;
23875 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023876
23877 ;
23878 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023879}
Martin v. Löwis11437992002-04-12 09:54:03 +000023880_ACEOF
23881rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023882if { (ac_try="$ac_link"
23883case "(($ac_try" in
23884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23885 *) ac_try_echo=$ac_try;;
23886esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023888 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023889 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023892 { (case "(($ac_try" in
23893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23894 *) ac_try_echo=$ac_try;;
23895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023898 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023900 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023901 ac_cv_c_bigendian=no
23902else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023903 echo "$as_me: program exited with status $ac_status" >&5
23904echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023905sed 's/^/| /' conftest.$ac_ext >&5
23906
Martin v. Löwis11437992002-04-12 09:54:03 +000023907( exit $ac_status )
23908ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023910rm -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 +000023911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023912
23913
Martin v. Löwis11437992002-04-12 09:54:03 +000023914fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023915
23916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23917fi
23918{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23919echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23920case $ac_cv_c_bigendian in
23921 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023922
23923cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023924#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023925_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023926 ;;
23927 no)
23928 ;;
23929 *)
23930 { { echo "$as_me:$LINENO: error: unknown endianness
23931presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23932echo "$as_me: error: unknown endianness
23933presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023934 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023935esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023936
Michael W. Hudson54241132001-12-07 15:38:26 +000023937
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023938# Check whether right shifting a negative integer extends the sign bit
23939# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023940{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23941echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023942if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023943 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023944else
Martin v. Löwis11437992002-04-12 09:54:03 +000023945
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023946if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023947 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023948else
Martin v. Löwis11437992002-04-12 09:54:03 +000023949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023950/* confdefs.h. */
23951_ACEOF
23952cat confdefs.h >>conftest.$ac_ext
23953cat >>conftest.$ac_ext <<_ACEOF
23954/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023955
23956int main()
23957{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023958 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023959}
23960
Martin v. Löwis11437992002-04-12 09:54:03 +000023961_ACEOF
23962rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023963if { (ac_try="$ac_link"
23964case "(($ac_try" in
23965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23966 *) ac_try_echo=$ac_try;;
23967esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023970 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023973 { (case "(($ac_try" in
23974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975 *) ac_try_echo=$ac_try;;
23976esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023982 ac_cv_rshift_extends_sign=yes
23983else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023984 echo "$as_me: program exited with status $ac_status" >&5
23985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023986sed 's/^/| /' conftest.$ac_ext >&5
23987
Martin v. Löwis11437992002-04-12 09:54:03 +000023988( exit $ac_status )
23989ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023991rm -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 +000023992fi
23993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023994
23995fi
23996
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023997{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23998echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023999if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024000then
Martin v. Löwis11437992002-04-12 09:54:03 +000024001
24002cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024003#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024004_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024005
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024006fi
24007
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024008# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024009{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24010echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024011if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024013else
Martin v. Löwis11437992002-04-12 09:54:03 +000024014
24015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024016/* confdefs.h. */
24017_ACEOF
24018cat confdefs.h >>conftest.$ac_ext
24019cat >>conftest.$ac_ext <<_ACEOF
24020/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024021#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024022int
24023main ()
24024{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024025
24026 FILE *f = fopen("/dev/null", "r");
24027 flockfile(f);
24028 getc_unlocked(f);
24029 funlockfile(f);
24030
Martin v. Löwis11437992002-04-12 09:54:03 +000024031 ;
24032 return 0;
24033}
24034_ACEOF
24035rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024036if { (ac_try="$ac_link"
24037case "(($ac_try" in
24038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24039 *) ac_try_echo=$ac_try;;
24040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024042 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024044 grep -v '^ *+' conftest.er1 >conftest.err
24045 rm -f conftest.er1
24046 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024048 (exit $ac_status); } && {
24049 test -z "$ac_c_werror_flag" ||
24050 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024051 } && test -s conftest$ac_exeext &&
24052 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024053 ac_cv_have_getc_unlocked=yes
24054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024056sed 's/^/| /' conftest.$ac_ext >&5
24057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024058 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024060
24061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024062 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024063fi
24064
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024065{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24066echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024067if test "$ac_cv_have_getc_unlocked" = yes
24068then
Martin v. Löwis11437992002-04-12 09:54:03 +000024069
24070cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024071#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024072_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024073
24074fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024075
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024076# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024077# save the value of LIBS so we don't actually link Python with readline
24078LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024079
Gregory P. Smith18820942008-09-07 06:24:49 +000024080# On some systems we need to link readline to a termcap compatible
24081# library. NOTE: Keep the precedence of listed libraries synchronised
24082# with setup.py.
24083py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024084{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24085echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024086for py_libtermcap in "" ncursesw ncurses curses termcap; do
24087 if test -z "$py_libtermcap"; then
24088 READLINE_LIBS="-lreadline"
24089 else
24090 READLINE_LIBS="-lreadline -l$py_libtermcap"
24091 fi
24092 LIBS="$READLINE_LIBS $LIBS_no_readline"
24093 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024094/* confdefs.h. */
24095_ACEOF
24096cat confdefs.h >>conftest.$ac_ext
24097cat >>conftest.$ac_ext <<_ACEOF
24098/* end confdefs.h. */
24099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024100/* Override any GCC internal prototype to avoid an error.
24101 Use char because int might match the return type of a GCC
24102 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024103#ifdef __cplusplus
24104extern "C"
24105#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024106char readline ();
24107int
24108main ()
24109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024110return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024111 ;
24112 return 0;
24113}
24114_ACEOF
24115rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024116if { (ac_try="$ac_link"
24117case "(($ac_try" in
24118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24119 *) ac_try_echo=$ac_try;;
24120esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024122 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024123 ac_status=$?
24124 grep -v '^ *+' conftest.er1 >conftest.err
24125 rm -f conftest.er1
24126 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024128 (exit $ac_status); } && {
24129 test -z "$ac_c_werror_flag" ||
24130 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024131 } && test -s conftest$ac_exeext &&
24132 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024133 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024134else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024135 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024136sed 's/^/| /' conftest.$ac_ext >&5
24137
Gregory P. Smith18820942008-09-07 06:24:49 +000024138
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024140
24141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024142 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024143 if test $py_cv_lib_readline = yes; then
24144 break
24145 fi
24146done
24147# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24148#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024149if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024150 { echo "$as_me:$LINENO: result: none" >&5
24151echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024152else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024153 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24154echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024155
24156cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024157#define HAVE_LIBREADLINE 1
24158_ACEOF
24159
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024160fi
24161
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024162# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024163{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24164echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024165if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024166 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024167else
24168 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024169LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024170cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024171/* confdefs.h. */
24172_ACEOF
24173cat confdefs.h >>conftest.$ac_ext
24174cat >>conftest.$ac_ext <<_ACEOF
24175/* end confdefs.h. */
24176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024177/* Override any GCC internal prototype to avoid an error.
24178 Use char because int might match the return type of a GCC
24179 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024180#ifdef __cplusplus
24181extern "C"
24182#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024183char rl_callback_handler_install ();
24184int
24185main ()
24186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024187return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024188 ;
24189 return 0;
24190}
24191_ACEOF
24192rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024193if { (ac_try="$ac_link"
24194case "(($ac_try" in
24195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24196 *) ac_try_echo=$ac_try;;
24197esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024199 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024201 grep -v '^ *+' conftest.er1 >conftest.err
24202 rm -f conftest.er1
24203 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024205 (exit $ac_status); } && {
24206 test -z "$ac_c_werror_flag" ||
24207 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024208 } && test -s conftest$ac_exeext &&
24209 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024210 ac_cv_lib_readline_rl_callback_handler_install=yes
24211else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024212 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024213sed 's/^/| /' conftest.$ac_ext >&5
24214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024215 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024217
24218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024219 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024220LIBS=$ac_check_lib_save_LIBS
24221fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024222{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24223echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24224if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024225
24226cat >>confdefs.h <<\_ACEOF
24227#define HAVE_RL_CALLBACK 1
24228_ACEOF
24229
24230fi
24231
24232
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024233# check for readline 2.2
24234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024235/* confdefs.h. */
24236_ACEOF
24237cat confdefs.h >>conftest.$ac_ext
24238cat >>conftest.$ac_ext <<_ACEOF
24239/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024240#include <readline/readline.h>
24241_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024242if { (ac_try="$ac_cpp conftest.$ac_ext"
24243case "(($ac_try" in
24244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24245 *) ac_try_echo=$ac_try;;
24246esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024248 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024249 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024250 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024251 rm -f conftest.er1
24252 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024254 (exit $ac_status); } >/dev/null && {
24255 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24256 test ! -s conftest.err
24257 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024258 have_readline=yes
24259else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024261sed 's/^/| /' conftest.$ac_ext >&5
24262
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024263 have_readline=no
24264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024265
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024266rm -f conftest.err conftest.$ac_ext
24267if test $have_readline = yes
24268then
24269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024270/* confdefs.h. */
24271_ACEOF
24272cat confdefs.h >>conftest.$ac_ext
24273cat >>conftest.$ac_ext <<_ACEOF
24274/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024275#include <readline/readline.h>
24276
24277_ACEOF
24278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024279 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024280
24281cat >>confdefs.h <<\_ACEOF
24282#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24283_ACEOF
24284
24285fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000024286rm -f -r conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024287
24288 cat >conftest.$ac_ext <<_ACEOF
24289/* confdefs.h. */
24290_ACEOF
24291cat confdefs.h >>conftest.$ac_ext
24292cat >>conftest.$ac_ext <<_ACEOF
24293/* end confdefs.h. */
24294#include <readline/readline.h>
24295
24296_ACEOF
24297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24298 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24299
24300cat >>confdefs.h <<\_ACEOF
24301#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24302_ACEOF
24303
24304fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000024305rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024306
24307fi
24308
Martin v. Löwis0daad592001-09-30 21:09:59 +000024309# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024310{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24311echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024312if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024314else
Martin v. Löwis11437992002-04-12 09:54:03 +000024315 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024316LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024318/* confdefs.h. */
24319_ACEOF
24320cat confdefs.h >>conftest.$ac_ext
24321cat >>conftest.$ac_ext <<_ACEOF
24322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024324/* Override any GCC internal prototype to avoid an error.
24325 Use char because int might match the return type of a GCC
24326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024327#ifdef __cplusplus
24328extern "C"
24329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024330char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024331int
24332main ()
24333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024334return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024335 ;
24336 return 0;
24337}
24338_ACEOF
24339rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024340if { (ac_try="$ac_link"
24341case "(($ac_try" in
24342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24343 *) ac_try_echo=$ac_try;;
24344esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024348 grep -v '^ *+' conftest.er1 >conftest.err
24349 rm -f conftest.er1
24350 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352 (exit $ac_status); } && {
24353 test -z "$ac_c_werror_flag" ||
24354 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024355 } && test -s conftest$ac_exeext &&
24356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024357 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024360sed 's/^/| /' conftest.$ac_ext >&5
24361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024362 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024364
24365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024367LIBS=$ac_check_lib_save_LIBS
24368fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024369{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24370echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24371if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024372
Martin v. Löwis11437992002-04-12 09:54:03 +000024373cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024374#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024375_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024376
Martin v. Löwis0daad592001-09-30 21:09:59 +000024377fi
24378
Michael W. Hudson54241132001-12-07 15:38:26 +000024379
Thomas Wouters89d996e2007-09-08 17:39:28 +000024380# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024381{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24382echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024383if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024384 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024385else
24386 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024387LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024388cat >conftest.$ac_ext <<_ACEOF
24389/* confdefs.h. */
24390_ACEOF
24391cat confdefs.h >>conftest.$ac_ext
24392cat >>conftest.$ac_ext <<_ACEOF
24393/* end confdefs.h. */
24394
24395/* Override any GCC internal prototype to avoid an error.
24396 Use char because int might match the return type of a GCC
24397 builtin and then its argument prototype would still apply. */
24398#ifdef __cplusplus
24399extern "C"
24400#endif
24401char rl_completion_display_matches_hook ();
24402int
24403main ()
24404{
24405return rl_completion_display_matches_hook ();
24406 ;
24407 return 0;
24408}
24409_ACEOF
24410rm -f conftest.$ac_objext conftest$ac_exeext
24411if { (ac_try="$ac_link"
24412case "(($ac_try" in
24413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24414 *) ac_try_echo=$ac_try;;
24415esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024417 (eval "$ac_link") 2>conftest.er1
24418 ac_status=$?
24419 grep -v '^ *+' conftest.er1 >conftest.err
24420 rm -f conftest.er1
24421 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024423 (exit $ac_status); } && {
24424 test -z "$ac_c_werror_flag" ||
24425 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024426 } && test -s conftest$ac_exeext &&
24427 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024428 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24429else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024430 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024431sed 's/^/| /' conftest.$ac_ext >&5
24432
24433 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24434fi
24435
24436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24437 conftest$ac_exeext conftest.$ac_ext
24438LIBS=$ac_check_lib_save_LIBS
24439fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024440{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24441echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24442if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024443
24444cat >>confdefs.h <<\_ACEOF
24445#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24446_ACEOF
24447
24448fi
24449
24450
Martin v. Löwis0daad592001-09-30 21:09:59 +000024451# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024452{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24453echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024454if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024455 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024456else
Martin v. Löwis11437992002-04-12 09:54:03 +000024457 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024458LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024460/* confdefs.h. */
24461_ACEOF
24462cat confdefs.h >>conftest.$ac_ext
24463cat >>conftest.$ac_ext <<_ACEOF
24464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024466/* Override any GCC internal prototype to avoid an error.
24467 Use char because int might match the return type of a GCC
24468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024469#ifdef __cplusplus
24470extern "C"
24471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024472char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024473int
24474main ()
24475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024476return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024477 ;
24478 return 0;
24479}
24480_ACEOF
24481rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024482if { (ac_try="$ac_link"
24483case "(($ac_try" in
24484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24485 *) ac_try_echo=$ac_try;;
24486esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024488 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024490 grep -v '^ *+' conftest.er1 >conftest.err
24491 rm -f conftest.er1
24492 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024494 (exit $ac_status); } && {
24495 test -z "$ac_c_werror_flag" ||
24496 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024497 } && test -s conftest$ac_exeext &&
24498 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024499 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024502sed 's/^/| /' conftest.$ac_ext >&5
24503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024504 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024506
24507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024509LIBS=$ac_check_lib_save_LIBS
24510fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024511{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24512echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24513if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024514
Martin v. Löwis11437992002-04-12 09:54:03 +000024515cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024516#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024517_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024518
Guido van Rossum353ae582001-07-10 16:45:32 +000024519fi
24520
Jack Jansendd19cf82001-12-06 22:36:17 +000024521
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024522# also in readline 4.2
24523cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024524/* confdefs.h. */
24525_ACEOF
24526cat confdefs.h >>conftest.$ac_ext
24527cat >>conftest.$ac_ext <<_ACEOF
24528/* end confdefs.h. */
24529#include <readline/readline.h>
24530_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024531if { (ac_try="$ac_cpp conftest.$ac_ext"
24532case "(($ac_try" in
24533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24534 *) ac_try_echo=$ac_try;;
24535esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024538 ac_status=$?
24539 grep -v '^ *+' conftest.er1 >conftest.err
24540 rm -f conftest.er1
24541 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024543 (exit $ac_status); } >/dev/null && {
24544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24545 test ! -s conftest.err
24546 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024547 have_readline=yes
24548else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024549 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024550sed 's/^/| /' conftest.$ac_ext >&5
24551
24552 have_readline=no
24553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024554
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024555rm -f conftest.err conftest.$ac_ext
24556if test $have_readline = yes
24557then
24558 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024559/* confdefs.h. */
24560_ACEOF
24561cat confdefs.h >>conftest.$ac_ext
24562cat >>conftest.$ac_ext <<_ACEOF
24563/* end confdefs.h. */
24564#include <readline/readline.h>
24565
24566_ACEOF
24567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24568 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24569
24570cat >>confdefs.h <<\_ACEOF
24571#define HAVE_RL_CATCH_SIGNAL 1
24572_ACEOF
24573
24574fi
Ronald Oussoren652f4de2010-02-07 11:54:03 +000024575rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024576
24577fi
24578
Martin v. Löwis82bca632006-02-10 20:49:30 +000024579# End of readline checks: restore LIBS
24580LIBS=$LIBS_no_readline
24581
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024582{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24583echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024584if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024585 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024586else
Martin v. Löwis11437992002-04-12 09:54:03 +000024587
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024588if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024589 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024590else
Martin v. Löwis11437992002-04-12 09:54:03 +000024591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024592/* confdefs.h. */
24593_ACEOF
24594cat confdefs.h >>conftest.$ac_ext
24595cat >>conftest.$ac_ext <<_ACEOF
24596/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024597
24598int main()
24599{
24600 int val1 = nice(1);
24601 if (val1 != -1 && val1 == nice(2))
24602 exit(0);
24603 exit(1);
24604}
24605
Martin v. Löwis11437992002-04-12 09:54:03 +000024606_ACEOF
24607rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024608if { (ac_try="$ac_link"
24609case "(($ac_try" in
24610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24611 *) ac_try_echo=$ac_try;;
24612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024615 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024618 { (case "(($ac_try" in
24619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24620 *) ac_try_echo=$ac_try;;
24621esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024624 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024626 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024627 ac_cv_broken_nice=yes
24628else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024629 echo "$as_me: program exited with status $ac_status" >&5
24630echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024631sed 's/^/| /' conftest.$ac_ext >&5
24632
Martin v. Löwis11437992002-04-12 09:54:03 +000024633( exit $ac_status )
24634ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024636rm -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 +000024637fi
24638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024639
24640fi
24641
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024642{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24643echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024644if test "$ac_cv_broken_nice" = yes
24645then
Martin v. Löwis11437992002-04-12 09:54:03 +000024646
24647cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024648#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024649_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024650
24651fi
24652
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024653{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24654echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024655if test "$cross_compiling" = yes; then
24656 ac_cv_broken_poll=no
24657else
24658 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024659/* confdefs.h. */
24660_ACEOF
24661cat confdefs.h >>conftest.$ac_ext
24662cat >>conftest.$ac_ext <<_ACEOF
24663/* end confdefs.h. */
24664
24665#include <poll.h>
24666
24667int main (void)
24668 {
24669 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24670
24671 close (42);
24672
24673 int poll_test = poll (&poll_struct, 1, 0);
24674
24675 if (poll_test < 0)
24676 {
24677 exit(0);
24678 }
24679 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24680 {
24681 exit(0);
24682 }
24683 else
24684 {
24685 exit(1);
24686 }
24687 }
24688
24689_ACEOF
24690rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024691if { (ac_try="$ac_link"
24692case "(($ac_try" in
24693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24694 *) ac_try_echo=$ac_try;;
24695esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024697 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024698 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024701 { (case "(($ac_try" in
24702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24703 *) ac_try_echo=$ac_try;;
24704esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024706 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024707 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024709 (exit $ac_status); }; }; then
24710 ac_cv_broken_poll=yes
24711else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024712 echo "$as_me: program exited with status $ac_status" >&5
24713echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024714sed 's/^/| /' conftest.$ac_ext >&5
24715
24716( exit $ac_status )
24717ac_cv_broken_poll=no
24718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719rm -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 +000024720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024721
24722
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024723{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24724echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024725if test "$ac_cv_broken_poll" = yes
24726then
24727
24728cat >>confdefs.h <<\_ACEOF
24729#define HAVE_BROKEN_POLL 1
24730_ACEOF
24731
24732fi
24733
Brett Cannon43802422005-02-10 20:48:03 +000024734# 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 +000024735# (which is not required by ISO C or UNIX spec) and/or if we support
24736# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024737{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24738echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024739if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024740 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024741else
24742 cat >conftest.$ac_ext <<_ACEOF
24743/* confdefs.h. */
24744_ACEOF
24745cat confdefs.h >>conftest.$ac_ext
24746cat >>conftest.$ac_ext <<_ACEOF
24747/* end confdefs.h. */
24748#include <sys/types.h>
24749#include <$ac_cv_struct_tm>
24750
24751
24752int
24753main ()
24754{
24755static struct tm ac_aggr;
24756if (ac_aggr.tm_zone)
24757return 0;
24758 ;
24759 return 0;
24760}
24761_ACEOF
24762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024763if { (ac_try="$ac_compile"
24764case "(($ac_try" in
24765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24766 *) ac_try_echo=$ac_try;;
24767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024769 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024770 ac_status=$?
24771 grep -v '^ *+' conftest.er1 >conftest.err
24772 rm -f conftest.er1
24773 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775 (exit $ac_status); } && {
24776 test -z "$ac_c_werror_flag" ||
24777 test ! -s conftest.err
24778 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024779 ac_cv_member_struct_tm_tm_zone=yes
24780else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024781 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024782sed 's/^/| /' conftest.$ac_ext >&5
24783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024784 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024785/* confdefs.h. */
24786_ACEOF
24787cat confdefs.h >>conftest.$ac_ext
24788cat >>conftest.$ac_ext <<_ACEOF
24789/* end confdefs.h. */
24790#include <sys/types.h>
24791#include <$ac_cv_struct_tm>
24792
24793
24794int
24795main ()
24796{
24797static struct tm ac_aggr;
24798if (sizeof ac_aggr.tm_zone)
24799return 0;
24800 ;
24801 return 0;
24802}
24803_ACEOF
24804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024805if { (ac_try="$ac_compile"
24806case "(($ac_try" in
24807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24808 *) ac_try_echo=$ac_try;;
24809esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024811 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024812 ac_status=$?
24813 grep -v '^ *+' conftest.er1 >conftest.err
24814 rm -f conftest.er1
24815 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024817 (exit $ac_status); } && {
24818 test -z "$ac_c_werror_flag" ||
24819 test ! -s conftest.err
24820 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024821 ac_cv_member_struct_tm_tm_zone=yes
24822else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024823 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024824sed 's/^/| /' conftest.$ac_ext >&5
24825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828
24829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831
24832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024833fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024834{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24835echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24836if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024837
24838cat >>confdefs.h <<_ACEOF
24839#define HAVE_STRUCT_TM_TM_ZONE 1
24840_ACEOF
24841
24842
24843fi
24844
24845if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24846
24847cat >>confdefs.h <<\_ACEOF
24848#define HAVE_TM_ZONE 1
24849_ACEOF
24850
24851else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024852 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24853echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024854if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024855 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024856else
24857 cat >conftest.$ac_ext <<_ACEOF
24858/* confdefs.h. */
24859_ACEOF
24860cat confdefs.h >>conftest.$ac_ext
24861cat >>conftest.$ac_ext <<_ACEOF
24862/* end confdefs.h. */
24863#include <time.h>
24864
24865int
24866main ()
24867{
24868#ifndef tzname
24869 (void) tzname;
24870#endif
24871
24872 ;
24873 return 0;
24874}
24875_ACEOF
24876rm -f conftest.$ac_objext
24877if { (ac_try="$ac_compile"
24878case "(($ac_try" in
24879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24880 *) ac_try_echo=$ac_try;;
24881esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024883 (eval "$ac_compile") 2>conftest.er1
24884 ac_status=$?
24885 grep -v '^ *+' conftest.er1 >conftest.err
24886 rm -f conftest.er1
24887 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024889 (exit $ac_status); } && {
24890 test -z "$ac_c_werror_flag" ||
24891 test ! -s conftest.err
24892 } && test -s conftest.$ac_objext; then
24893 ac_cv_have_decl_tzname=yes
24894else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024895 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896sed 's/^/| /' conftest.$ac_ext >&5
24897
24898 ac_cv_have_decl_tzname=no
24899fi
24900
24901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24902fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024903{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24904echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24905if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024906
24907cat >>confdefs.h <<_ACEOF
24908#define HAVE_DECL_TZNAME 1
24909_ACEOF
24910
24911
24912else
24913 cat >>confdefs.h <<_ACEOF
24914#define HAVE_DECL_TZNAME 0
24915_ACEOF
24916
24917
24918fi
24919
24920
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024921 { echo "$as_me:$LINENO: checking for tzname" >&5
24922echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024923if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024924 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024925else
24926 cat >conftest.$ac_ext <<_ACEOF
24927/* confdefs.h. */
24928_ACEOF
24929cat confdefs.h >>conftest.$ac_ext
24930cat >>conftest.$ac_ext <<_ACEOF
24931/* end confdefs.h. */
24932#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024933#if !HAVE_DECL_TZNAME
24934extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024935#endif
24936
24937int
24938main ()
24939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024940return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024941 ;
24942 return 0;
24943}
24944_ACEOF
24945rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024946if { (ac_try="$ac_link"
24947case "(($ac_try" in
24948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24949 *) ac_try_echo=$ac_try;;
24950esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024952 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024953 ac_status=$?
24954 grep -v '^ *+' conftest.er1 >conftest.err
24955 rm -f conftest.er1
24956 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024958 (exit $ac_status); } && {
24959 test -z "$ac_c_werror_flag" ||
24960 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024961 } && test -s conftest$ac_exeext &&
24962 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024963 ac_cv_var_tzname=yes
24964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024965 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024966sed 's/^/| /' conftest.$ac_ext >&5
24967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024968 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024970
24971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024972 conftest$ac_exeext conftest.$ac_ext
24973fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024974{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24975echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024976 if test $ac_cv_var_tzname = yes; then
24977
24978cat >>confdefs.h <<\_ACEOF
24979#define HAVE_TZNAME 1
24980_ACEOF
24981
24982 fi
24983fi
24984
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024985
Martin v. Löwis1d459062005-03-14 21:23:33 +000024986# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024987{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24988echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024989if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024991else
24992
24993if test "$cross_compiling" = yes; then
24994 ac_cv_working_tzset=no
24995else
24996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024997/* confdefs.h. */
24998_ACEOF
24999cat confdefs.h >>conftest.$ac_ext
25000cat >>conftest.$ac_ext <<_ACEOF
25001/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025002
25003#include <stdlib.h>
25004#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025005#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025006
25007#if HAVE_TZNAME
25008extern char *tzname[];
25009#endif
25010
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025011int main()
25012{
Brett Cannon18367812003-09-19 00:59:16 +000025013 /* Note that we need to ensure that not only does tzset(3)
25014 do 'something' with localtime, but it works as documented
25015 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025016 This includes making sure that tzname is set properly if
25017 tm->tm_zone does not exist since it is the alternative way
25018 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025019
25020 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025021 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025022 */
25023
Martin v. Löwis1d459062005-03-14 21:23:33 +000025024 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025025 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25026
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025027 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025028 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025029 if (localtime(&groundhogday)->tm_hour != 0)
25030 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025031#if HAVE_TZNAME
25032 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25033 if (strcmp(tzname[0], "UTC") ||
25034 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25035 exit(1);
25036#endif
Brett Cannon18367812003-09-19 00:59:16 +000025037
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025038 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025039 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025040 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025041 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025042#if HAVE_TZNAME
25043 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25044 exit(1);
25045#endif
Brett Cannon18367812003-09-19 00:59:16 +000025046
25047 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25048 tzset();
25049 if (localtime(&groundhogday)->tm_hour != 11)
25050 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025051#if HAVE_TZNAME
25052 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25053 exit(1);
25054#endif
25055
25056#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025057 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25058 exit(1);
25059 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25060 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025061#endif
Brett Cannon18367812003-09-19 00:59:16 +000025062
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025063 exit(0);
25064}
25065
25066_ACEOF
25067rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025068if { (ac_try="$ac_link"
25069case "(($ac_try" in
25070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25071 *) ac_try_echo=$ac_try;;
25072esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025074 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025075 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025077 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025078 { (case "(($ac_try" in
25079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25080 *) ac_try_echo=$ac_try;;
25081esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025083 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025084 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025086 (exit $ac_status); }; }; then
25087 ac_cv_working_tzset=yes
25088else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025089 echo "$as_me: program exited with status $ac_status" >&5
25090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025091sed 's/^/| /' conftest.$ac_ext >&5
25092
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025093( exit $ac_status )
25094ac_cv_working_tzset=no
25095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025096rm -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 +000025097fi
25098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025099
25100fi
25101
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025102{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25103echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025104if test "$ac_cv_working_tzset" = yes
25105then
25106
25107cat >>confdefs.h <<\_ACEOF
25108#define HAVE_WORKING_TZSET 1
25109_ACEOF
25110
25111fi
25112
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025113# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025114{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25115echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025116if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025117 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025118else
25119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025120/* confdefs.h. */
25121_ACEOF
25122cat confdefs.h >>conftest.$ac_ext
25123cat >>conftest.$ac_ext <<_ACEOF
25124/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025125#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025126int
25127main ()
25128{
25129
25130struct stat st;
25131st.st_mtim.tv_nsec = 1;
25132
25133 ;
25134 return 0;
25135}
25136_ACEOF
25137rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025138if { (ac_try="$ac_compile"
25139case "(($ac_try" in
25140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25141 *) ac_try_echo=$ac_try;;
25142esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025146 grep -v '^ *+' conftest.er1 >conftest.err
25147 rm -f conftest.er1
25148 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025150 (exit $ac_status); } && {
25151 test -z "$ac_c_werror_flag" ||
25152 test ! -s conftest.err
25153 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025154 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025155else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025157sed 's/^/| /' conftest.$ac_ext >&5
25158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025159 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025160fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25163fi
25164
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025165{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25166echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025167if test "$ac_cv_stat_tv_nsec" = yes
25168then
25169
25170cat >>confdefs.h <<\_ACEOF
25171#define HAVE_STAT_TV_NSEC 1
25172_ACEOF
25173
25174fi
25175
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025176# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025177{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25178echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025179if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025180 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025181else
25182 cat >conftest.$ac_ext <<_ACEOF
25183/* confdefs.h. */
25184_ACEOF
25185cat confdefs.h >>conftest.$ac_ext
25186cat >>conftest.$ac_ext <<_ACEOF
25187/* end confdefs.h. */
25188#include <sys/stat.h>
25189int
25190main ()
25191{
25192
25193struct stat st;
25194st.st_mtimespec.tv_nsec = 1;
25195
25196 ;
25197 return 0;
25198}
25199_ACEOF
25200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201if { (ac_try="$ac_compile"
25202case "(($ac_try" in
25203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25204 *) ac_try_echo=$ac_try;;
25205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025208 ac_status=$?
25209 grep -v '^ *+' conftest.er1 >conftest.err
25210 rm -f conftest.er1
25211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025213 (exit $ac_status); } && {
25214 test -z "$ac_c_werror_flag" ||
25215 test ! -s conftest.err
25216 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025217 ac_cv_stat_tv_nsec2=yes
25218else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025219 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025220sed 's/^/| /' conftest.$ac_ext >&5
25221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025222 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025223fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25226fi
25227
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025228{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25229echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025230if test "$ac_cv_stat_tv_nsec2" = yes
25231then
25232
25233cat >>confdefs.h <<\_ACEOF
25234#define HAVE_STAT_TV_NSEC2 1
25235_ACEOF
25236
25237fi
25238
Jack Jansen666b1e72001-10-31 12:11:48 +000025239# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025240{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25241echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025242if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025243 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025244else
Martin v. Löwis11437992002-04-12 09:54:03 +000025245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025246/* confdefs.h. */
25247_ACEOF
25248cat confdefs.h >>conftest.$ac_ext
25249cat >>conftest.$ac_ext <<_ACEOF
25250/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025251#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025252int
25253main ()
25254{
Jack Jansen666b1e72001-10-31 12:11:48 +000025255
25256 int rtn;
25257 rtn = mvwdelch(0,0,0);
25258
Martin v. Löwis11437992002-04-12 09:54:03 +000025259 ;
25260 return 0;
25261}
25262_ACEOF
25263rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025264if { (ac_try="$ac_compile"
25265case "(($ac_try" in
25266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25267 *) ac_try_echo=$ac_try;;
25268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025272 grep -v '^ *+' conftest.er1 >conftest.err
25273 rm -f conftest.er1
25274 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025276 (exit $ac_status); } && {
25277 test -z "$ac_c_werror_flag" ||
25278 test ! -s conftest.err
25279 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025280 ac_cv_mvwdelch_is_expression=yes
25281else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025283sed 's/^/| /' conftest.$ac_ext >&5
25284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025285 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025286fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25289fi
25290
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025291{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25292echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025293
25294if test "$ac_cv_mvwdelch_is_expression" = yes
25295then
Martin v. Löwis11437992002-04-12 09:54:03 +000025296
25297cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025298#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025299_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025300
25301fi
25302
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025303{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25304echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025305if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025306 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025307else
Martin v. Löwis11437992002-04-12 09:54:03 +000025308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025309/* confdefs.h. */
25310_ACEOF
25311cat confdefs.h >>conftest.$ac_ext
25312cat >>conftest.$ac_ext <<_ACEOF
25313/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025314#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025315int
25316main ()
25317{
Jack Jansen666b1e72001-10-31 12:11:48 +000025318
25319 WINDOW *w;
25320 w->_flags = 0;
25321
Martin v. Löwis11437992002-04-12 09:54:03 +000025322 ;
25323 return 0;
25324}
25325_ACEOF
25326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025327if { (ac_try="$ac_compile"
25328case "(($ac_try" in
25329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25330 *) ac_try_echo=$ac_try;;
25331esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025335 grep -v '^ *+' conftest.er1 >conftest.err
25336 rm -f conftest.er1
25337 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025339 (exit $ac_status); } && {
25340 test -z "$ac_c_werror_flag" ||
25341 test ! -s conftest.err
25342 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025343 ac_cv_window_has_flags=yes
25344else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025346sed 's/^/| /' conftest.$ac_ext >&5
25347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025348 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025349fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25352fi
25353
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025354{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25355echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025356
Jack Jansen666b1e72001-10-31 12:11:48 +000025357
25358if test "$ac_cv_window_has_flags" = yes
25359then
Martin v. Löwis11437992002-04-12 09:54:03 +000025360
25361cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025362#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025363_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025364
25365fi
25366
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025367{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25368echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025369cat >conftest.$ac_ext <<_ACEOF
25370/* confdefs.h. */
25371_ACEOF
25372cat confdefs.h >>conftest.$ac_ext
25373cat >>conftest.$ac_ext <<_ACEOF
25374/* end confdefs.h. */
25375#include <curses.h>
25376int
25377main ()
25378{
25379void *x=is_term_resized
25380 ;
25381 return 0;
25382}
25383_ACEOF
25384rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025385if { (ac_try="$ac_compile"
25386case "(($ac_try" in
25387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25388 *) ac_try_echo=$ac_try;;
25389esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025391 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025392 ac_status=$?
25393 grep -v '^ *+' conftest.er1 >conftest.err
25394 rm -f conftest.er1
25395 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025397 (exit $ac_status); } && {
25398 test -z "$ac_c_werror_flag" ||
25399 test ! -s conftest.err
25400 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025401
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025402cat >>confdefs.h <<\_ACEOF
25403#define HAVE_CURSES_IS_TERM_RESIZED 1
25404_ACEOF
25405
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025406 { echo "$as_me:$LINENO: result: yes" >&5
25407echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025408else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025409 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025410sed 's/^/| /' conftest.$ac_ext >&5
25411
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025412 { echo "$as_me:$LINENO: result: no" >&5
25413echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025414
25415fi
25416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25418
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025419{ echo "$as_me:$LINENO: checking for resize_term" >&5
25420echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025421cat >conftest.$ac_ext <<_ACEOF
25422/* confdefs.h. */
25423_ACEOF
25424cat confdefs.h >>conftest.$ac_ext
25425cat >>conftest.$ac_ext <<_ACEOF
25426/* end confdefs.h. */
25427#include <curses.h>
25428int
25429main ()
25430{
25431void *x=resize_term
25432 ;
25433 return 0;
25434}
25435_ACEOF
25436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025437if { (ac_try="$ac_compile"
25438case "(($ac_try" in
25439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25440 *) ac_try_echo=$ac_try;;
25441esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025443 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025444 ac_status=$?
25445 grep -v '^ *+' conftest.er1 >conftest.err
25446 rm -f conftest.er1
25447 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025449 (exit $ac_status); } && {
25450 test -z "$ac_c_werror_flag" ||
25451 test ! -s conftest.err
25452 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025453
25454cat >>confdefs.h <<\_ACEOF
25455#define HAVE_CURSES_RESIZE_TERM 1
25456_ACEOF
25457
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025458 { echo "$as_me:$LINENO: result: yes" >&5
25459echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025460else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025461 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025462sed 's/^/| /' conftest.$ac_ext >&5
25463
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025464 { echo "$as_me:$LINENO: result: no" >&5
25465echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025466
25467fi
25468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25470
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025471{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25472echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025473cat >conftest.$ac_ext <<_ACEOF
25474/* confdefs.h. */
25475_ACEOF
25476cat confdefs.h >>conftest.$ac_ext
25477cat >>conftest.$ac_ext <<_ACEOF
25478/* end confdefs.h. */
25479#include <curses.h>
25480int
25481main ()
25482{
25483void *x=resizeterm
25484 ;
25485 return 0;
25486}
25487_ACEOF
25488rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025489if { (ac_try="$ac_compile"
25490case "(($ac_try" in
25491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25492 *) ac_try_echo=$ac_try;;
25493esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025495 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025496 ac_status=$?
25497 grep -v '^ *+' conftest.er1 >conftest.err
25498 rm -f conftest.er1
25499 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025501 (exit $ac_status); } && {
25502 test -z "$ac_c_werror_flag" ||
25503 test ! -s conftest.err
25504 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025505
25506cat >>confdefs.h <<\_ACEOF
25507#define HAVE_CURSES_RESIZETERM 1
25508_ACEOF
25509
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025510 { echo "$as_me:$LINENO: result: yes" >&5
25511echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025512else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025513 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025514sed 's/^/| /' conftest.$ac_ext >&5
25515
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025516 { echo "$as_me:$LINENO: result: no" >&5
25517echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025518
25519fi
25520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25522
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025523{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25524echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025525
25526if test -r /dev/ptmx
25527then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025528 { echo "$as_me:$LINENO: result: yes" >&5
25529echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025530
25531cat >>confdefs.h <<\_ACEOF
25532#define HAVE_DEV_PTMX 1
25533_ACEOF
25534
Thomas Wouters89f507f2006-12-13 04:49:30 +000025535else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025536 { echo "$as_me:$LINENO: result: no" >&5
25537echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025538fi
25539
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025540{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25541echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025542
25543if test -r /dev/ptc
25544then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025545 { echo "$as_me:$LINENO: result: yes" >&5
25546echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025547
25548cat >>confdefs.h <<\_ACEOF
25549#define HAVE_DEV_PTC 1
25550_ACEOF
25551
Thomas Wouters89f507f2006-12-13 04:49:30 +000025552else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025553 { echo "$as_me:$LINENO: result: no" >&5
25554echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025555fi
25556
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025557{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25558echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025559if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025560 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025561See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025562echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025563See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025564 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025565else
25566 cat >conftest.$ac_ext <<_ACEOF
25567/* confdefs.h. */
25568_ACEOF
25569cat confdefs.h >>conftest.$ac_ext
25570cat >>conftest.$ac_ext <<_ACEOF
25571/* end confdefs.h. */
25572#include <stdio.h>
25573#include <stddef.h>
25574#include <string.h>
25575
Christian Heimes2c181612007-12-17 20:04:13 +000025576#ifdef HAVE_SYS_TYPES_H
25577#include <sys/types.h>
25578#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025579
25580#ifdef HAVE_SSIZE_T
25581typedef ssize_t Py_ssize_t;
25582#elif SIZEOF_VOID_P == SIZEOF_LONG
25583typedef long Py_ssize_t;
25584#else
25585typedef int Py_ssize_t;
25586#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025587
Christian Heimes2c181612007-12-17 20:04:13 +000025588int main()
25589{
25590 char buffer[256];
25591
Thomas Wouters477c8d52006-05-27 19:21:47 +000025592 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25593 return 1;
25594
Thomas Wouters89f507f2006-12-13 04:49:30 +000025595 if (strcmp(buffer, "123"))
25596 return 1;
25597
25598 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25599 return 1;
25600
25601 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025602 return 1;
25603
25604 return 0;
25605}
25606_ACEOF
25607rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025608if { (ac_try="$ac_link"
25609case "(($ac_try" in
25610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25611 *) ac_try_echo=$ac_try;;
25612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025614 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025615 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025618 { (case "(($ac_try" in
25619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25620 *) ac_try_echo=$ac_try;;
25621esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025623 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025624 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025626 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025627 { echo "$as_me:$LINENO: result: yes" >&5
25628echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025629
25630cat >>confdefs.h <<\_ACEOF
25631#define PY_FORMAT_SIZE_T "z"
25632_ACEOF
25633
25634else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025635 echo "$as_me: program exited with status $ac_status" >&5
25636echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025637sed 's/^/| /' conftest.$ac_ext >&5
25638
25639( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025640{ echo "$as_me:$LINENO: result: no" >&5
25641echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000025644fi
25645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025646
25647
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025648{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25649echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025650if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025652else
Martin v. Löwis11437992002-04-12 09:54:03 +000025653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025654/* confdefs.h. */
25655_ACEOF
25656cat confdefs.h >>conftest.$ac_ext
25657cat >>conftest.$ac_ext <<_ACEOF
25658/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025659
25660#ifdef HAVE_SYS_TYPES_H
25661#include <sys/types.h>
25662#endif
25663#ifdef HAVE_SYS_SOCKET_H
25664#include <sys/socket.h>
25665#endif
25666
25667
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025668typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025669int
25670main ()
25671{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025672if ((ac__type_new_ *) 0)
25673 return 0;
25674if (sizeof (ac__type_new_))
25675 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025676 ;
25677 return 0;
25678}
25679_ACEOF
25680rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025681if { (ac_try="$ac_compile"
25682case "(($ac_try" in
25683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25684 *) ac_try_echo=$ac_try;;
25685esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025689 grep -v '^ *+' conftest.er1 >conftest.err
25690 rm -f conftest.er1
25691 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025693 (exit $ac_status); } && {
25694 test -z "$ac_c_werror_flag" ||
25695 test ! -s conftest.err
25696 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025697 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025698else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025700sed 's/^/| /' conftest.$ac_ext >&5
25701
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025702 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025704
25705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025706fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025707{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25708echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25709if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025710 :
25711else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025712
Martin v. Löwis01c04012002-11-11 14:58:44 +000025713cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025714#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025715_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025716
25717fi
25718
Michael W. Hudson54241132001-12-07 15:38:26 +000025719
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025720{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25721echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025722if test "$cross_compiling" = yes; then
25723 ac_cv_broken_mbstowcs=no
25724else
25725 cat >conftest.$ac_ext <<_ACEOF
25726/* confdefs.h. */
25727_ACEOF
25728cat confdefs.h >>conftest.$ac_ext
25729cat >>conftest.$ac_ext <<_ACEOF
25730/* end confdefs.h. */
25731
25732#include<stdlib.h>
25733int main() {
25734 size_t len = -1;
25735 const char *str = "text";
25736 len = mbstowcs(NULL, str, 0);
25737 return (len != 4);
25738}
25739
25740_ACEOF
25741rm -f conftest$ac_exeext
25742if { (ac_try="$ac_link"
25743case "(($ac_try" in
25744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25745 *) ac_try_echo=$ac_try;;
25746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025748 (eval "$ac_link") 2>&5
25749 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25752 { (case "(($ac_try" in
25753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25754 *) ac_try_echo=$ac_try;;
25755esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025757 (eval "$ac_try") 2>&5
25758 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025760 (exit $ac_status); }; }; then
25761 ac_cv_broken_mbstowcs=no
25762else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025763 echo "$as_me: program exited with status $ac_status" >&5
25764echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025765sed 's/^/| /' conftest.$ac_ext >&5
25766
25767( exit $ac_status )
25768ac_cv_broken_mbstowcs=yes
25769fi
25770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25771fi
25772
25773
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025774{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25775echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025776if test "$ac_cv_broken_mbstowcs" = yes
25777then
25778
25779cat >>confdefs.h <<\_ACEOF
25780#define HAVE_BROKEN_MBSTOWCS 1
25781_ACEOF
25782
25783fi
25784
Antoine Pitroub52ec782009-01-25 16:34:23 +000025785# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025786{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25787echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025788
25789# Check whether --with-computed-gotos was given.
25790if test "${with_computed_gotos+set}" = set; then
25791 withval=$with_computed_gotos;
25792if test "$withval" != no
25793then
25794
25795cat >>confdefs.h <<\_ACEOF
25796#define USE_COMPUTED_GOTOS 1
25797_ACEOF
25798
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025799 { echo "$as_me:$LINENO: result: yes" >&5
25800echo "${ECHO_T}yes" >&6; }
25801else { echo "$as_me:$LINENO: result: no" >&5
25802echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025803fi
25804else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025805 { echo "$as_me:$LINENO: result: no" >&5
25806echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025807fi
25808
25809
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025810if test $ac_sys_system = Darwin
25811then
25812 LIBS="$LIBS -framework CoreFoundation"
25813fi
25814
25815
Antoine Pitroub52ec782009-01-25 16:34:23 +000025816
Michael W. Hudson54241132001-12-07 15:38:26 +000025817
25818
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025819for h in `(cd $srcdir;echo Python/thread_*.h)`
25820do
25821 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25822done
25823
Michael W. Hudson54241132001-12-07 15:38:26 +000025824
Neal Norwitzd24499d2005-12-18 21:36:39 +000025825SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025826{ echo "$as_me:$LINENO: checking for build directories" >&5
25827echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025828for dir in $SRCDIRS; do
25829 if test ! -d $dir; then
25830 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025831 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025832done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025833{ echo "$as_me:$LINENO: result: done" >&5
25834echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025835
Guido van Rossum627b2d71993-12-24 10:39:16 +000025836# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025837ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025838
Martin v. Löwis11437992002-04-12 09:54:03 +000025839cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025840# This file is a shell script that caches the results of configure
25841# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025842# scripts and configure runs, see configure's option --config-cache.
25843# It is not useful on other systems. If it contains results you don't
25844# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025845#
Martin v. Löwis11437992002-04-12 09:54:03 +000025846# config.status only pays attention to the cache file if you give it
25847# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025848#
Skip Montanaro6dead952003-09-25 14:50:04 +000025849# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025850# loading this file, other *unset* `ac_cv_foo' will be assigned the
25851# following values.
25852
25853_ACEOF
25854
Guido van Rossumf78abae1997-01-21 22:02:36 +000025855# The following way of writing the cache mishandles newlines in values,
25856# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025858# Ultrix sh set writes to stderr and can't be redirected directly,
25859# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025860(
25861 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25862 eval ac_val=\$$ac_var
25863 case $ac_val in #(
25864 *${as_nl}*)
25865 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025866 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25867echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025868 esac
25869 case $ac_var in #(
25870 _ | IFS | as_nl) ;; #(
25871 *) $as_unset $ac_var ;;
25872 esac ;;
25873 esac
25874 done
25875
Martin v. Löwis11437992002-04-12 09:54:03 +000025876 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025877 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25878 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025879 # `set' does not quote correctly, so add quotes (double-quote
25880 # substitution turns \\\\ into \\, and sed turns \\ into \).
25881 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025882 "s/'/'\\\\''/g;
25883 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025884 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025885 *)
25886 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025887 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025888 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025889 esac |
25890 sort
25891) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025892 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025893 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025894 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025895 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025896 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25897 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025898 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25899 :end' >>confcache
25900if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25901 if test -w "$cache_file"; then
25902 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025903 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25904echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025905 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025906 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025907 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25908echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025909 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025910fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025911rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025913test "x$prefix" = xNONE && prefix=$ac_default_prefix
25914# Let make expand exec_prefix.
25915test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025916
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025917DEFS=-DHAVE_CONFIG_H
25918
Skip Montanaro6dead952003-09-25 14:50:04 +000025919ac_libobjs=
25920ac_ltlibobjs=
25921for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25922 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025923 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025924 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025925 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25926 # will be set to the directory where LIBOBJS objects are built.
25927 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25928 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025929done
25930LIBOBJS=$ac_libobjs
25931
25932LTLIBOBJS=$ac_ltlibobjs
25933
25934
Martin v. Löwis11437992002-04-12 09:54:03 +000025935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025936: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025937ac_clean_files_save=$ac_clean_files
25938ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025939{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25940echo "$as_me: creating $CONFIG_STATUS" >&6;}
25941cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025942#! $SHELL
25943# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025944# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025945# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025946# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025947
Martin v. Löwis11437992002-04-12 09:54:03 +000025948debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025949ac_cs_recheck=false
25950ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025951SHELL=\${CONFIG_SHELL-$SHELL}
25952_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025953
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025954cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025955## --------------------- ##
25956## M4sh Initialization. ##
25957## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025959# Be more Bourne compatible
25960DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025961if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25962 emulate sh
25963 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025964 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025965 # is contrary to our usage. Disable this feature.
25966 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025967 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025968else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969 case `(set -o) 2>/dev/null` in
25970 *posix*) set -o posix ;;
25971esac
25972
Michael W. Hudson54241132001-12-07 15:38:26 +000025973fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025974
25975
Michael W. Hudson54241132001-12-07 15:38:26 +000025976
Michael W. Hudson54241132001-12-07 15:38:26 +000025977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025978# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025979# Avoid depending upon Character Ranges.
25980as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25981as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25982as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25983as_cr_digits='0123456789'
25984as_cr_alnum=$as_cr_Letters$as_cr_digits
25985
25986# The user is always right.
25987if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025988 echo "#! /bin/sh" >conf$$.sh
25989 echo "exit 0" >>conf$$.sh
25990 chmod +x conf$$.sh
25991 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25992 PATH_SEPARATOR=';'
25993 else
25994 PATH_SEPARATOR=:
25995 fi
25996 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025997fi
25998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025999# Support unset when possible.
26000if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26001 as_unset=unset
26002else
26003 as_unset=false
26004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026006
26007# IFS
26008# We need space, tab and new line, in precisely that order. Quoting is
26009# there to prevent editors from complaining about space-tab.
26010# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26011# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026012as_nl='
26013'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026014IFS=" "" $as_nl"
26015
26016# Find who we are. Look in the path if we contain no directory separator.
26017case $0 in
26018 *[\\/]* ) as_myself=$0 ;;
26019 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026020for as_dir in $PATH
26021do
26022 IFS=$as_save_IFS
26023 test -z "$as_dir" && as_dir=.
26024 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26025done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026026IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026028 ;;
26029esac
26030# We did not find ourselves, most probably we were run as `sh COMMAND'
26031# in which case we are not to be found in the path.
26032if test "x$as_myself" = x; then
26033 as_myself=$0
26034fi
26035if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026036 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026037 { (exit 1); exit 1; }
26038fi
26039
26040# Work around bugs in pre-3.0 UWIN ksh.
26041for as_var in ENV MAIL MAILPATH
26042do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26043done
26044PS1='$ '
26045PS2='> '
26046PS4='+ '
26047
26048# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026049for as_var in \
26050 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26051 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26052 LC_TELEPHONE LC_TIME
26053do
26054 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26055 eval $as_var=C; export $as_var
26056 else
26057 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26058 fi
26059done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026060
26061# Required to use basename.
26062if expr a : '\(a\)' >/dev/null 2>&1 &&
26063 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26064 as_expr=expr
26065else
26066 as_expr=false
26067fi
26068
26069if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26070 as_basename=basename
26071else
26072 as_basename=false
26073fi
26074
26075
26076# Name of the executable.
26077as_me=`$as_basename -- "$0" ||
26078$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26079 X"$0" : 'X\(//\)$' \| \
26080 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026081echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026082 sed '/^.*\/\([^/][^/]*\)\/*$/{
26083 s//\1/
26084 q
26085 }
26086 /^X\/\(\/\/\)$/{
26087 s//\1/
26088 q
26089 }
26090 /^X\/\(\/\).*/{
26091 s//\1/
26092 q
26093 }
26094 s/.*/./; q'`
26095
26096# CDPATH.
26097$as_unset CDPATH
26098
26099
26100
Martin v. Löwis11437992002-04-12 09:54:03 +000026101 as_lineno_1=$LINENO
26102 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026103 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026104 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026105
Martin v. Löwis11437992002-04-12 09:54:03 +000026106 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26107 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026108 # line-number line after each line using $LINENO; the second 'sed'
26109 # does the real work. The second script uses 'N' to pair each
26110 # line-number line with the line containing $LINENO, and appends
26111 # trailing '-' during substitution so that $LINENO is not a special
26112 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026113 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026114 # scripts with optimization help from Paolo Bonzini. Blame Lee
26115 # E. McMahon (1931-1989) for sed's syntax. :-)
26116 sed -n '
26117 p
26118 /[$]LINENO/=
26119 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026120 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026121 s/[$]LINENO.*/&-/
26122 t lineno
26123 b
26124 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026125 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026126 :loop
26127 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026128 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026129 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026130 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026131 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026132 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026133 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026134
Martin v. Löwis11437992002-04-12 09:54:03 +000026135 # Don't try to exec as it changes $[0], causing all sort of problems
26136 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026137 # original and so on. Autoconf is especially sensitive to this).
26138 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026139 # Exit status is that of the last command.
26140 exit
26141}
26142
26143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026144if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26145 as_dirname=dirname
26146else
26147 as_dirname=false
26148fi
26149
26150ECHO_C= ECHO_N= ECHO_T=
26151case `echo -n x` in
26152-n*)
26153 case `echo 'x\c'` in
26154 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26155 *) ECHO_C='\c';;
26156 esac;;
26157*)
26158 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026159esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026161if expr a : '\(a\)' >/dev/null 2>&1 &&
26162 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026163 as_expr=expr
26164else
26165 as_expr=false
26166fi
26167
26168rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026169if test -d conf$$.dir; then
26170 rm -f conf$$.dir/conf$$.file
26171else
26172 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026173 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026174fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026175echo >conf$$.file
26176if ln -s conf$$.file conf$$ 2>/dev/null; then
26177 as_ln_s='ln -s'
26178 # ... but there are two gotchas:
26179 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26180 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26181 # In both cases, we have to default to `cp -p'.
26182 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026183 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026184elif ln conf$$.file conf$$ 2>/dev/null; then
26185 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026186else
26187 as_ln_s='cp -p'
26188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026189rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26190rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026191
Skip Montanaro6dead952003-09-25 14:50:04 +000026192if mkdir -p . 2>/dev/null; then
26193 as_mkdir_p=:
26194else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026195 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026196 as_mkdir_p=false
26197fi
26198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199if test -x / >/dev/null 2>&1; then
26200 as_test_x='test -x'
26201else
26202 if ls -dL / >/dev/null 2>&1; then
26203 as_ls_L_option=L
26204 else
26205 as_ls_L_option=
26206 fi
26207 as_test_x='
26208 eval sh -c '\''
26209 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026210 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211 else
26212 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026213 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026214 esac;
26215 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26216 ???[sx]*):;;*)false;;esac;fi
26217 '\'' sh
26218 '
26219fi
26220as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026221
26222# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026223as_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 +000026224
26225# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026226as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026227
26228
Martin v. Löwis11437992002-04-12 09:54:03 +000026229exec 6>&1
26230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026231# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026232# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233# values after options handling.
26234ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026235This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026236generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026237
26238 CONFIG_FILES = $CONFIG_FILES
26239 CONFIG_HEADERS = $CONFIG_HEADERS
26240 CONFIG_LINKS = $CONFIG_LINKS
26241 CONFIG_COMMANDS = $CONFIG_COMMANDS
26242 $ $0 $@
26243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026244on `(hostname || uname -n) 2>/dev/null | sed 1q`
26245"
26246
Martin v. Löwis11437992002-04-12 09:54:03 +000026247_ACEOF
26248
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026249cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026250# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026251config_files="$ac_config_files"
26252config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026254_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026255
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026256cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026257ac_cs_usage="\
26258\`$as_me' instantiates files from templates according to the
26259current configuration.
26260
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026261Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026262
26263 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026264 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026265 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026266 -d, --debug don't remove temporary files
26267 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026268 --file=FILE[:TEMPLATE]
26269 instantiate the configuration file FILE
26270 --header=FILE[:TEMPLATE]
26271 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026272
26273Configuration files:
26274$config_files
26275
26276Configuration headers:
26277$config_headers
26278
26279Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026281_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026282cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026283ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026284python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026285configured by $0, generated by GNU Autoconf 2.61,
26286 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026287
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026288Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026289This config.status script is free software; the Free Software Foundation
26290gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291
26292ac_pwd='$ac_pwd'
26293srcdir='$srcdir'
26294INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026295_ACEOF
26296
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026297cat >>$CONFIG_STATUS <<\_ACEOF
26298# If no file are specified by the user, then we need to provide default
26299# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026300ac_need_defaults=:
26301while test $# != 0
26302do
26303 case $1 in
26304 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026305 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26306 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026307 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026308 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026309 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026310 ac_option=$1
26311 ac_optarg=$2
26312 ac_shift=shift
26313 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026314 esac
26315
Skip Montanaro6dead952003-09-25 14:50:04 +000026316 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026317 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026318 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26319 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026320 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026321 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026322 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026323 debug=: ;;
26324 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026325 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026326 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026327 ac_need_defaults=false;;
26328 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026329 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026330 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026331 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026332 --he | --h)
26333 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026334 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026335Try \`$0 --help' for more information." >&2
26336 { (exit 1); exit 1; }; };;
26337 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026338 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026339 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26340 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26341 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026342
26343 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026344 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026345Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026346 { (exit 1); exit 1; }; } ;;
26347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026348 *) ac_config_targets="$ac_config_targets $1"
26349 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026350
26351 esac
26352 shift
26353done
26354
Skip Montanaro6dead952003-09-25 14:50:04 +000026355ac_configure_extra_args=
26356
26357if $ac_cs_silent; then
26358 exec 6>/dev/null
26359 ac_configure_extra_args="$ac_configure_extra_args --silent"
26360fi
26361
26362_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026363cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026364if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026365 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26366 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026367 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026368 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026369fi
26370
Martin v. Löwis11437992002-04-12 09:54:03 +000026371_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026372cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026373exec 5>>config.log
26374{
26375 echo
26376 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26377## Running $as_me. ##
26378_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026379 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026380} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026382_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026383cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026384_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026385
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026386cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026387
26388# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026389for ac_config_target in $ac_config_targets
26390do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026391 case $ac_config_target in
26392 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26393 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26394 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026395 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26396 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026397 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26398 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026399 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026400
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026401 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26402echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026403 { (exit 1); exit 1; }; };;
26404 esac
26405done
26406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026407
Martin v. Löwis11437992002-04-12 09:54:03 +000026408# If the user did not use the arguments to specify the items to instantiate,
26409# then the envvar interface is used. Set only those that are not.
26410# We use the long form for the default assignment because of an extremely
26411# bizarre bug on SunOS 4.1.3.
26412if $ac_need_defaults; then
26413 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26414 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26415fi
26416
Skip Montanaro6dead952003-09-25 14:50:04 +000026417# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026418# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026419# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026420# Hook for its removal unless debugging.
26421# Note that there is a small window in which the directory will not be cleaned:
26422# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026423$debug ||
26424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026425 tmp=
26426 trap 'exit_status=$?
26427 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26428' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026429 trap '{ (exit 1); exit 1; }' 1 2 13 15
26430}
Martin v. Löwis11437992002-04-12 09:54:03 +000026431# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026432
Martin v. Löwis11437992002-04-12 09:54:03 +000026433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026434 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026435 test -n "$tmp" && test -d "$tmp"
26436} ||
26437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026438 tmp=./conf$$-$RANDOM
26439 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026440} ||
26441{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026442 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026443 { (exit 1); exit 1; }
26444}
26445
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026446#
26447# Set up the sed scripts for CONFIG_FILES section.
26448#
26449
26450# No need to generate the scripts if there are no CONFIG_FILES.
26451# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026452if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026453
26454_ACEOF
26455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026456
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026458ac_delim='%!_!# '
26459for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026460 cat >conf$$subs.sed <<_ACEOF
26461SHELL!$SHELL$ac_delim
26462PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26463PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26464PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26465PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26466PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26467PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26468exec_prefix!$exec_prefix$ac_delim
26469prefix!$prefix$ac_delim
26470program_transform_name!$program_transform_name$ac_delim
26471bindir!$bindir$ac_delim
26472sbindir!$sbindir$ac_delim
26473libexecdir!$libexecdir$ac_delim
26474datarootdir!$datarootdir$ac_delim
26475datadir!$datadir$ac_delim
26476sysconfdir!$sysconfdir$ac_delim
26477sharedstatedir!$sharedstatedir$ac_delim
26478localstatedir!$localstatedir$ac_delim
26479includedir!$includedir$ac_delim
26480oldincludedir!$oldincludedir$ac_delim
26481docdir!$docdir$ac_delim
26482infodir!$infodir$ac_delim
26483htmldir!$htmldir$ac_delim
26484dvidir!$dvidir$ac_delim
26485pdfdir!$pdfdir$ac_delim
26486psdir!$psdir$ac_delim
26487libdir!$libdir$ac_delim
26488localedir!$localedir$ac_delim
26489mandir!$mandir$ac_delim
26490DEFS!$DEFS$ac_delim
26491ECHO_C!$ECHO_C$ac_delim
26492ECHO_N!$ECHO_N$ac_delim
26493ECHO_T!$ECHO_T$ac_delim
26494LIBS!$LIBS$ac_delim
26495build_alias!$build_alias$ac_delim
26496host_alias!$host_alias$ac_delim
26497target_alias!$target_alias$ac_delim
26498VERSION!$VERSION$ac_delim
26499SOVERSION!$SOVERSION$ac_delim
26500CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26501UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26502ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26503PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26504PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26505PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26506PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26507PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26508FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26509FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26510FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26511FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26512FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26513MACHDEP!$MACHDEP$ac_delim
26514SGI_ABI!$SGI_ABI$ac_delim
26515CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26516EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26517CC!$CC$ac_delim
26518CFLAGS!$CFLAGS$ac_delim
26519LDFLAGS!$LDFLAGS$ac_delim
26520CPPFLAGS!$CPPFLAGS$ac_delim
26521ac_ct_CC!$ac_ct_CC$ac_delim
26522EXEEXT!$EXEEXT$ac_delim
26523OBJEXT!$OBJEXT$ac_delim
26524CXX!$CXX$ac_delim
26525MAINCC!$MAINCC$ac_delim
26526CPP!$CPP$ac_delim
26527GREP!$GREP$ac_delim
26528EGREP!$EGREP$ac_delim
26529BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26530LIBRARY!$LIBRARY$ac_delim
26531LDLIBRARY!$LDLIBRARY$ac_delim
26532DLLLIBRARY!$DLLLIBRARY$ac_delim
26533BLDLIBRARY!$BLDLIBRARY$ac_delim
26534LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26535INSTSONAME!$INSTSONAME$ac_delim
26536RUNSHARED!$RUNSHARED$ac_delim
26537LINKCC!$LINKCC$ac_delim
26538GNULD!$GNULD$ac_delim
26539RANLIB!$RANLIB$ac_delim
26540AR!$AR$ac_delim
26541ARFLAGS!$ARFLAGS$ac_delim
26542SVNVERSION!$SVNVERSION$ac_delim
26543INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26544INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26545INSTALL_DATA!$INSTALL_DATA$ac_delim
26546LN!$LN$ac_delim
26547OPT!$OPT$ac_delim
26548BASECFLAGS!$BASECFLAGS$ac_delim
26549UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26550OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26551LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26552SO!$SO$ac_delim
26553LDSHARED!$LDSHARED$ac_delim
26554BLDSHARED!$BLDSHARED$ac_delim
26555CCSHARED!$CCSHARED$ac_delim
26556LINKFORSHARED!$LINKFORSHARED$ac_delim
26557CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26558_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026560 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026561 break
26562 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026563 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26564echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026565 { (exit 1); exit 1; }; }
26566 else
26567 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026568 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569done
26570
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026571ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26572if test -n "$ac_eof"; then
26573 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26574 ac_eof=`expr $ac_eof + 1`
26575fi
26576
26577cat >>$CONFIG_STATUS <<_ACEOF
26578cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26579/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026580_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026581sed '
26582s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26583s/^/s,@/; s/!/@,|#_!!_#|/
26584:n
26585t n
26586s/'"$ac_delim"'$/,g/; t
26587s/$/\\/; p
26588N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26589' >>$CONFIG_STATUS <conf$$subs.sed
26590rm -f conf$$subs.sed
26591cat >>$CONFIG_STATUS <<_ACEOF
26592CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026593_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026594
26595
26596ac_delim='%!_!# '
26597for ac_last_try in false false false false false :; do
26598 cat >conf$$subs.sed <<_ACEOF
26599SHLIBS!$SHLIBS$ac_delim
26600USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26601SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26602USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26603LDLAST!$LDLAST$ac_delim
26604THREADOBJ!$THREADOBJ$ac_delim
26605DLINCLDIR!$DLINCLDIR$ac_delim
26606DYNLOADFILE!$DYNLOADFILE$ac_delim
26607MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26608TRUE!$TRUE$ac_delim
26609LIBOBJS!$LIBOBJS$ac_delim
26610HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26611HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26612HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26613HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26614HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26615LIBM!$LIBM$ac_delim
26616LIBC!$LIBC$ac_delim
26617THREADHEADERS!$THREADHEADERS$ac_delim
26618SRCDIRS!$SRCDIRS$ac_delim
26619LTLIBOBJS!$LTLIBOBJS$ac_delim
26620_ACEOF
26621
26622 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26623 break
26624 elif $ac_last_try; then
26625 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26626echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026627 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026628 else
26629 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26630 fi
26631done
26632
26633ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26634if test -n "$ac_eof"; then
26635 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26636 ac_eof=`expr $ac_eof + 1`
26637fi
26638
26639cat >>$CONFIG_STATUS <<_ACEOF
26640cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26641/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026642_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026643sed '
26644s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26645s/^/s,@/; s/!/@,|#_!!_#|/
26646:n
26647t n
26648s/'"$ac_delim"'$/,g/; t
26649s/$/\\/; p
26650N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26651' >>$CONFIG_STATUS <conf$$subs.sed
26652rm -f conf$$subs.sed
26653cat >>$CONFIG_STATUS <<_ACEOF
26654:end
26655s/|#_!!_#|//g
26656CEOF$ac_eof
26657_ACEOF
26658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026659
26660# VPATH may cause trouble with some makes, so we remove $(srcdir),
26661# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26662# trailing colons and then remove the whole line if VPATH becomes empty
26663# (actually we leave an empty line to preserve line numbers).
26664if test "x$srcdir" = x.; then
26665 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26666s/:*\$(srcdir):*/:/
26667s/:*\${srcdir}:*/:/
26668s/:*@srcdir@:*/:/
26669s/^\([^=]*=[ ]*\):*/\1/
26670s/:*$//
26671s/^[^=]*=[ ]*$//
26672}'
26673fi
26674
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026675cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026676fi # test -n "$CONFIG_FILES"
26677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026678
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026679for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026680do
26681 case $ac_tag in
26682 :[FHLC]) ac_mode=$ac_tag; continue;;
26683 esac
26684 case $ac_mode$ac_tag in
26685 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026686 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26687echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026688 { (exit 1); exit 1; }; };;
26689 :[FH]-) ac_tag=-:-;;
26690 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26691 esac
26692 ac_save_IFS=$IFS
26693 IFS=:
26694 set x $ac_tag
26695 IFS=$ac_save_IFS
26696 shift
26697 ac_file=$1
26698 shift
26699
26700 case $ac_mode in
26701 :L) ac_source=$1;;
26702 :[FH])
26703 ac_file_inputs=
26704 for ac_f
26705 do
26706 case $ac_f in
26707 -) ac_f="$tmp/stdin";;
26708 *) # Look for the file first in the build tree, then in the source tree
26709 # (if the path is not absolute). The absolute path cannot be DOS-style,
26710 # because $ac_f cannot contain `:'.
26711 test -f "$ac_f" ||
26712 case $ac_f in
26713 [\\/$]*) false;;
26714 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26715 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026716 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26717echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026718 { (exit 1); exit 1; }; };;
26719 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026720 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026721 done
26722
26723 # Let's still pretend it is `configure' which instantiates (i.e., don't
26724 # use $as_me), people would be surprised to read:
26725 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026726 configure_input="Generated from "`IFS=:
26727 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026728 if test x"$ac_file" != x-; then
26729 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026730 { echo "$as_me:$LINENO: creating $ac_file" >&5
26731echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026732 fi
26733
26734 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026735 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026736 esac
26737 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026738 esac
26739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026740 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026741$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026742 X"$ac_file" : 'X\(//\)[^/]' \| \
26743 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026744 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026745echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026746 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26747 s//\1/
26748 q
26749 }
26750 /^X\(\/\/\)[^/].*/{
26751 s//\1/
26752 q
26753 }
26754 /^X\(\/\/\)$/{
26755 s//\1/
26756 q
26757 }
26758 /^X\(\/\).*/{
26759 s//\1/
26760 q
26761 }
26762 s/.*/./; q'`
26763 { as_dir="$ac_dir"
26764 case $as_dir in #(
26765 -*) as_dir=./$as_dir;;
26766 esac
26767 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026768 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026769 while :; do
26770 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026771 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026772 *) as_qdir=$as_dir;;
26773 esac
26774 as_dirs="'$as_qdir' $as_dirs"
26775 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026776$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026777 X"$as_dir" : 'X\(//\)[^/]' \| \
26778 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026779 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026780echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026781 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26782 s//\1/
26783 q
26784 }
26785 /^X\(\/\/\)[^/].*/{
26786 s//\1/
26787 q
26788 }
26789 /^X\(\/\/\)$/{
26790 s//\1/
26791 q
26792 }
26793 /^X\(\/\).*/{
26794 s//\1/
26795 q
26796 }
26797 s/.*/./; q'`
26798 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026801 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26802echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026803 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026804 ac_builddir=.
26805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026806case "$ac_dir" in
26807.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26808*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026809 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026810 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026811 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026812 case $ac_top_builddir_sub in
26813 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26814 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26815 esac ;;
26816esac
26817ac_abs_top_builddir=$ac_pwd
26818ac_abs_builddir=$ac_pwd$ac_dir_suffix
26819# for backward compatibility:
26820ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026821
26822case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026823 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026824 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026825 ac_top_srcdir=$ac_top_builddir_sub
26826 ac_abs_top_srcdir=$ac_pwd ;;
26827 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026828 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026829 ac_top_srcdir=$srcdir
26830 ac_abs_top_srcdir=$srcdir ;;
26831 *) # Relative name.
26832 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26833 ac_top_srcdir=$ac_top_build_prefix$srcdir
26834 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026835esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026836ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026837
Martin v. Löwis11437992002-04-12 09:54:03 +000026838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026839 case $ac_mode in
26840 :F)
26841 #
26842 # CONFIG_FILE
26843 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026844
26845 case $INSTALL in
26846 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026847 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026848 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026849_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026850
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026851cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026852# If the template does not know about datarootdir, expand it.
26853# FIXME: This hack should be removed a few years after 2.60.
26854ac_datarootdir_hack=; ac_datarootdir_seen=
26855
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026856case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026857 p
26858 q
26859}
26860/@datadir@/p
26861/@docdir@/p
26862/@infodir@/p
26863/@localedir@/p
26864/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026865' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026866*datarootdir*) ac_datarootdir_seen=yes;;
26867*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026868 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26869echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026870_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026871cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026872 ac_datarootdir_hack='
26873 s&@datadir@&$datadir&g
26874 s&@docdir@&$docdir&g
26875 s&@infodir@&$infodir&g
26876 s&@localedir@&$localedir&g
26877 s&@mandir@&$mandir&g
26878 s&\\\${datarootdir}&$datarootdir&g' ;;
26879esac
26880_ACEOF
26881
26882# Neutralize VPATH when `$srcdir' = `.'.
26883# Shell code in configure.ac might set extrasub.
26884# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026885cat >>$CONFIG_STATUS <<_ACEOF
26886 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026887$extrasub
26888_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026889cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026890:t
26891/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026892s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026893s&@top_builddir@&$ac_top_builddir_sub&;t t
26894s&@srcdir@&$ac_srcdir&;t t
26895s&@abs_srcdir@&$ac_abs_srcdir&;t t
26896s&@top_srcdir@&$ac_top_srcdir&;t t
26897s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26898s&@builddir@&$ac_builddir&;t t
26899s&@abs_builddir@&$ac_abs_builddir&;t t
26900s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26901s&@INSTALL@&$ac_INSTALL&;t t
26902$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026903" $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 +000026904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026905test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26906 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26907 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026908 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026909which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026910echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026911which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026913 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026914 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026915 -) cat "$tmp/out"; rm -f "$tmp/out";;
26916 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26917 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026918 ;;
26919 :H)
26920 #
26921 # CONFIG_HEADER
26922 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026923_ACEOF
26924
26925# Transform confdefs.h into a sed script `conftest.defines', that
26926# substitutes the proper values into config.h.in to produce config.h.
26927rm -f conftest.defines conftest.tail
26928# First, append a space to every undef/define line, to ease matching.
26929echo 's/$/ /' >conftest.defines
26930# Then, protect against being on the right side of a sed subst, or in
26931# an unquoted here document, in config.status. If some macros were
26932# called several times there might be several #defines for the same
26933# symbol, which is useless. But do not sort them, since the last
26934# AC_DEFINE must be honored.
26935ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26936# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26937# NAME is the cpp macro being defined, VALUE is the value it is being given.
26938# PARAMS is the parameter list in the macro definition--in most cases, it's
26939# just an empty string.
26940ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26941ac_dB='\\)[ (].*,\\1define\\2'
26942ac_dC=' '
26943ac_dD=' ,'
26944
26945uniq confdefs.h |
26946 sed -n '
26947 t rset
26948 :rset
26949 s/^[ ]*#[ ]*define[ ][ ]*//
26950 t ok
26951 d
26952 :ok
26953 s/[\\&,]/\\&/g
26954 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26955 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26956 ' >>conftest.defines
26957
26958# Remove the space that was appended to ease matching.
26959# Then replace #undef with comments. This is necessary, for
26960# example, in the case of _POSIX_SOURCE, which is predefined and required
26961# on some systems where configure will not decide to define it.
26962# (The regexp can be short, since the line contains either #define or #undef.)
26963echo 's/ $//
26964s,^[ #]*u.*,/* & */,' >>conftest.defines
26965
26966# Break up conftest.defines:
26967ac_max_sed_lines=50
26968
26969# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26970# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26971# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26972# et cetera.
26973ac_in='$ac_file_inputs'
26974ac_out='"$tmp/out1"'
26975ac_nxt='"$tmp/out2"'
26976
26977while :
26978do
26979 # Write a here document:
26980 cat >>$CONFIG_STATUS <<_ACEOF
26981 # First, check the format of the line:
26982 cat >"\$tmp/defines.sed" <<\\CEOF
26983/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26984/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26985b
26986:def
26987_ACEOF
26988 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26989 echo 'CEOF
26990 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26991 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26992 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26993 grep . conftest.tail >/dev/null || break
26994 rm -f conftest.defines
26995 mv conftest.tail conftest.defines
26996done
26997rm -f conftest.defines conftest.tail
26998
26999echo "ac_result=$ac_in" >>$CONFIG_STATUS
27000cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027001 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027002 echo "/* $configure_input */" >"$tmp/config.h"
27003 cat "$ac_result" >>"$tmp/config.h"
27004 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27005 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27006echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027007 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027008 rm -f $ac_file
27009 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027010 fi
27011 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027012 echo "/* $configure_input */"
27013 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027014 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027015 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027016 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018
27019 esac
27020
27021done # for ac_tag
27022
Guido van Rossum627b2d71993-12-24 10:39:16 +000027023
Martin v. Löwis11437992002-04-12 09:54:03 +000027024{ (exit 0); exit 0; }
27025_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027026chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027027ac_clean_files=$ac_clean_files_save
27028
27029
27030# configure is writing to config.log, and then calls config.status.
27031# config.status does its own redirection, appending to config.log.
27032# Unfortunately, on DOS this fails, as config.log is still kept open
27033# by configure, so config.status won't be able to write to it; its
27034# output is simply discarded. So we exec the FD to /dev/null,
27035# effectively closing config.log, so it can be properly (re)opened and
27036# appended to by config.status. When coming back to configure, we
27037# need to make the FD available again.
27038if test "$no_create" != yes; then
27039 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027040 ac_config_status_args=
27041 test "$silent" = yes &&
27042 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027043 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027044 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027045 exec 5>>config.log
27046 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27047 # would make configure fail if this is the last instruction.
27048 $ac_cs_success || { (exit 1); exit 1; }
27049fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027050
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027051
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027052echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027053if test ! -f Modules/Setup
27054then
27055 cp $srcdir/Modules/Setup.dist Modules/Setup
27056fi
27057
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027058echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027059if test ! -f Modules/Setup.local
27060then
27061 echo "# Edit this file for local setup changes" >Modules/Setup.local
27062fi
27063
27064echo "creating Makefile"
27065$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27066 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027067 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027068mv config.c Modules