blob: 5253b8614103dcdd99846f225ded777caa08b46f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002# From configure.in Revision: 78197 .
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.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002109 # In addition, Stefan Krah confirms that issue #1244610 exists through
2110 # OpenBSD 4.6, but is fixed in 4.7.
2111 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002112 define_xopen_source=no
2113 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2114 # also defined. This can be overridden by defining _BSD_SOURCE
2115 # As this has a different meaning on Linux, only define it on OpenBSD
2116
2117cat >>confdefs.h <<\_ACEOF
2118#define _BSD_SOURCE 1
2119_ACEOF
2120
2121 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002122 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002123 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2124 # also defined. This can be overridden by defining _BSD_SOURCE
2125 # As this has a different meaning on Linux, only define it on OpenBSD
2126
2127cat >>confdefs.h <<\_ACEOF
2128#define _BSD_SOURCE 1
2129_ACEOF
2130
2131 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002132 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2133 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2134 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002135 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 +00002136 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002137 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2138 # of union __?sigval. Reported by Stuart Bishop.
2139 SunOS/5.6)
2140 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002141 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2142 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002143 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002144 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002145 define_xopen_source=no;;
2146 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002147 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002148 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002149 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002150 # On FreeBSD 4, the math functions C89 does not cover are never defined
2151 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2152 FreeBSD/4.*)
2153 define_xopen_source=no;;
2154 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2155 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2156 # identifies itself as Darwin/7.*
2157 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2158 # disables platform specific features beyond repair.
2159 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2160 # has no effect, don't bother defining them
2161 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002162 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002163 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2164 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2165 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002166 AIX/4)
2167 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002168 AIX/5)
2169 if test `uname -r` -eq 1; then
2170 define_xopen_source=no
2171 fi
2172 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002173 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2174 # defining NI_NUMERICHOST.
2175 QNX/6.3.2)
2176 define_xopen_source=no
2177 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002178
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002179esac
2180
2181if test $define_xopen_source = yes
2182then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2184 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002185 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2186 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002187 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002188 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002189
2190cat >>confdefs.h <<\_ACEOF
2191#define _XOPEN_SOURCE 500
2192_ACEOF
2193
2194 ;;
2195 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196
2197cat >>confdefs.h <<\_ACEOF
2198#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002199_ACEOF
2200
Skip Montanarof0d5f792004-08-15 14:08:23 +00002201 ;;
2202 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002203
2204 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2205 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2206 # several APIs are not declared. Since this is also needed in some
2207 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002208 # except for Solaris 10, where it must not be defined,
2209 # as it implies XPG4.2
2210 case $ac_sys_system/$ac_sys_release in
2211 SunOS/5.10)
2212 ;;
2213 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002214
2215cat >>confdefs.h <<\_ACEOF
2216#define _XOPEN_SOURCE_EXTENDED 1
2217_ACEOF
2218
Martin v. Löwis7dece662005-11-26 11:38:24 +00002219 ;;
2220 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002221
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002222
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002223cat >>confdefs.h <<\_ACEOF
2224#define _POSIX_C_SOURCE 200112L
2225_ACEOF
2226
2227
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002228fi
2229
Guido van Rossum91922671997-10-09 20:24:13 +00002230#
2231# SGI compilers allow the specification of the both the ABI and the
2232# ISA on the command line. Depending on the values of these switches,
2233# different and often incompatable code will be generated.
2234#
2235# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2236# thus supply support for various ABI/ISA combinations. The MACHDEP
2237# variable is also adjusted.
2238#
2239
2240if test ! -z "$SGI_ABI"
2241then
2242 CC="cc $SGI_ABI"
2243 LDFLAGS="$SGI_ABI $LDFLAGS"
2244 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2245fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002246{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2247echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002248
Jack Jansen6b08a402004-06-03 12:41:45 +00002249# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2250# it may influence the way we can build extensions, so distutils
2251# needs to check it
2252
Thomas Wouters477c8d52006-05-27 19:21:47 +00002253
Jack Jansen6b08a402004-06-03 12:41:45 +00002254CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002255EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002256
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002257{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2258echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002259ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002260{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2261echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002262
Guido van Rossum627b2d71993-12-24 10:39:16 +00002263# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002264
2265# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2266# for debug/optimization stuff. BASECFLAGS is for flags that are required
2267# just to get things to compile and link. Users are free to override OPT
2268# when running configure or make. The build should not break if they do.
2269# BASECFLAGS should generally not be messed with, however.
2270
2271# XXX shouldn't some/most/all of this code be merged with the stuff later
2272# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002273{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2274echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002276# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002277if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002278 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002280 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002281 without_gcc=yes;;
2282 yes) CC=gcc
2283 without_gcc=no;;
2284 *) CC=$withval
2285 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002286 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002287else
Martin v. Löwis11437992002-04-12 09:54:03 +00002288
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002289 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002290 AIX*) CC=cc_r
2291 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002292 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002293 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002294fi
2295
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002296{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2297echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002298
Guido van Rossum8b131c51995-03-09 14:10:13 +00002299# If the user switches compilers, we can't believe the cache
2300if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2301then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002302 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002303(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002304echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002305(it is also a good idea to do 'make clean' before compiling)" >&2;}
2306 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002307fi
2308
Martin v. Löwis11437992002-04-12 09:54:03 +00002309ac_ext=c
2310ac_cpp='$CPP $CPPFLAGS'
2311ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314if test -n "$ac_tool_prefix"; then
2315 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2316set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002317{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002319if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002321else
2322 if test -n "$CC"; then
2323 ac_cv_prog_CC="$CC" # Let the user override the test.
2324else
Martin v. Löwis11437992002-04-12 09:54:03 +00002325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2326for as_dir in $PATH
2327do
2328 IFS=$as_save_IFS
2329 test -z "$as_dir" && as_dir=.
2330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002331 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 +00002332 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 break 2
2335 fi
2336done
2337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002339
Jack Jansendd19cf82001-12-06 22:36:17 +00002340fi
2341fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002342CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002343if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002344 { echo "$as_me:$LINENO: result: $CC" >&5
2345echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002346else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002347 { echo "$as_me:$LINENO: result: no" >&5
2348echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002349fi
2350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351
Martin v. Löwis11437992002-04-12 09:54:03 +00002352fi
2353if test -z "$ac_cv_prog_CC"; then
2354 ac_ct_CC=$CC
2355 # Extract the first word of "gcc", so it can be a program name with args.
2356set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002357{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002359if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002361else
2362 if test -n "$ac_ct_CC"; then
2363 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2364else
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
2370 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371 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 +00002372 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002373 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002374 break 2
2375 fi
2376done
2377done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380fi
2381fi
2382ac_ct_CC=$ac_cv_prog_ac_ct_CC
2383if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002384 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2385echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002386else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002387 { echo "$as_me:$LINENO: result: no" >&5
2388echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002389fi
2390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391 if test "x$ac_ct_CC" = x; then
2392 CC=""
2393 else
2394 case $cross_compiling:$ac_tool_warned in
2395yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002396{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2397whose name does not start with the host triplet. If you think this
2398configuration is useful to you, please write to autoconf@gnu.org." >&5
2399echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2400whose name does not start with the host triplet. If you think this
2401configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402ac_tool_warned=yes ;;
2403esac
2404 CC=$ac_ct_CC
2405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002406else
2407 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002408fi
2409
Jack Jansendd19cf82001-12-06 22:36:17 +00002410if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 if test -n "$ac_tool_prefix"; then
2412 # 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 +00002413set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002414{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2415echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002417 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002418else
2419 if test -n "$CC"; then
2420 ac_cv_prog_CC="$CC" # Let the user override the test.
2421else
Martin v. Löwis11437992002-04-12 09:54:03 +00002422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2423for as_dir in $PATH
2424do
2425 IFS=$as_save_IFS
2426 test -z "$as_dir" && as_dir=.
2427 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428 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 +00002429 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 break 2
2432 fi
2433done
2434done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437fi
2438fi
2439CC=$ac_cv_prog_CC
2440if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002441 { echo "$as_me:$LINENO: result: $CC" >&5
2442echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002443else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002444 { echo "$as_me:$LINENO: result: no" >&5
2445echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002446fi
2447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002450fi
2451if test -z "$CC"; then
2452 # Extract the first word of "cc", so it can be a program name with args.
2453set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002454{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002456if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002458else
2459 if test -n "$CC"; then
2460 ac_cv_prog_CC="$CC" # Let the user override the test.
2461else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2464for as_dir in $PATH
2465do
2466 IFS=$as_save_IFS
2467 test -z "$as_dir" && as_dir=.
2468 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 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 +00002470 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2471 ac_prog_rejected=yes
2472 continue
2473 fi
2474 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002475 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 break 2
2477 fi
2478done
2479done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002481
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482if test $ac_prog_rejected = yes; then
2483 # We found a bogon in the path, so make sure we never use it.
2484 set dummy $ac_cv_prog_CC
2485 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002487 # We chose a different compiler from the bogus one.
2488 # However, it has the same basename, so the bogon will be chosen
2489 # first if we set CC to just the basename; use the full file name.
2490 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 fi
2493fi
2494fi
2495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002496CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002498 { echo "$as_me:$LINENO: result: $CC" >&5
2499echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002501 { echo "$as_me:$LINENO: result: no" >&5
2502echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002503fi
2504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505
Martin v. Löwis11437992002-04-12 09:54:03 +00002506fi
2507if test -z "$CC"; then
2508 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 do
2511 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2512set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002513{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2514echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002515if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002517else
2518 if test -n "$CC"; then
2519 ac_cv_prog_CC="$CC" # Let the user override the test.
2520else
Martin v. Löwis11437992002-04-12 09:54:03 +00002521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2522for as_dir in $PATH
2523do
2524 IFS=$as_save_IFS
2525 test -z "$as_dir" && as_dir=.
2526 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 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 +00002528 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002529 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002532done
2533done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002535
2536fi
2537fi
2538CC=$ac_cv_prog_CC
2539if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002540 { echo "$as_me:$LINENO: result: $CC" >&5
2541echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002542else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002543 { echo "$as_me:$LINENO: result: no" >&5
2544echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002545fi
2546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 test -n "$CC" && break
2549 done
2550fi
2551if test -z "$CC"; then
2552 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002554do
2555 # Extract the first word of "$ac_prog", so it can be a program name with args.
2556set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002557{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2558echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002559if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002561else
2562 if test -n "$ac_ct_CC"; then
2563 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2564else
2565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2566for as_dir in $PATH
2567do
2568 IFS=$as_save_IFS
2569 test -z "$as_dir" && as_dir=.
2570 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 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 +00002572 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002573 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 break 2
2575 fi
2576done
2577done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580fi
2581fi
2582ac_ct_CC=$ac_cv_prog_ac_ct_CC
2583if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002584 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2585echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002587 { echo "$as_me:$LINENO: result: no" >&5
2588echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002589fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 test -n "$ac_ct_CC" && break
2593done
Michael W. Hudson54241132001-12-07 15:38:26 +00002594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 if test "x$ac_ct_CC" = x; then
2596 CC=""
2597 else
2598 case $cross_compiling:$ac_tool_warned in
2599yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002600{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2601whose name does not start with the host triplet. If you think this
2602configuration is useful to you, please write to autoconf@gnu.org." >&5
2603echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2604whose name does not start with the host triplet. If you think this
2605configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606ac_tool_warned=yes ;;
2607esac
2608 CC=$ac_ct_CC
2609 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
2611
2612fi
2613
2614
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002615test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002616See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002617echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002618See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002619 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
2621# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002622echo "$as_me:$LINENO: checking for C compiler version" >&5
2623ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624{ (ac_try="$ac_compiler --version >&5"
2625case "(($ac_try" in
2626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627 *) ac_try_echo=$ac_try;;
2628esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634{ (ac_try="$ac_compiler -v >&5"
2635case "(($ac_try" in
2636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2637 *) ac_try_echo=$ac_try;;
2638esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644{ (ac_try="$ac_compiler -V >&5"
2645case "(($ac_try" in
2646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647 *) ac_try_echo=$ac_try;;
2648esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 (exit $ac_status); }
2654
2655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002656/* confdefs.h. */
2657_ACEOF
2658cat confdefs.h >>conftest.$ac_ext
2659cat >>conftest.$ac_ext <<_ACEOF
2660/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662int
2663main ()
2664{
2665
2666 ;
2667 return 0;
2668}
2669_ACEOF
2670ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002671ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002672# Try to create an executable without -o first, disregard a.out.
2673# It will help us diagnose broken compilers, and finding out an intuition
2674# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002675{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2676echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2677ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2678#
2679# List of possible output files, starting from the most likely.
2680# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2681# only as a last resort. b.out is created by i960 compilers.
2682ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2683#
2684# The IRIX 6 linker writes into existing files which may not be
2685# executable, retaining their permissions. Remove them first so a
2686# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687ac_rmfiles=
2688for ac_file in $ac_files
2689do
2690 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002691 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2693 esac
2694done
2695rm -f $ac_rmfiles
2696
2697if { (ac_try="$ac_link_default"
2698case "(($ac_try" in
2699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700 *) ac_try_echo=$ac_try;;
2701esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2708# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2709# in a Makefile. We should not override ac_cv_exeext if it was cached,
2710# so that the user can short-circuit this test for compilers unknown to
2711# Autoconf.
2712for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002713do
2714 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002716 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002717 ;;
2718 [ab].out )
2719 # We found the default executable, but exeext='' is most
2720 # certainly right.
2721 break;;
2722 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2724 then :; else
2725 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2726 fi
2727 # We set ac_cv_exeext here because the later test for it is not
2728 # safe: cross compilers may not add the suffix if given an `-o'
2729 # argument, so we may need to know it at that point already.
2730 # Even if this section looks crufty: it has the advantage of
2731 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002732 break;;
2733 * )
2734 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 esac
2736done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737test "$ac_cv_exeext" = no && ac_cv_exeext=
2738
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002739else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740 ac_file=''
2741fi
2742
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002743{ echo "$as_me:$LINENO: result: $ac_file" >&5
2744echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002747sed 's/^/| /' conftest.$ac_ext >&5
2748
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002749{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002750See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002751echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002752See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002753 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002755
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002756ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002758# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002759# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002760{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2761echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002762# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2763# If not cross compiling, check that we can run a simple program.
2764if test "$cross_compiling" != yes; then
2765 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766 { (case "(($ac_try" in
2767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2768 *) ac_try_echo=$ac_try;;
2769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 (exit $ac_status); }; }; then
2775 cross_compiling=no
2776 else
2777 if test "$cross_compiling" = maybe; then
2778 cross_compiling=yes
2779 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002780 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002781If you meant to cross compile, use \`--host'.
2782See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002783echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002784If you meant to cross compile, use \`--host'.
2785See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002786 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 fi
2788 fi
2789fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002790{ echo "$as_me:$LINENO: result: yes" >&5
2791echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002792
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002793rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002795# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002796# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002797{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2798echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2799{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2800echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002801
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002802{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2803echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002804if { (ac_try="$ac_link"
2805case "(($ac_try" in
2806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2807 *) ac_try_echo=$ac_try;;
2808esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002814 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2815# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2816# work properly (i.e., refer to `conftest.exe'), while it won't with
2817# `rm'.
2818for ac_file in conftest.exe conftest conftest.*; do
2819 test -f "$ac_file" || continue
2820 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002821 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002822 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2823 break;;
2824 * ) break;;
2825 esac
2826done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002828 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002829See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002830echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002831See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002832 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002833fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002834
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002835rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002836{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2837echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002838
2839rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002840EXEEXT=$ac_cv_exeext
2841ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002842{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2843echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002844if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002845 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002846else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002847 cat >conftest.$ac_ext <<_ACEOF
2848/* confdefs.h. */
2849_ACEOF
2850cat confdefs.h >>conftest.$ac_ext
2851cat >>conftest.$ac_ext <<_ACEOF
2852/* end confdefs.h. */
2853
2854int
2855main ()
2856{
2857
2858 ;
2859 return 0;
2860}
2861_ACEOF
2862rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002863if { (ac_try="$ac_compile"
2864case "(($ac_try" in
2865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2866 *) ac_try_echo=$ac_try;;
2867esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002873 for ac_file in conftest.o conftest.obj conftest.*; do
2874 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002876 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2878 break;;
2879 esac
2880done
2881else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002883sed 's/^/| /' conftest.$ac_ext >&5
2884
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002885{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002886See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002887echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002888See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002889 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002890fi
2891
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002892rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002893fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002894{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2895echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002896OBJEXT=$ac_cv_objext
2897ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002898{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2899echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002900if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002901 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002902else
2903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002904/* confdefs.h. */
2905_ACEOF
2906cat confdefs.h >>conftest.$ac_ext
2907cat >>conftest.$ac_ext <<_ACEOF
2908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002909
Martin v. Löwis11437992002-04-12 09:54:03 +00002910int
2911main ()
2912{
2913#ifndef __GNUC__
2914 choke me
2915#endif
2916
2917 ;
2918 return 0;
2919}
2920_ACEOF
2921rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002922if { (ac_try="$ac_compile"
2923case "(($ac_try" in
2924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2925 *) ac_try_echo=$ac_try;;
2926esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002930 grep -v '^ *+' conftest.er1 >conftest.err
2931 rm -f conftest.er1
2932 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934 (exit $ac_status); } && {
2935 test -z "$ac_c_werror_flag" ||
2936 test ! -s conftest.err
2937 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 ac_compiler_gnu=yes
2939else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002941sed 's/^/| /' conftest.$ac_ext >&5
2942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945
2946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002947ac_cv_c_compiler_gnu=$ac_compiler_gnu
2948
2949fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002950{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2951echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2952GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002953ac_test_CFLAGS=${CFLAGS+set}
2954ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002955{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2956echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002957if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002959else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002960 ac_save_c_werror_flag=$ac_c_werror_flag
2961 ac_c_werror_flag=yes
2962 ac_cv_prog_cc_g=no
2963 CFLAGS="-g"
2964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002965/* confdefs.h. */
2966_ACEOF
2967cat confdefs.h >>conftest.$ac_ext
2968cat >>conftest.$ac_ext <<_ACEOF
2969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002970
Martin v. Löwis11437992002-04-12 09:54:03 +00002971int
2972main ()
2973{
2974
2975 ;
2976 return 0;
2977}
2978_ACEOF
2979rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002980if { (ac_try="$ac_compile"
2981case "(($ac_try" in
2982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2983 *) ac_try_echo=$ac_try;;
2984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002988 grep -v '^ *+' conftest.er1 >conftest.err
2989 rm -f conftest.er1
2990 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002992 (exit $ac_status); } && {
2993 test -z "$ac_c_werror_flag" ||
2994 test ! -s conftest.err
2995 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002996 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002997else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002999sed 's/^/| /' conftest.$ac_ext >&5
3000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001 CFLAGS=""
3002 cat >conftest.$ac_ext <<_ACEOF
3003/* confdefs.h. */
3004_ACEOF
3005cat confdefs.h >>conftest.$ac_ext
3006cat >>conftest.$ac_ext <<_ACEOF
3007/* end confdefs.h. */
3008
3009int
3010main ()
3011{
3012
3013 ;
3014 return 0;
3015}
3016_ACEOF
3017rm -f conftest.$ac_objext
3018if { (ac_try="$ac_compile"
3019case "(($ac_try" in
3020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021 *) ac_try_echo=$ac_try;;
3022esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024 (eval "$ac_compile") 2>conftest.er1
3025 ac_status=$?
3026 grep -v '^ *+' conftest.er1 >conftest.err
3027 rm -f conftest.er1
3028 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (exit $ac_status); } && {
3031 test -z "$ac_c_werror_flag" ||
3032 test ! -s conftest.err
3033 } && test -s conftest.$ac_objext; then
3034 :
3035else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003036 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037sed 's/^/| /' conftest.$ac_ext >&5
3038
3039 ac_c_werror_flag=$ac_save_c_werror_flag
3040 CFLAGS="-g"
3041 cat >conftest.$ac_ext <<_ACEOF
3042/* confdefs.h. */
3043_ACEOF
3044cat confdefs.h >>conftest.$ac_ext
3045cat >>conftest.$ac_ext <<_ACEOF
3046/* end confdefs.h. */
3047
3048int
3049main ()
3050{
3051
3052 ;
3053 return 0;
3054}
3055_ACEOF
3056rm -f conftest.$ac_objext
3057if { (ac_try="$ac_compile"
3058case "(($ac_try" in
3059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3060 *) ac_try_echo=$ac_try;;
3061esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063 (eval "$ac_compile") 2>conftest.er1
3064 ac_status=$?
3065 grep -v '^ *+' conftest.er1 >conftest.err
3066 rm -f conftest.er1
3067 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003069 (exit $ac_status); } && {
3070 test -z "$ac_c_werror_flag" ||
3071 test ! -s conftest.err
3072 } && test -s conftest.$ac_objext; then
3073 ac_cv_prog_cc_g=yes
3074else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003075 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076sed 's/^/| /' conftest.$ac_ext >&5
3077
3078
Guido van Rossum627b2d71993-12-24 10:39:16 +00003079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080
3081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083
3084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3085fi
3086
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088 ac_c_werror_flag=$ac_save_c_werror_flag
3089fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003090{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3091echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003092if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003093 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003094elif test $ac_cv_prog_cc_g = yes; then
3095 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003096 CFLAGS="-g -O2"
3097 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003098 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003099 fi
3100else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003101 if test "$GCC" = yes; then
3102 CFLAGS="-O2"
3103 else
3104 CFLAGS=
3105 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003107{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3108echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003110 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003111else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003113ac_save_CC=$CC
3114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003115/* confdefs.h. */
3116_ACEOF
3117cat confdefs.h >>conftest.$ac_ext
3118cat >>conftest.$ac_ext <<_ACEOF
3119/* end confdefs.h. */
3120#include <stdarg.h>
3121#include <stdio.h>
3122#include <sys/types.h>
3123#include <sys/stat.h>
3124/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3125struct buf { int x; };
3126FILE * (*rcsopen) (struct buf *, struct stat *, int);
3127static char *e (p, i)
3128 char **p;
3129 int i;
3130{
3131 return p[i];
3132}
3133static char *f (char * (*g) (char **, int), char **p, ...)
3134{
3135 char *s;
3136 va_list v;
3137 va_start (v,p);
3138 s = g (p, va_arg (v,int));
3139 va_end (v);
3140 return s;
3141}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003142
3143/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3144 function prototypes and stuff, but not '\xHH' hex character constants.
3145 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003147 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3148 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3153 inside strings and character constants. */
3154#define FOO(x) 'x'
3155int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3156
Skip Montanaro6dead952003-09-25 14:50:04 +00003157int test (int i, double x);
3158struct s1 {int (*f) (int a);};
3159struct s2 {int (*f) (double a);};
3160int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3161int argc;
3162char **argv;
3163int
3164main ()
3165{
3166return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3167 ;
3168 return 0;
3169}
3170_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3172 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003173do
3174 CC="$ac_save_CC $ac_arg"
3175 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176if { (ac_try="$ac_compile"
3177case "(($ac_try" in
3178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3179 *) ac_try_echo=$ac_try;;
3180esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003184 grep -v '^ *+' conftest.er1 >conftest.err
3185 rm -f conftest.er1
3186 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 (exit $ac_status); } && {
3189 test -z "$ac_c_werror_flag" ||
3190 test ! -s conftest.err
3191 } && test -s conftest.$ac_objext; then
3192 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003193else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003195sed 's/^/| /' conftest.$ac_ext >&5
3196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197
Skip Montanaro6dead952003-09-25 14:50:04 +00003198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199
3200rm -f core conftest.err conftest.$ac_objext
3201 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003202done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003204CC=$ac_save_CC
3205
3206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207# AC_CACHE_VAL
3208case "x$ac_cv_prog_cc_c89" in
3209 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003210 { echo "$as_me:$LINENO: result: none needed" >&5
3211echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003213 { echo "$as_me:$LINENO: result: unsupported" >&5
3214echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003215 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003217 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3218echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003219esac
3220
Skip Montanaro6dead952003-09-25 14:50:04 +00003221
Martin v. Löwis11437992002-04-12 09:54:03 +00003222ac_ext=c
3223ac_cpp='$CPP $CPPFLAGS'
3224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003227
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003228
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
3230
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003231{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3232echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003234# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003236 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237
3238 case $withval in
3239 no) with_cxx_main=no
3240 MAINCC='$(CC)';;
3241 yes) with_cxx_main=yes
3242 MAINCC='$(CXX)';;
3243 *) with_cxx_main=yes
3244 MAINCC=$withval
3245 if test -z "$CXX"
3246 then
3247 CXX=$withval
3248 fi;;
3249 esac
3250else
3251
3252 with_cxx_main=no
3253 MAINCC='$(CC)'
3254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255fi
3256
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003257{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3258echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003259
3260preset_cxx="$CXX"
3261if test -z "$CXX"
3262then
3263 case "$CC" in
3264 gcc) # Extract the first word of "g++", so it can be a program name with args.
3265set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003266{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003269 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270else
3271 case $CXX in
3272 [\\/]* | ?:[\\/]*)
3273 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3274 ;;
3275 *)
3276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3277for as_dir in notfound
3278do
3279 IFS=$as_save_IFS
3280 test -z "$as_dir" && as_dir=.
3281 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282 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 +00003283 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003284 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003285 break 2
3286 fi
3287done
3288done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003290
3291 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3292 ;;
3293esac
3294fi
3295CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003296if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003297 { echo "$as_me:$LINENO: result: $CXX" >&5
3298echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003299else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003300 { echo "$as_me:$LINENO: result: no" >&5
3301echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003304 ;;
3305 cc) # Extract the first word of "c++", so it can be a program name with args.
3306set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003307{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003309if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003310 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003311else
3312 case $CXX in
3313 [\\/]* | ?:[\\/]*)
3314 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3315 ;;
3316 *)
3317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3318for as_dir in notfound
3319do
3320 IFS=$as_save_IFS
3321 test -z "$as_dir" && as_dir=.
3322 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 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 +00003324 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003325 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003326 break 2
3327 fi
3328done
3329done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003330IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003331
3332 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3333 ;;
3334esac
3335fi
3336CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003337if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003338 { echo "$as_me:$LINENO: result: $CXX" >&5
3339echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003340else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003341 { echo "$as_me:$LINENO: result: no" >&5
3342echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345 ;;
3346 esac
3347 if test "$CXX" = "notfound"
3348 then
3349 CXX=""
3350 fi
3351fi
3352if test -z "$CXX"
3353then
3354 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3355do
3356 # Extract the first word of "$ac_prog", so it can be a program name with args.
3357set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003358{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003361 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003362else
3363 if test -n "$CXX"; then
3364 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3365else
3366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3367for as_dir in $PATH
3368do
3369 IFS=$as_save_IFS
3370 test -z "$as_dir" && as_dir=.
3371 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372 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 +00003373 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003374 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375 break 2
3376 fi
3377done
3378done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003379IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003380
3381fi
3382fi
3383CXX=$ac_cv_prog_CXX
3384if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003385 { echo "$as_me:$LINENO: result: $CXX" >&5
3386echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003387else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003388 { echo "$as_me:$LINENO: result: no" >&5
3389echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003390fi
3391
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003393 test -n "$CXX" && break
3394done
3395test -n "$CXX" || CXX="notfound"
3396
3397 if test "$CXX" = "notfound"
3398 then
3399 CXX=""
3400 fi
3401fi
3402if test "$preset_cxx" != "$CXX"
3403then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003404 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003405
3406 By default, distutils will build C++ extension modules with \"$CXX\".
3407 If this is not intended, then set CXX on the configure command line.
3408 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003409echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003410
3411 By default, distutils will build C++ extension modules with \"$CXX\".
3412 If this is not intended, then set CXX on the configure command line.
3413 " >&2;}
3414fi
3415
3416
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003417# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
3419ac_ext=c
3420ac_cpp='$CPP $CPPFLAGS'
3421ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3422ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3423ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003424{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3425echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003426# On Suns, sometimes $CPP names a directory.
3427if test -n "$CPP" && test -d "$CPP"; then
3428 CPP=
3429fi
3430if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003433else
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 # Double quotes because CPP needs to be expanded
3435 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3436 do
3437 ac_preproc_ok=false
3438for ac_c_preproc_warn_flag in '' yes
3439do
3440 # Use a header file that comes with gcc, so configuring glibc
3441 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003442 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3443 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003444 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 # not just through cpp. "Syntax error" is here to catch this case.
3446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003447/* confdefs.h. */
3448_ACEOF
3449cat confdefs.h >>conftest.$ac_ext
3450cat >>conftest.$ac_ext <<_ACEOF
3451/* end confdefs.h. */
3452#ifdef __STDC__
3453# include <limits.h>
3454#else
3455# include <assert.h>
3456#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003457 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003458_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459if { (ac_try="$ac_cpp conftest.$ac_ext"
3460case "(($ac_try" in
3461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3462 *) ac_try_echo=$ac_try;;
3463esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003467 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 rm -f conftest.er1
3469 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471 (exit $ac_status); } >/dev/null && {
3472 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3473 test ! -s conftest.err
3474 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003475 :
3476else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003478sed 's/^/| /' conftest.$ac_ext >&5
3479
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 # Broken: fails on valid input.
3481continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 # can be detected and how.
3488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003489/* confdefs.h. */
3490_ACEOF
3491cat confdefs.h >>conftest.$ac_ext
3492cat >>conftest.$ac_ext <<_ACEOF
3493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003494#include <ac_nonexistent.h>
3495_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003496if { (ac_try="$ac_cpp conftest.$ac_ext"
3497case "(($ac_try" in
3498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3499 *) ac_try_echo=$ac_try;;
3500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003504 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 rm -f conftest.er1
3506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508 (exit $ac_status); } >/dev/null && {
3509 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3510 test ! -s conftest.err
3511 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 # Broken: success on invalid input.
3513continue
3514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003516sed 's/^/| /' conftest.$ac_ext >&5
3517
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 # Passes both tests.
3519ac_preproc_ok=:
3520break
3521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523rm -f conftest.err conftest.$ac_ext
3524
3525done
3526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3527rm -f conftest.err conftest.$ac_ext
3528if $ac_preproc_ok; then
3529 break
3530fi
3531
3532 done
3533 ac_cv_prog_CPP=$CPP
3534
3535fi
3536 CPP=$ac_cv_prog_CPP
3537else
3538 ac_cv_prog_CPP=$CPP
3539fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003540{ echo "$as_me:$LINENO: result: $CPP" >&5
3541echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003542ac_preproc_ok=false
3543for ac_c_preproc_warn_flag in '' yes
3544do
3545 # Use a header file that comes with gcc, so configuring glibc
3546 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003547 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3548 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 # On the NeXT, cc -E runs the code through the compiler's parser,
3550 # not just through cpp. "Syntax error" is here to catch this case.
3551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003552/* confdefs.h. */
3553_ACEOF
3554cat confdefs.h >>conftest.$ac_ext
3555cat >>conftest.$ac_ext <<_ACEOF
3556/* end confdefs.h. */
3557#ifdef __STDC__
3558# include <limits.h>
3559#else
3560# include <assert.h>
3561#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003562 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003563_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564if { (ac_try="$ac_cpp conftest.$ac_ext"
3565case "(($ac_try" in
3566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3567 *) ac_try_echo=$ac_try;;
3568esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003572 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 rm -f conftest.er1
3574 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576 (exit $ac_status); } >/dev/null && {
3577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3578 test ! -s conftest.err
3579 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 :
3581else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003583sed 's/^/| /' conftest.$ac_ext >&5
3584
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 # Broken: fails on valid input.
3586continue
3587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589rm -f conftest.err conftest.$ac_ext
3590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 # can be detected and how.
3593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003594/* confdefs.h. */
3595_ACEOF
3596cat confdefs.h >>conftest.$ac_ext
3597cat >>conftest.$ac_ext <<_ACEOF
3598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003599#include <ac_nonexistent.h>
3600_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601if { (ac_try="$ac_cpp conftest.$ac_ext"
3602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003609 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 rm -f conftest.er1
3611 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 (exit $ac_status); } >/dev/null && {
3614 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3615 test ! -s conftest.err
3616 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 # Broken: success on invalid input.
3618continue
3619else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003621sed 's/^/| /' conftest.$ac_ext >&5
3622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 # Passes both tests.
3624ac_preproc_ok=:
3625break
3626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627
Martin v. Löwis11437992002-04-12 09:54:03 +00003628rm -f conftest.err conftest.$ac_ext
3629
3630done
3631# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3632rm -f conftest.err conftest.$ac_ext
3633if $ac_preproc_ok; then
3634 :
3635else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003636 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003637See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003638echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003639See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003640 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642
3643ac_ext=c
3644ac_cpp='$CPP $CPPFLAGS'
3645ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3646ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3647ac_compiler_gnu=$ac_cv_c_compiler_gnu
3648
3649
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003650{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3651echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003653 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003654else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003655 # Extract the first word of "grep ggrep" to use in msg output
3656if test -z "$GREP"; then
3657set dummy grep ggrep; ac_prog_name=$2
3658if test "${ac_cv_path_GREP+set}" = set; then
3659 echo $ECHO_N "(cached) $ECHO_C" >&6
3660else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003662# Loop through the user's path and test for each of PROGNAME-LIST
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
3668 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003669 for ac_exec_ext in '' $ac_executable_extensions; do
3670 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3671 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3672 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673 # Check for GNU $ac_path_GREP
3674case `"$ac_path_GREP" --version 2>&1` in
3675*GNU*)
3676 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3677*)
3678 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003679 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 while :
3681 do
3682 cat "conftest.in" "conftest.in" >"conftest.tmp"
3683 mv "conftest.tmp" "conftest.in"
3684 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003685 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3687 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3688 ac_count=`expr $ac_count + 1`
3689 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3690 # Best one so far, save it but keep looking for a better one
3691 ac_cv_path_GREP="$ac_path_GREP"
3692 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003693 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694 # 10*(2^10) chars as input seems more than enough
3695 test $ac_count -gt 10 && break
3696 done
3697 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3698esac
3699
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003700
3701 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 done
3703done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003704
3705done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003707
3708
3709fi
3710
3711GREP="$ac_cv_path_GREP"
3712if test -z "$GREP"; then
3713 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3714echo "$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 +00003715 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003716fi
3717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718else
3719 ac_cv_path_GREP=$GREP
3720fi
3721
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003724{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3725echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726 GREP="$ac_cv_path_GREP"
3727
3728
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003729{ echo "$as_me:$LINENO: checking for egrep" >&5
3730echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003732 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733else
3734 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3735 then ac_cv_path_EGREP="$GREP -E"
3736 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003737 # Extract the first word of "egrep" to use in msg output
3738if test -z "$EGREP"; then
3739set dummy egrep; ac_prog_name=$2
3740if test "${ac_cv_path_EGREP+set}" = set; then
3741 echo $ECHO_N "(cached) $ECHO_C" >&6
3742else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003744# Loop through the user's path and test for each of PROGNAME-LIST
3745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
3750 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003751 for ac_exec_ext in '' $ac_executable_extensions; do
3752 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3753 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3754 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755 # Check for GNU $ac_path_EGREP
3756case `"$ac_path_EGREP" --version 2>&1` in
3757*GNU*)
3758 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3759*)
3760 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003761 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 while :
3763 do
3764 cat "conftest.in" "conftest.in" >"conftest.tmp"
3765 mv "conftest.tmp" "conftest.in"
3766 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003767 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3769 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3770 ac_count=`expr $ac_count + 1`
3771 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3772 # Best one so far, save it but keep looking for a better one
3773 ac_cv_path_EGREP="$ac_path_EGREP"
3774 ac_path_EGREP_max=$ac_count
3775 fi
3776 # 10*(2^10) chars as input seems more than enough
3777 test $ac_count -gt 10 && break
3778 done
3779 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3780esac
3781
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003782
3783 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784 done
3785done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003786
3787done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003789
3790
3791fi
3792
3793EGREP="$ac_cv_path_EGREP"
3794if test -z "$EGREP"; then
3795 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3796echo "$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 +00003797 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003798fi
3799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800else
3801 ac_cv_path_EGREP=$EGREP
3802fi
3803
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 fi
3806fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003807{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3808echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003810
3811
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003812
3813{ echo "$as_me:$LINENO: checking for AIX" >&5
3814echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3815cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003816/* confdefs.h. */
3817_ACEOF
3818cat confdefs.h >>conftest.$ac_ext
3819cat >>conftest.$ac_ext <<_ACEOF
3820/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003821#ifdef _AIX
3822 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003823#endif
3824
Benjamin Petersona8332062009-09-11 22:36:27 +00003825_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3827 $EGREP "yes" >/dev/null 2>&1; then
3828 { echo "$as_me:$LINENO: result: yes" >&5
3829echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003830cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003831#define _ALL_SOURCE 1
3832_ACEOF
3833
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003834else
3835 { echo "$as_me:$LINENO: result: no" >&5
3836echo "${ECHO_T}no" >&6; }
3837fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00003838rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003839
3840
3841
3842# Check for unsupported systems
3843case $ac_sys_system/$ac_sys_release in
3844atheos*|Linux*/1*)
3845 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3846 echo See README for details.
3847 exit 1;;
3848esac
3849
3850
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003851{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3852echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003853
3854# Check whether --with-suffix was given.
3855if test "${with_suffix+set}" = set; then
3856 withval=$with_suffix;
3857 case $withval in
3858 no) EXEEXT=;;
3859 yes) EXEEXT=.exe;;
3860 *) EXEEXT=$withval;;
3861 esac
3862fi
3863
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003864{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3865echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003866
3867# Test whether we're running on a non-case-sensitive system, in which
3868# case we give a warning if no ext is given
3869
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003870{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3871echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003872if test ! -d CaseSensitiveTestDir; then
3873mkdir CaseSensitiveTestDir
3874fi
3875
3876if test -d casesensitivetestdir
3877then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003878 { echo "$as_me:$LINENO: result: yes" >&5
3879echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003880 BUILDEXEEXT=.exe
3881else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003882 { echo "$as_me:$LINENO: result: no" >&5
3883echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003884 BUILDEXEEXT=$EXEEXT
3885fi
3886rmdir CaseSensitiveTestDir
3887
3888case $MACHDEP in
3889bsdos*)
3890 case $CC in
3891 gcc) CC="$CC -D_HAVE_BSDI";;
3892 esac;;
3893esac
3894
3895case $ac_sys_system in
3896hp*|HP*)
3897 case $CC in
3898 cc|*/cc) CC="$CC -Ae";;
3899 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003900SunOS*)
3901 # Some functions have a prototype only with that define, e.g. confstr
3902
3903cat >>confdefs.h <<\_ACEOF
3904#define __EXTENSIONS__ 1
3905_ACEOF
3906
3907 ;;
3908esac
3909
3910
3911
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003912{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3913echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003914if test -z "$LIBRARY"
3915then
3916 LIBRARY='libpython$(VERSION).a'
3917fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003918{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3919echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003920
3921# LDLIBRARY is the name of the library to link against (as opposed to the
3922# name of the library into which to insert object files). BLDLIBRARY is also
3923# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3924# is blank as the main program is not linked directly against LDLIBRARY.
3925# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3926# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3927# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3928# DLLLIBRARY is the shared (i.e., DLL) library.
3929#
3930# RUNSHARED is used to run shared python without installed libraries
3931#
3932# INSTSONAME is the name of the shared library that will be use to install
3933# on the system - some systems like version suffix, others don't
3934
3935
3936
3937
3938
3939
3940LDLIBRARY="$LIBRARY"
3941BLDLIBRARY='$(LDLIBRARY)'
3942INSTSONAME='$(LDLIBRARY)'
3943DLLLIBRARY=''
3944LDLIBRARYDIR=''
3945RUNSHARED=''
3946
3947# LINKCC is the command that links the python executable -- default is $(CC).
3948# If CXX is set, and if it is needed to link a main function that was
3949# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3950# python might then depend on the C++ runtime
3951# This is altered for AIX in order to build the export list before
3952# linking.
3953
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003954{ echo "$as_me:$LINENO: checking LINKCC" >&5
3955echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003956if test -z "$LINKCC"
3957then
3958 LINKCC='$(PURIFY) $(MAINCC)'
3959 case $ac_sys_system in
3960 AIX*)
3961 exp_extra="\"\""
3962 if test $ac_sys_release -ge 5 -o \
3963 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3964 exp_extra="."
3965 fi
3966 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003967 QNX*)
3968 # qcc must be used because the other compilers do not
3969 # support -N.
3970 LINKCC=qcc;;
3971 esac
3972fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003973{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3974echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003975
3976# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3977# make sure we default having it set to "no": this is used by
3978# distutils.unixccompiler to know if it should add --enable-new-dtags
3979# to linker command lines, and failing to detect GNU ld simply results
3980# in the same bahaviour as before.
3981
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003982{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3983echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003984ac_prog=ld
3985if test "$GCC" = yes; then
3986 ac_prog=`$CC -print-prog-name=ld`
3987fi
3988case `"$ac_prog" -V 2>&1 < /dev/null` in
3989 *GNU*)
3990 GNULD=yes;;
3991 *)
3992 GNULD=no;;
3993esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003994{ echo "$as_me:$LINENO: result: $GNULD" >&5
3995echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003996
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003997{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3998echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003999# Check whether --enable-shared was given.
4000if test "${enable_shared+set}" = set; then
4001 enableval=$enable_shared;
4002fi
4003
4004
4005if test -z "$enable_shared"
4006then
4007 case $ac_sys_system in
4008 CYGWIN* | atheos*)
4009 enable_shared="yes";;
4010 *)
4011 enable_shared="no";;
4012 esac
4013fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004014{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4015echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004016
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004017{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4018echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004019# Check whether --enable-profiling was given.
4020if test "${enable_profiling+set}" = set; then
4021 enableval=$enable_profiling; ac_save_cc="$CC"
4022 CC="$CC -pg"
4023 if test "$cross_compiling" = yes; then
4024 ac_enable_profiling="no"
4025else
4026 cat >conftest.$ac_ext <<_ACEOF
4027/* confdefs.h. */
4028_ACEOF
4029cat confdefs.h >>conftest.$ac_ext
4030cat >>conftest.$ac_ext <<_ACEOF
4031/* end confdefs.h. */
4032int main() { return 0; }
4033_ACEOF
4034rm -f conftest$ac_exeext
4035if { (ac_try="$ac_link"
4036case "(($ac_try" in
4037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038 *) ac_try_echo=$ac_try;;
4039esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004041 (eval "$ac_link") 2>&5
4042 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004044 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4045 { (case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004050 (eval "$ac_try") 2>&5
4051 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004053 (exit $ac_status); }; }; then
4054 ac_enable_profiling="yes"
4055else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004056 echo "$as_me: program exited with status $ac_status" >&5
4057echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004058sed 's/^/| /' conftest.$ac_ext >&5
4059
4060( exit $ac_status )
4061ac_enable_profiling="no"
4062fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4064fi
4065
4066
4067 CC="$ac_save_cc"
4068fi
4069
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004070{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4071echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004072
4073case "$ac_enable_profiling" in
4074 "yes")
4075 BASECFLAGS="-pg $BASECFLAGS"
4076 LDFLAGS="-pg $LDFLAGS"
4077 ;;
4078esac
4079
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004080{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4081echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004082
4083# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4084# library that we build, but we do not want to link against it (we
4085# will find it with a -framework option). For this reason there is an
4086# extra variable BLDLIBRARY against which Python and the extension
4087# modules are linked, BLDLIBRARY. This is normally the same as
4088# LDLIBRARY, but empty for MacOSX framework builds.
4089if test "$enable_framework"
4090then
4091 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4092 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4093 BLDLIBRARY=''
4094else
4095 BLDLIBRARY='$(LDLIBRARY)'
4096fi
4097
4098# Other platforms follow
4099if test $enable_shared = "yes"; then
4100
4101cat >>confdefs.h <<\_ACEOF
4102#define Py_ENABLE_SHARED 1
4103_ACEOF
4104
4105 case $ac_sys_system in
4106 CYGWIN*)
4107 LDLIBRARY='libpython$(VERSION).dll.a'
4108 DLLLIBRARY='libpython$(VERSION).dll'
4109 ;;
4110 SunOS*)
4111 LDLIBRARY='libpython$(VERSION).so'
4112 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4113 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4114 INSTSONAME="$LDLIBRARY".$SOVERSION
4115 ;;
4116 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4117 LDLIBRARY='libpython$(VERSION).so'
4118 BLDLIBRARY='-L. -lpython$(VERSION)'
4119 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4120 case $ac_sys_system in
4121 FreeBSD*)
4122 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4123 ;;
4124 esac
4125 INSTSONAME="$LDLIBRARY".$SOVERSION
4126 ;;
4127 hp*|HP*)
4128 case `uname -m` in
4129 ia64)
4130 LDLIBRARY='libpython$(VERSION).so'
4131 ;;
4132 *)
4133 LDLIBRARY='libpython$(VERSION).sl'
4134 ;;
4135 esac
4136 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4137 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4138 ;;
4139 OSF*)
4140 LDLIBRARY='libpython$(VERSION).so'
4141 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4142 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4143 ;;
4144 atheos*)
4145 LDLIBRARY='libpython$(VERSION).so'
4146 BLDLIBRARY='-L. -lpython$(VERSION)'
4147 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4148 ;;
4149 Darwin*)
4150 LDLIBRARY='libpython$(VERSION).dylib'
4151 BLDLIBRARY='-L. -lpython$(VERSION)'
4152 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4153 ;;
4154
4155 esac
4156else # shared is disabled
4157 case $ac_sys_system in
4158 CYGWIN*)
4159 BLDLIBRARY='$(LIBRARY)'
4160 LDLIBRARY='libpython$(VERSION).dll.a'
4161 ;;
4162 esac
4163fi
4164
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004165{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4166echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004167
4168if test -n "$ac_tool_prefix"; then
4169 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4170set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004171{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004173if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004174 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004175else
4176 if test -n "$RANLIB"; then
4177 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
4184 for ac_exec_ext in '' $ac_executable_extensions; do
4185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4186 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004187 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004188 break 2
4189 fi
4190done
4191done
4192IFS=$as_save_IFS
4193
4194fi
4195fi
4196RANLIB=$ac_cv_prog_RANLIB
4197if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004198 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4199echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004200else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004201 { echo "$as_me:$LINENO: result: no" >&5
4202echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004203fi
4204
4205
4206fi
4207if test -z "$ac_cv_prog_RANLIB"; then
4208 ac_ct_RANLIB=$RANLIB
4209 # Extract the first word of "ranlib", so it can be a program name with args.
4210set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004213if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004214 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004215else
4216 if test -n "$ac_ct_RANLIB"; then
4217 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
4225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4226 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004228 break 2
4229 fi
4230done
4231done
4232IFS=$as_save_IFS
4233
4234fi
4235fi
4236ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4237if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004238 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4239echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004240else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004241 { echo "$as_me:$LINENO: result: no" >&5
4242echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004243fi
4244
4245 if test "x$ac_ct_RANLIB" = x; then
4246 RANLIB=":"
4247 else
4248 case $cross_compiling:$ac_tool_warned in
4249yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004250{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4251whose name does not start with the host triplet. If you think this
4252configuration is useful to you, please write to autoconf@gnu.org." >&5
4253echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4254whose name does not start with the host triplet. If you think this
4255configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004256ac_tool_warned=yes ;;
4257esac
4258 RANLIB=$ac_ct_RANLIB
4259 fi
4260else
4261 RANLIB="$ac_cv_prog_RANLIB"
4262fi
4263
4264
4265for ac_prog in ar aal
4266do
4267 # Extract the first word of "$ac_prog", so it can be a program name with args.
4268set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004269{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004271if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004272 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004273else
4274 if test -n "$AR"; then
4275 ac_cv_prog_AR="$AR" # Let the user override the test.
4276else
4277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4278for as_dir in $PATH
4279do
4280 IFS=$as_save_IFS
4281 test -z "$as_dir" && as_dir=.
4282 for ac_exec_ext in '' $ac_executable_extensions; do
4283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4284 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004285 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004286 break 2
4287 fi
4288done
4289done
4290IFS=$as_save_IFS
4291
4292fi
4293fi
4294AR=$ac_cv_prog_AR
4295if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004296 { echo "$as_me:$LINENO: result: $AR" >&5
4297echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004298else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004299 { echo "$as_me:$LINENO: result: no" >&5
4300echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004301fi
4302
4303
4304 test -n "$AR" && break
4305done
4306test -n "$AR" || AR="ar"
4307
4308
4309# tweak ARFLAGS only if the user didn't set it on the command line
4310
4311if test -z "$ARFLAGS"
4312then
4313 ARFLAGS="rc"
4314fi
4315
4316
4317# Extract the first word of "svnversion", so it can be a program name with args.
4318set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004319{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004321if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004322 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004323else
4324 if test -n "$SVNVERSION"; then
4325 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4326else
4327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in $PATH
4329do
4330 IFS=$as_save_IFS
4331 test -z "$as_dir" && as_dir=.
4332 for ac_exec_ext in '' $ac_executable_extensions; do
4333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4334 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004336 break 2
4337 fi
4338done
4339done
4340IFS=$as_save_IFS
4341
4342 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4343fi
4344fi
4345SVNVERSION=$ac_cv_prog_SVNVERSION
4346if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004347 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4348echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004349else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004350 { echo "$as_me:$LINENO: result: no" >&5
4351echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004352fi
4353
4354
4355if test $SVNVERSION = found
4356then
4357 SVNVERSION="svnversion \$(srcdir)"
4358else
4359 SVNVERSION="echo Unversioned directory"
4360fi
4361
4362case $MACHDEP in
4363bsdos*|hp*|HP*)
4364 # install -d does not work on BSDI or HP-UX
4365 if test -z "$INSTALL"
4366 then
4367 INSTALL="${srcdir}/install-sh -c"
4368 fi
4369esac
4370ac_aux_dir=
4371for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4372 if test -f "$ac_dir/install-sh"; then
4373 ac_aux_dir=$ac_dir
4374 ac_install_sh="$ac_aux_dir/install-sh -c"
4375 break
4376 elif test -f "$ac_dir/install.sh"; then
4377 ac_aux_dir=$ac_dir
4378 ac_install_sh="$ac_aux_dir/install.sh -c"
4379 break
4380 elif test -f "$ac_dir/shtool"; then
4381 ac_aux_dir=$ac_dir
4382 ac_install_sh="$ac_aux_dir/shtool install -c"
4383 break
4384 fi
4385done
4386if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004387 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4388echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004389 { (exit 1); exit 1; }; }
4390fi
4391
4392# These three variables are undocumented and unsupported,
4393# and are intended to be withdrawn in a future Autoconf release.
4394# They can cause serious problems if a builder's source tree is in a directory
4395# whose full name contains unusual characters.
4396ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4397ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4398ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4399
4400
4401# Find a good install program. We prefer a C program (faster),
4402# so one script is as good as another. But avoid the broken or
4403# incompatible versions:
4404# SysV /etc/install, /usr/sbin/install
4405# SunOS /usr/etc/install
4406# IRIX /sbin/install
4407# AIX /bin/install
4408# AmigaOS /C/install, which installs bootblocks on floppy discs
4409# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4410# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4411# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4412# OS/2's system install, which has a completely different semantic
4413# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004414{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4415echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004416if test -z "$INSTALL"; then
4417if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004418 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004419else
4420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4421for as_dir in $PATH
4422do
4423 IFS=$as_save_IFS
4424 test -z "$as_dir" && as_dir=.
4425 # Account for people who put trailing slashes in PATH elements.
4426case $as_dir/ in
4427 ./ | .// | /cC/* | \
4428 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4429 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4430 /usr/ucb/* ) ;;
4431 *)
4432 # OSF1 and SCO ODT 3.0 have their own names for install.
4433 # Don't use installbsd from OSF since it installs stuff as root
4434 # by default.
4435 for ac_prog in ginstall scoinst install; do
4436 for ac_exec_ext in '' $ac_executable_extensions; do
4437 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4438 if test $ac_prog = install &&
4439 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4440 # AIX install. It has an incompatible calling convention.
4441 :
4442 elif test $ac_prog = install &&
4443 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4444 # program-specific install script used by HP pwplus--don't use.
4445 :
4446 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004447 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4448 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004449 fi
4450 fi
4451 done
4452 done
4453 ;;
4454esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004455done
4456IFS=$as_save_IFS
4457
Antoine Pitrou20327222009-05-24 20:39:11 +00004458
4459fi
4460 if test "${ac_cv_path_install+set}" = set; then
4461 INSTALL=$ac_cv_path_install
4462 else
4463 # As a last resort, use the slow shell script. Don't cache a
4464 # value for INSTALL within a source directory, because that will
4465 # break other packages using the cache if that directory is
4466 # removed, or if the value is a relative name.
4467 INSTALL=$ac_install_sh
4468 fi
4469fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004470{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4471echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004472
4473# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4474# It thinks the first close brace ends the variable substitution.
4475test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4476
4477test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4478
4479test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4480
4481
4482# Not every filesystem supports hard links
4483
4484if test -z "$LN" ; then
4485 case $ac_sys_system in
4486 CYGWIN*) LN="ln -s";;
4487 atheos*) LN="ln -s";;
4488 *) LN=ln;;
4489 esac
4490fi
4491
4492# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004493{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4494echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004495
4496# Check whether --with-pydebug was given.
4497if test "${with_pydebug+set}" = set; then
4498 withval=$with_pydebug;
4499if test "$withval" != no
4500then
4501
4502cat >>confdefs.h <<\_ACEOF
4503#define Py_DEBUG 1
4504_ACEOF
4505
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004506 { echo "$as_me:$LINENO: result: yes" >&5
4507echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004508 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004509else { echo "$as_me:$LINENO: result: no" >&5
4510echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004511fi
4512else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004513 { echo "$as_me:$LINENO: result: no" >&5
4514echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004515fi
4516
4517
4518# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4519# merged with this chunk of code?
4520
4521# Optimizer/debugger flags
4522# ------------------------
4523# (The following bit of code is complicated enough - please keep things
4524# indented properly. Just pretend you're editing Python code. ;-)
4525
4526# There are two parallel sets of case statements below, one that checks to
4527# see if OPT was set and one that does BASECFLAGS setting based upon
4528# compiler and platform. BASECFLAGS tweaks need to be made even if the
4529# user set OPT.
4530
4531# tweak OPT based on compiler and platform, only if the user didn't set
4532# it on the command line
4533
4534if test -z "$OPT"
4535then
4536 case $GCC in
4537 yes)
4538 if test "$CC" != 'g++' ; then
4539 STRICT_PROTO="-Wstrict-prototypes"
4540 fi
4541 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4542 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4543 WRAP="-fwrapv"
4544 fi
4545 case $ac_cv_prog_cc_g in
4546 yes)
4547 if test "$Py_DEBUG" = 'true' ; then
4548 # Optimization messes up debuggers, so turn it off for
4549 # debug builds.
4550 OPT="-g -Wall $STRICT_PROTO"
4551 else
4552 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4553 fi
4554 ;;
4555 *)
4556 OPT="-O3 -Wall $STRICT_PROTO"
4557 ;;
4558 esac
4559 case $ac_sys_system in
4560 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4561 ;;
4562 esac
4563 ;;
4564
4565 *)
4566 OPT="-O"
4567 ;;
4568 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004569fi
4570
4571
4572
4573# The -arch flags for universal builds on OSX
4574UNIVERSAL_ARCH_FLAGS=
4575
4576
4577# tweak BASECFLAGS based on compiler and platform
4578case $GCC in
4579yes)
4580 # Python violates C99 rules, by casting between incompatible
4581 # pointer types. GCC may generate bad code as a result of that,
4582 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004583 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4584echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004585 ac_save_cc="$CC"
4586 CC="$CC -fno-strict-aliasing"
4587 if test "$cross_compiling" = yes; then
4588 ac_cv_no_strict_aliasing_ok=no
4589else
4590 cat >conftest.$ac_ext <<_ACEOF
4591/* confdefs.h. */
4592_ACEOF
4593cat confdefs.h >>conftest.$ac_ext
4594cat >>conftest.$ac_ext <<_ACEOF
4595/* end confdefs.h. */
4596int main() { return 0; }
4597_ACEOF
4598rm -f conftest$ac_exeext
4599if { (ac_try="$ac_link"
4600case "(($ac_try" in
4601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4602 *) ac_try_echo=$ac_try;;
4603esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004605 (eval "$ac_link") 2>&5
4606 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4609 { (case "(($ac_try" in
4610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4611 *) ac_try_echo=$ac_try;;
4612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004614 (eval "$ac_try") 2>&5
4615 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004617 (exit $ac_status); }; }; then
4618 ac_cv_no_strict_aliasing_ok=yes
4619else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004620 echo "$as_me: program exited with status $ac_status" >&5
4621echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004622sed 's/^/| /' conftest.$ac_ext >&5
4623
4624( exit $ac_status )
4625ac_cv_no_strict_aliasing_ok=no
4626fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4628fi
4629
4630
4631 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004632 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4633echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004634 if test $ac_cv_no_strict_aliasing_ok = yes
4635 then
4636 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4637 fi
4638
4639 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4640 # support. Without this, treatment of subnormals doesn't follow
4641 # the standard.
4642 case $ac_sys_machine in
4643 alpha*)
4644 BASECFLAGS="$BASECFLAGS -mieee"
4645 ;;
4646 esac
4647
4648 case $ac_sys_system in
4649 SCO_SV*)
4650 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4651 ;;
4652 # is there any other compiler on Darwin besides gcc?
4653 Darwin*)
4654 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4655 # used to be here, but non-Apple gcc doesn't accept them.
4656
4657
4658 if test "${enable_universalsdk}"; then
4659 UNIVERSAL_ARCH_FLAGS=""
4660 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4661 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4662 ARCH_RUN_32BIT=""
4663
4664 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4665 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004666 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004667
4668 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4669 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004670 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Antoine Pitrou20327222009-05-24 20:39:11 +00004671
Ronald Oussoren856624d2009-09-08 07:13:53 +00004672 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4673 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004674 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004675
4676 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4677 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004678 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004679
Antoine Pitrou20327222009-05-24 20:39:11 +00004680 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004681 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4682echo "$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 +00004683 { (exit 1); exit 1; }; }
4684
4685 fi
4686
4687
4688 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4689 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4690 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4691 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4692 fi
4693 fi
4694
4695 # Calculate the right deployment target for this build.
4696 #
4697 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4698 if test ${cur_target} '>' 10.2; then
4699 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004700 if test ${enable_universalsdk}; then
4701 if test "${UNIVERSAL_ARCHS}" = "all"; then
4702 # Ensure that the default platform for a
4703 # 4-way universal build is OSX 10.5,
4704 # that's the first OS release where
4705 # 4-way builds make sense.
4706 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004707
4708 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4709 cur_target='10.5'
4710
4711 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4712 cur_target='10.5'
4713
4714 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4715 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004716 fi
4717 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00004718 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004719 # On Intel macs default to a deployment
4720 # target of 10.4, that's the first OSX
4721 # release with Intel support.
4722 cur_target="10.4"
4723 fi
4724 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004725 fi
4726 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4727
4728 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4729 # environment with a value that is the same as what we'll use
4730 # in the Makefile to ensure that we'll get the same compiler
4731 # environment during configure and build time.
4732 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4733 export MACOSX_DEPLOYMENT_TARGET
4734 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4735
4736 ;;
4737 OSF*)
4738 BASECFLAGS="$BASECFLAGS -mieee"
4739 ;;
4740 esac
4741 ;;
4742
4743*)
4744 case $ac_sys_system in
4745 OpenUNIX*|UnixWare*)
4746 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4747 ;;
4748 OSF*)
4749 BASECFLAGS="$BASECFLAGS -ieee -std"
4750 ;;
4751 SCO_SV*)
4752 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4753 ;;
4754 esac
4755 ;;
4756esac
4757
4758if test "$Py_DEBUG" = 'true'; then
4759 :
4760else
4761 OPT="-DNDEBUG $OPT"
4762fi
4763
4764if test "$ac_arch_flags"
4765then
4766 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4767fi
4768
4769# disable check for icc since it seems to pass, but generates a warning
4770if test "$CC" = icc
4771then
4772 ac_cv_opt_olimit_ok=no
4773fi
4774
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004775{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4776echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004777if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004778 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004779else
4780 ac_save_cc="$CC"
4781CC="$CC -OPT:Olimit=0"
4782if test "$cross_compiling" = yes; then
4783 ac_cv_opt_olimit_ok=no
4784else
4785 cat >conftest.$ac_ext <<_ACEOF
4786/* confdefs.h. */
4787_ACEOF
4788cat confdefs.h >>conftest.$ac_ext
4789cat >>conftest.$ac_ext <<_ACEOF
4790/* end confdefs.h. */
4791int main() { return 0; }
4792_ACEOF
4793rm -f conftest$ac_exeext
4794if { (ac_try="$ac_link"
4795case "(($ac_try" in
4796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4797 *) ac_try_echo=$ac_try;;
4798esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004800 (eval "$ac_link") 2>&5
4801 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4804 { (case "(($ac_try" in
4805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4806 *) ac_try_echo=$ac_try;;
4807esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004809 (eval "$ac_try") 2>&5
4810 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004812 (exit $ac_status); }; }; then
4813 ac_cv_opt_olimit_ok=yes
4814else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004815 echo "$as_me: program exited with status $ac_status" >&5
4816echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004817sed 's/^/| /' conftest.$ac_ext >&5
4818
4819( exit $ac_status )
4820ac_cv_opt_olimit_ok=no
4821fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4823fi
4824
4825
4826CC="$ac_save_cc"
4827fi
4828
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004829{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4830echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004831if test $ac_cv_opt_olimit_ok = yes; then
4832 case $ac_sys_system in
4833 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4834 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4835 # environment?
4836 Darwin*)
4837 ;;
4838 *)
4839 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4840 ;;
4841 esac
4842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4844echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004845 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004846 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004847else
4848 ac_save_cc="$CC"
4849 CC="$CC -Olimit 1500"
4850 if test "$cross_compiling" = yes; then
4851 ac_cv_olimit_ok=no
4852else
4853 cat >conftest.$ac_ext <<_ACEOF
4854/* confdefs.h. */
4855_ACEOF
4856cat confdefs.h >>conftest.$ac_ext
4857cat >>conftest.$ac_ext <<_ACEOF
4858/* end confdefs.h. */
4859int main() { return 0; }
4860_ACEOF
4861rm -f conftest$ac_exeext
4862if { (ac_try="$ac_link"
4863case "(($ac_try" in
4864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4865 *) ac_try_echo=$ac_try;;
4866esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004868 (eval "$ac_link") 2>&5
4869 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004871 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4872 { (case "(($ac_try" in
4873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4874 *) ac_try_echo=$ac_try;;
4875esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004877 (eval "$ac_try") 2>&5
4878 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004880 (exit $ac_status); }; }; then
4881 ac_cv_olimit_ok=yes
4882else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004883 echo "$as_me: program exited with status $ac_status" >&5
4884echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004885sed 's/^/| /' conftest.$ac_ext >&5
4886
4887( exit $ac_status )
4888ac_cv_olimit_ok=no
4889fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4891fi
4892
4893
4894 CC="$ac_save_cc"
4895fi
4896
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004897 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4898echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004899 if test $ac_cv_olimit_ok = yes; then
4900 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4901 fi
4902fi
4903
4904# Check whether GCC supports PyArg_ParseTuple format
4905if test "$GCC" = "yes"
4906then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004907 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4908echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004909 save_CFLAGS=$CFLAGS
4910 CFLAGS="$CFLAGS -Werror"
4911 cat >conftest.$ac_ext <<_ACEOF
4912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
4917
4918 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4919
4920int
4921main ()
4922{
4923
4924 ;
4925 return 0;
4926}
4927_ACEOF
4928rm -f conftest.$ac_objext
4929if { (ac_try="$ac_compile"
4930case "(($ac_try" in
4931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4932 *) ac_try_echo=$ac_try;;
4933esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004935 (eval "$ac_compile") 2>conftest.er1
4936 ac_status=$?
4937 grep -v '^ *+' conftest.er1 >conftest.err
4938 rm -f conftest.er1
4939 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004941 (exit $ac_status); } && {
4942 test -z "$ac_c_werror_flag" ||
4943 test ! -s conftest.err
4944 } && test -s conftest.$ac_objext; then
4945
4946cat >>confdefs.h <<\_ACEOF
4947#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4948_ACEOF
4949
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004950 { echo "$as_me:$LINENO: result: yes" >&5
4951echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004952else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004953 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004954sed 's/^/| /' conftest.$ac_ext >&5
4955
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004956 { echo "$as_me:$LINENO: result: no" >&5
4957echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004958
4959fi
4960
4961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4962 CFLAGS=$save_CFLAGS
4963fi
4964
4965# On some compilers, pthreads are available without further options
4966# (e.g. MacOS X). On some of these systems, the compiler will not
4967# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4968# So we have to see first whether pthreads are available without
4969# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004970{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4971echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004972if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004973 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004974else
4975 if test "$cross_compiling" = yes; then
4976 ac_cv_pthread_is_default=no
4977else
4978 cat >conftest.$ac_ext <<_ACEOF
4979/* confdefs.h. */
4980_ACEOF
4981cat confdefs.h >>conftest.$ac_ext
4982cat >>conftest.$ac_ext <<_ACEOF
4983/* end confdefs.h. */
4984
4985#include <pthread.h>
4986
4987void* routine(void* p){return NULL;}
4988
4989int main(){
4990 pthread_t p;
4991 if(pthread_create(&p,NULL,routine,NULL)!=0)
4992 return 1;
4993 (void)pthread_detach(p);
4994 return 0;
4995}
4996
4997_ACEOF
4998rm -f conftest$ac_exeext
4999if { (ac_try="$ac_link"
5000case "(($ac_try" in
5001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5002 *) ac_try_echo=$ac_try;;
5003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005005 (eval "$ac_link") 2>&5
5006 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5009 { (case "(($ac_try" in
5010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5011 *) ac_try_echo=$ac_try;;
5012esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005014 (eval "$ac_try") 2>&5
5015 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005017 (exit $ac_status); }; }; then
5018
5019 ac_cv_pthread_is_default=yes
5020 ac_cv_kthread=no
5021 ac_cv_pthread=no
5022
5023else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005024 echo "$as_me: program exited with status $ac_status" >&5
5025echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005026sed 's/^/| /' conftest.$ac_ext >&5
5027
5028( exit $ac_status )
5029ac_cv_pthread_is_default=no
5030fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5032fi
5033
5034
5035
5036fi
5037
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005038{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5039echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005040
5041
5042if test $ac_cv_pthread_is_default = yes
5043then
5044 ac_cv_kpthread=no
5045else
5046# -Kpthread, if available, provides the right #defines
5047# and linker options to make pthread_create available
5048# Some compilers won't report that they do not support -Kpthread,
5049# so we need to run a program to see whether it really made the
5050# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005051{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5052echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005053if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005054 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005055else
5056 ac_save_cc="$CC"
5057CC="$CC -Kpthread"
5058if test "$cross_compiling" = yes; then
5059 ac_cv_kpthread=no
5060else
5061 cat >conftest.$ac_ext <<_ACEOF
5062/* confdefs.h. */
5063_ACEOF
5064cat confdefs.h >>conftest.$ac_ext
5065cat >>conftest.$ac_ext <<_ACEOF
5066/* end confdefs.h. */
5067
5068#include <pthread.h>
5069
5070void* routine(void* p){return NULL;}
5071
5072int main(){
5073 pthread_t p;
5074 if(pthread_create(&p,NULL,routine,NULL)!=0)
5075 return 1;
5076 (void)pthread_detach(p);
5077 return 0;
5078}
5079
5080_ACEOF
5081rm -f conftest$ac_exeext
5082if { (ac_try="$ac_link"
5083case "(($ac_try" in
5084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5085 *) ac_try_echo=$ac_try;;
5086esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005088 (eval "$ac_link") 2>&5
5089 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5092 { (case "(($ac_try" in
5093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5094 *) ac_try_echo=$ac_try;;
5095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005097 (eval "$ac_try") 2>&5
5098 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005100 (exit $ac_status); }; }; then
5101 ac_cv_kpthread=yes
5102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005103 echo "$as_me: program exited with status $ac_status" >&5
5104echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005105sed 's/^/| /' conftest.$ac_ext >&5
5106
5107( exit $ac_status )
5108ac_cv_kpthread=no
5109fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5111fi
5112
5113
5114CC="$ac_save_cc"
5115fi
5116
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005117{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5118echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005119fi
5120
5121if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5122then
5123# -Kthread, if available, provides the right #defines
5124# and linker options to make pthread_create available
5125# Some compilers won't report that they do not support -Kthread,
5126# so we need to run a program to see whether it really made the
5127# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005128{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5129echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005130if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005132else
5133 ac_save_cc="$CC"
5134CC="$CC -Kthread"
5135if test "$cross_compiling" = yes; then
5136 ac_cv_kthread=no
5137else
5138 cat >conftest.$ac_ext <<_ACEOF
5139/* confdefs.h. */
5140_ACEOF
5141cat confdefs.h >>conftest.$ac_ext
5142cat >>conftest.$ac_ext <<_ACEOF
5143/* end confdefs.h. */
5144
5145#include <pthread.h>
5146
5147void* routine(void* p){return NULL;}
5148
5149int main(){
5150 pthread_t p;
5151 if(pthread_create(&p,NULL,routine,NULL)!=0)
5152 return 1;
5153 (void)pthread_detach(p);
5154 return 0;
5155}
5156
5157_ACEOF
5158rm -f conftest$ac_exeext
5159if { (ac_try="$ac_link"
5160case "(($ac_try" in
5161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5162 *) ac_try_echo=$ac_try;;
5163esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005165 (eval "$ac_link") 2>&5
5166 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005168 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5169 { (case "(($ac_try" in
5170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5171 *) ac_try_echo=$ac_try;;
5172esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005174 (eval "$ac_try") 2>&5
5175 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005177 (exit $ac_status); }; }; then
5178 ac_cv_kthread=yes
5179else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005180 echo "$as_me: program exited with status $ac_status" >&5
5181echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005182sed 's/^/| /' conftest.$ac_ext >&5
5183
5184( exit $ac_status )
5185ac_cv_kthread=no
5186fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5188fi
5189
5190
5191CC="$ac_save_cc"
5192fi
5193
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005194{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5195echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005196fi
5197
5198if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5199then
5200# -pthread, if available, provides the right #defines
5201# and linker options to make pthread_create available
5202# Some compilers won't report that they do not support -pthread,
5203# so we need to run a program to see whether it really made the
5204# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005205{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5206echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005207if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005209else
5210 ac_save_cc="$CC"
5211CC="$CC -pthread"
5212if test "$cross_compiling" = yes; then
5213 ac_cv_pthread=no
5214else
5215 cat >conftest.$ac_ext <<_ACEOF
5216/* confdefs.h. */
5217_ACEOF
5218cat confdefs.h >>conftest.$ac_ext
5219cat >>conftest.$ac_ext <<_ACEOF
5220/* end confdefs.h. */
5221
5222#include <pthread.h>
5223
5224void* routine(void* p){return NULL;}
5225
5226int main(){
5227 pthread_t p;
5228 if(pthread_create(&p,NULL,routine,NULL)!=0)
5229 return 1;
5230 (void)pthread_detach(p);
5231 return 0;
5232}
5233
5234_ACEOF
5235rm -f conftest$ac_exeext
5236if { (ac_try="$ac_link"
5237case "(($ac_try" in
5238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5239 *) ac_try_echo=$ac_try;;
5240esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005242 (eval "$ac_link") 2>&5
5243 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5246 { (case "(($ac_try" in
5247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5248 *) ac_try_echo=$ac_try;;
5249esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005251 (eval "$ac_try") 2>&5
5252 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005254 (exit $ac_status); }; }; then
5255 ac_cv_pthread=yes
5256else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005257 echo "$as_me: program exited with status $ac_status" >&5
5258echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005259sed 's/^/| /' conftest.$ac_ext >&5
5260
5261( exit $ac_status )
5262ac_cv_pthread=no
5263fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5265fi
5266
5267
5268CC="$ac_save_cc"
5269fi
5270
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005271{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5272echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005273fi
5274
5275# If we have set a CC compiler flag for thread support then
5276# check if it works for CXX, too.
5277ac_cv_cxx_thread=no
5278if test ! -z "$CXX"
5279then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005280{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5281echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005282ac_save_cxx="$CXX"
5283
5284if test "$ac_cv_kpthread" = "yes"
5285then
5286 CXX="$CXX -Kpthread"
5287 ac_cv_cxx_thread=yes
5288elif test "$ac_cv_kthread" = "yes"
5289then
5290 CXX="$CXX -Kthread"
5291 ac_cv_cxx_thread=yes
5292elif test "$ac_cv_pthread" = "yes"
5293then
5294 CXX="$CXX -pthread"
5295 ac_cv_cxx_thread=yes
5296fi
5297
5298if test $ac_cv_cxx_thread = yes
5299then
5300 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5301 $CXX -c conftest.$ac_ext 2>&5
5302 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5303 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5304 then
5305 ac_cv_cxx_thread=yes
5306 else
5307 ac_cv_cxx_thread=no
5308 fi
5309 rm -fr conftest*
5310fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005311{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5312echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005313fi
5314CXX="$ac_save_cxx"
5315
5316
5317# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005318{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5319echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005320if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005321 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005322else
5323 cat >conftest.$ac_ext <<_ACEOF
5324/* confdefs.h. */
5325_ACEOF
5326cat confdefs.h >>conftest.$ac_ext
5327cat >>conftest.$ac_ext <<_ACEOF
5328/* end confdefs.h. */
5329#include <stdlib.h>
5330#include <stdarg.h>
5331#include <string.h>
5332#include <float.h>
5333
5334int
5335main ()
5336{
5337
5338 ;
5339 return 0;
5340}
5341_ACEOF
5342rm -f conftest.$ac_objext
5343if { (ac_try="$ac_compile"
5344case "(($ac_try" in
5345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5346 *) ac_try_echo=$ac_try;;
5347esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005349 (eval "$ac_compile") 2>conftest.er1
5350 ac_status=$?
5351 grep -v '^ *+' conftest.er1 >conftest.err
5352 rm -f conftest.er1
5353 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005355 (exit $ac_status); } && {
5356 test -z "$ac_c_werror_flag" ||
5357 test ! -s conftest.err
5358 } && test -s conftest.$ac_objext; then
5359 ac_cv_header_stdc=yes
5360else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005361 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005362sed 's/^/| /' conftest.$ac_ext >&5
5363
5364 ac_cv_header_stdc=no
5365fi
5366
5367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5368
5369if test $ac_cv_header_stdc = yes; then
5370 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5371 cat >conftest.$ac_ext <<_ACEOF
5372/* confdefs.h. */
5373_ACEOF
5374cat confdefs.h >>conftest.$ac_ext
5375cat >>conftest.$ac_ext <<_ACEOF
5376/* end confdefs.h. */
5377#include <string.h>
5378
5379_ACEOF
5380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5381 $EGREP "memchr" >/dev/null 2>&1; then
5382 :
5383else
5384 ac_cv_header_stdc=no
5385fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00005386rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005387
5388fi
5389
5390if test $ac_cv_header_stdc = yes; then
5391 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5392 cat >conftest.$ac_ext <<_ACEOF
5393/* confdefs.h. */
5394_ACEOF
5395cat confdefs.h >>conftest.$ac_ext
5396cat >>conftest.$ac_ext <<_ACEOF
5397/* end confdefs.h. */
5398#include <stdlib.h>
5399
5400_ACEOF
5401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5402 $EGREP "free" >/dev/null 2>&1; then
5403 :
5404else
5405 ac_cv_header_stdc=no
5406fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00005407rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005408
5409fi
5410
5411if test $ac_cv_header_stdc = yes; then
5412 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5413 if test "$cross_compiling" = yes; then
5414 :
5415else
5416 cat >conftest.$ac_ext <<_ACEOF
5417/* confdefs.h. */
5418_ACEOF
5419cat confdefs.h >>conftest.$ac_ext
5420cat >>conftest.$ac_ext <<_ACEOF
5421/* end confdefs.h. */
5422#include <ctype.h>
5423#include <stdlib.h>
5424#if ((' ' & 0x0FF) == 0x020)
5425# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5426# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5427#else
5428# define ISLOWER(c) \
5429 (('a' <= (c) && (c) <= 'i') \
5430 || ('j' <= (c) && (c) <= 'r') \
5431 || ('s' <= (c) && (c) <= 'z'))
5432# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5433#endif
5434
5435#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5436int
5437main ()
5438{
5439 int i;
5440 for (i = 0; i < 256; i++)
5441 if (XOR (islower (i), ISLOWER (i))
5442 || toupper (i) != TOUPPER (i))
5443 return 2;
5444 return 0;
5445}
5446_ACEOF
5447rm -f conftest$ac_exeext
5448if { (ac_try="$ac_link"
5449case "(($ac_try" in
5450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5451 *) ac_try_echo=$ac_try;;
5452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005454 (eval "$ac_link") 2>&5
5455 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5458 { (case "(($ac_try" in
5459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5460 *) ac_try_echo=$ac_try;;
5461esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005463 (eval "$ac_try") 2>&5
5464 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005466 (exit $ac_status); }; }; then
5467 :
5468else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005469 echo "$as_me: program exited with status $ac_status" >&5
5470echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005471sed 's/^/| /' conftest.$ac_ext >&5
5472
5473( exit $ac_status )
5474ac_cv_header_stdc=no
5475fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5477fi
5478
5479
5480fi
5481fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005482{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5483echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005484if test $ac_cv_header_stdc = yes; then
5485
5486cat >>confdefs.h <<\_ACEOF
5487#define STDC_HEADERS 1
5488_ACEOF
5489
5490fi
5491
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005492# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5503 inttypes.h stdint.h unistd.h
5504do
5505as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5506{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5508if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5509 echo $ECHO_N "(cached) $ECHO_C" >&6
5510else
5511 cat >conftest.$ac_ext <<_ACEOF
5512/* confdefs.h. */
5513_ACEOF
5514cat confdefs.h >>conftest.$ac_ext
5515cat >>conftest.$ac_ext <<_ACEOF
5516/* end confdefs.h. */
5517$ac_includes_default
5518
5519#include <$ac_header>
5520_ACEOF
5521rm -f conftest.$ac_objext
5522if { (ac_try="$ac_compile"
5523case "(($ac_try" in
5524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5525 *) ac_try_echo=$ac_try;;
5526esac
5527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5528 (eval "$ac_compile") 2>conftest.er1
5529 ac_status=$?
5530 grep -v '^ *+' conftest.er1 >conftest.err
5531 rm -f conftest.er1
5532 cat conftest.err >&5
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); } && {
5535 test -z "$ac_c_werror_flag" ||
5536 test ! -s conftest.err
5537 } && test -s conftest.$ac_objext; then
5538 eval "$as_ac_Header=yes"
5539else
5540 echo "$as_me: failed program was:" >&5
5541sed 's/^/| /' conftest.$ac_ext >&5
5542
5543 eval "$as_ac_Header=no"
5544fi
5545
5546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5547fi
5548ac_res=`eval echo '${'$as_ac_Header'}'`
5549 { echo "$as_me:$LINENO: result: $ac_res" >&5
5550echo "${ECHO_T}$ac_res" >&6; }
5551if test `eval echo '${'$as_ac_Header'}'` = yes; then
5552 cat >>confdefs.h <<_ACEOF
5553#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5554_ACEOF
5555
5556fi
5557
5558done
5559
5560
Antoine Pitrou20327222009-05-24 20:39:11 +00005561
Martin v. Löwis11437992002-04-12 09:54:03 +00005562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
Anthony Baxter8a560de2004-10-13 15:30:56 +00005597
Martin v. Löwisc3001752005-01-23 09:27:24 +00005598
Martin v. Löwis11017b12006-01-14 18:12:57 +00005599
Thomas Wouters477c8d52006-05-27 19:21:47 +00005600
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005601
5602
5603
5604
5605
5606
5607
5608
Thomas Wouters89f507f2006-12-13 04:49:30 +00005609
Christian Heimes043d6f62008-01-07 17:19:16 +00005610
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005611
5612
Christian Heimesbbe741d2008-03-28 10:53:29 +00005613
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005614
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005615for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5616fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005617ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005618shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005619unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005620sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5621sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005622sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005623sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005624sys/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 +00005625sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005626bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005627do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005628as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005630 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5631echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005632if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005633 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005634fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005635ac_res=`eval echo '${'$as_ac_Header'}'`
5636 { echo "$as_me:$LINENO: result: $ac_res" >&5
5637echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005638else
Martin v. Löwis11437992002-04-12 09:54:03 +00005639 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005640{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5641echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005643/* confdefs.h. */
5644_ACEOF
5645cat confdefs.h >>conftest.$ac_ext
5646cat >>conftest.$ac_ext <<_ACEOF
5647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005648$ac_includes_default
5649#include <$ac_header>
5650_ACEOF
5651rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652if { (ac_try="$ac_compile"
5653case "(($ac_try" in
5654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5655 *) ac_try_echo=$ac_try;;
5656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005660 grep -v '^ *+' conftest.er1 >conftest.err
5661 rm -f conftest.er1
5662 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664 (exit $ac_status); } && {
5665 test -z "$ac_c_werror_flag" ||
5666 test ! -s conftest.err
5667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005669else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005671sed 's/^/| /' conftest.$ac_ext >&5
5672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005673 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005675
5676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005677{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5678echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005679
5680# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005681{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5682echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005684/* confdefs.h. */
5685_ACEOF
5686cat confdefs.h >>conftest.$ac_ext
5687cat >>conftest.$ac_ext <<_ACEOF
5688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005689#include <$ac_header>
5690_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005691if { (ac_try="$ac_cpp conftest.$ac_ext"
5692case "(($ac_try" in
5693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5694 *) ac_try_echo=$ac_try;;
5695esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005699 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 rm -f conftest.er1
5701 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005703 (exit $ac_status); } >/dev/null && {
5704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5705 test ! -s conftest.err
5706 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005707 ac_header_preproc=yes
5708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005710sed 's/^/| /' conftest.$ac_ext >&5
5711
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005714
Martin v. Löwis11437992002-04-12 09:54:03 +00005715rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005716{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5717echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005718
5719# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5721 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005722 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5723echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5724 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5725echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005726 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005727 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005729 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5730echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5731 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5732echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5733 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5734echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5735 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5736echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5737 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5738echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5739 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5740echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005741 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005742## -------------------------------------- ##
5743## Report this to http://bugs.python.org/ ##
5744## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005745_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005746 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005747 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005748esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005749{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5750echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005751if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005752 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005753else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005754 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005755fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005756ac_res=`eval echo '${'$as_ac_Header'}'`
5757 { echo "$as_me:$LINENO: result: $ac_res" >&5
5758echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005759
5760fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005761if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005762 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005763#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005764_ACEOF
5765
5766fi
5767
Guido van Rossum627b2d71993-12-24 10:39:16 +00005768done
5769
Martin v. Löwis11437992002-04-12 09:54:03 +00005770
5771
5772
5773
5774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005776for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005777 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5778{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5779echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005780if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005782else
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005784/* confdefs.h. */
5785_ACEOF
5786cat confdefs.h >>conftest.$ac_ext
5787cat >>conftest.$ac_ext <<_ACEOF
5788/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789#include <sys/types.h>
5790#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005791
Martin v. Löwis11437992002-04-12 09:54:03 +00005792int
5793main ()
5794{
5795if ((DIR *) 0)
5796return 0;
5797 ;
5798 return 0;
5799}
5800_ACEOF
5801rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005802if { (ac_try="$ac_compile"
5803case "(($ac_try" in
5804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5805 *) ac_try_echo=$ac_try;;
5806esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005810 grep -v '^ *+' conftest.er1 >conftest.err
5811 rm -f conftest.er1
5812 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005814 (exit $ac_status); } && {
5815 test -z "$ac_c_werror_flag" ||
5816 test ! -s conftest.err
5817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005818 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005819else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005821sed 's/^/| /' conftest.$ac_ext >&5
5822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005823 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825
5826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005827fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005828ac_res=`eval echo '${'$as_ac_Header'}'`
5829 { echo "$as_me:$LINENO: result: $ac_res" >&5
5830echo "${ECHO_T}$ac_res" >&6; }
5831if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005832 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005833#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005834_ACEOF
5835
5836ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005839done
5840# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5841if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005842 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5843echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005844if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005845 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846else
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005848cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005849/* confdefs.h. */
5850_ACEOF
5851cat confdefs.h >>conftest.$ac_ext
5852cat >>conftest.$ac_ext <<_ACEOF
5853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855/* Override any GCC internal prototype to avoid an error.
5856 Use char because int might match the return type of a GCC
5857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005858#ifdef __cplusplus
5859extern "C"
5860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005861char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005862int
5863main ()
5864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005865return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005866 ;
5867 return 0;
5868}
5869_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005870for ac_lib in '' dir; do
5871 if test -z "$ac_lib"; then
5872 ac_res="none required"
5873 else
5874 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005876 fi
5877 rm -f conftest.$ac_objext conftest$ac_exeext
5878if { (ac_try="$ac_link"
5879case "(($ac_try" in
5880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881 *) ac_try_echo=$ac_try;;
5882esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005884 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005885 ac_status=$?
5886 grep -v '^ *+' conftest.er1 >conftest.err
5887 rm -f conftest.er1
5888 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005890 (exit $ac_status); } && {
5891 test -z "$ac_c_werror_flag" ||
5892 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005893 } && test -s conftest$ac_exeext &&
5894 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005896else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005897 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005898sed 's/^/| /' conftest.$ac_ext >&5
5899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005900
Thomas Wouters477c8d52006-05-27 19:21:47 +00005901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005902
5903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5904 conftest$ac_exeext
5905 if test "${ac_cv_search_opendir+set}" = set; then
5906 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005908done
5909if test "${ac_cv_search_opendir+set}" = set; then
5910 :
5911else
5912 ac_cv_search_opendir=no
5913fi
5914rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005915LIBS=$ac_func_search_save_LIBS
5916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005917{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5918echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005919ac_res=$ac_cv_search_opendir
5920if test "$ac_res" != no; then
5921 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005922
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005924
Michael W. Hudson54241132001-12-07 15:38:26 +00005925else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005926 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5927echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005928if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005929 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005930else
5931 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005933/* confdefs.h. */
5934_ACEOF
5935cat confdefs.h >>conftest.$ac_ext
5936cat >>conftest.$ac_ext <<_ACEOF
5937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005939/* Override any GCC internal prototype to avoid an error.
5940 Use char because int might match the return type of a GCC
5941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005942#ifdef __cplusplus
5943extern "C"
5944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005945char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005946int
5947main ()
5948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005949return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005950 ;
5951 return 0;
5952}
5953_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005954for ac_lib in '' x; do
5955 if test -z "$ac_lib"; then
5956 ac_res="none required"
5957 else
5958 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005960 fi
5961 rm -f conftest.$ac_objext conftest$ac_exeext
5962if { (ac_try="$ac_link"
5963case "(($ac_try" in
5964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5965 *) ac_try_echo=$ac_try;;
5966esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005968 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005969 ac_status=$?
5970 grep -v '^ *+' conftest.er1 >conftest.err
5971 rm -f conftest.er1
5972 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974 (exit $ac_status); } && {
5975 test -z "$ac_c_werror_flag" ||
5976 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005977 } && test -s conftest$ac_exeext &&
5978 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005979 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005980else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005981 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005982sed 's/^/| /' conftest.$ac_ext >&5
5983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005984
Thomas Wouters477c8d52006-05-27 19:21:47 +00005985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005986
5987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5988 conftest$ac_exeext
5989 if test "${ac_cv_search_opendir+set}" = set; then
5990 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005992done
5993if test "${ac_cv_search_opendir+set}" = set; then
5994 :
5995else
5996 ac_cv_search_opendir=no
5997fi
5998rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005999LIBS=$ac_func_search_save_LIBS
6000fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006001{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6002echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006003ac_res=$ac_cv_search_opendir
6004if test "$ac_res" != no; then
6005 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006007fi
6008
6009fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006010
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006011{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6012echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015else
6016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006017/* confdefs.h. */
6018_ACEOF
6019cat confdefs.h >>conftest.$ac_ext
6020cat >>conftest.$ac_ext <<_ACEOF
6021/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023int
6024main ()
6025{
6026return makedev(0, 0);
6027 ;
6028 return 0;
6029}
6030_ACEOF
6031rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006032if { (ac_try="$ac_link"
6033case "(($ac_try" in
6034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6035 *) ac_try_echo=$ac_try;;
6036esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006040 grep -v '^ *+' conftest.er1 >conftest.err
6041 rm -f conftest.er1
6042 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006044 (exit $ac_status); } && {
6045 test -z "$ac_c_werror_flag" ||
6046 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006047 } && test -s conftest$ac_exeext &&
6048 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049 ac_cv_header_sys_types_h_makedev=yes
6050else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006052sed 's/^/| /' conftest.$ac_ext >&5
6053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006056
6057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059
6060fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006061{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6062echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063
6064if test $ac_cv_header_sys_types_h_makedev = no; then
6065if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006066 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6067echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006069 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006071{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6072echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073else
6074 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006075{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6076echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006078/* confdefs.h. */
6079_ACEOF
6080cat confdefs.h >>conftest.$ac_ext
6081cat >>conftest.$ac_ext <<_ACEOF
6082/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083$ac_includes_default
6084#include <sys/mkdev.h>
6085_ACEOF
6086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087if { (ac_try="$ac_compile"
6088case "(($ac_try" in
6089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6090 *) ac_try_echo=$ac_try;;
6091esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006095 grep -v '^ *+' conftest.er1 >conftest.err
6096 rm -f conftest.er1
6097 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099 (exit $ac_status); } && {
6100 test -z "$ac_c_werror_flag" ||
6101 test ! -s conftest.err
6102 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_header_compiler=yes
6104else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006106sed 's/^/| /' conftest.$ac_ext >&5
6107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110
6111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006112{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6113echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114
6115# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006116{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6117echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006119/* confdefs.h. */
6120_ACEOF
6121cat confdefs.h >>conftest.$ac_ext
6122cat >>conftest.$ac_ext <<_ACEOF
6123/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124#include <sys/mkdev.h>
6125_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126if { (ac_try="$ac_cpp conftest.$ac_ext"
6127case "(($ac_try" in
6128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6129 *) ac_try_echo=$ac_try;;
6130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006134 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 rm -f conftest.er1
6136 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006138 (exit $ac_status); } >/dev/null && {
6139 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6140 test ! -s conftest.err
6141 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142 ac_header_preproc=yes
6143else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006145sed 's/^/| /' conftest.$ac_ext >&5
6146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147 ac_header_preproc=no
6148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006151{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6152echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153
6154# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006155case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6156 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006157 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6158echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6159 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6160echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006161 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006162 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006164 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6165echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6166 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6167echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6169echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6171echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6172 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6173echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6174 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6175echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006177## -------------------------------------- ##
6178## Report this to http://bugs.python.org/ ##
6179## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006180_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006182 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006184{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6185echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006187 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188else
6189 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6190fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006191{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6192echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193
6194fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006195if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196
6197cat >>confdefs.h <<\_ACEOF
6198#define MAJOR_IN_MKDEV 1
6199_ACEOF
6200
6201fi
6202
6203
6204
6205 if test $ac_cv_header_sys_mkdev_h = no; then
6206 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006207 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6208echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006212{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6213echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214else
6215 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006216{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6217echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006219/* confdefs.h. */
6220_ACEOF
6221cat confdefs.h >>conftest.$ac_ext
6222cat >>conftest.$ac_ext <<_ACEOF
6223/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224$ac_includes_default
6225#include <sys/sysmacros.h>
6226_ACEOF
6227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228if { (ac_try="$ac_compile"
6229case "(($ac_try" in
6230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6231 *) ac_try_echo=$ac_try;;
6232esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006236 grep -v '^ *+' conftest.er1 >conftest.err
6237 rm -f conftest.er1
6238 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 (exit $ac_status); } && {
6241 test -z "$ac_c_werror_flag" ||
6242 test ! -s conftest.err
6243 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 ac_header_compiler=yes
6245else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006247sed 's/^/| /' conftest.$ac_ext >&5
6248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251
6252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006253{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6254echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255
6256# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006257{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6258echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006260/* confdefs.h. */
6261_ACEOF
6262cat confdefs.h >>conftest.$ac_ext
6263cat >>conftest.$ac_ext <<_ACEOF
6264/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265#include <sys/sysmacros.h>
6266_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267if { (ac_try="$ac_cpp conftest.$ac_ext"
6268case "(($ac_try" in
6269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6270 *) ac_try_echo=$ac_try;;
6271esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006273 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006275 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 rm -f conftest.er1
6277 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006279 (exit $ac_status); } >/dev/null && {
6280 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6281 test ! -s conftest.err
6282 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283 ac_header_preproc=yes
6284else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006286sed 's/^/| /' conftest.$ac_ext >&5
6287
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288 ac_header_preproc=no
6289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006290
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006292{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6293echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294
6295# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006296case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6297 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006298 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6299echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6300 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6301echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006302 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006303 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006305 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6306echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6307 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6308echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6309 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6310echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6311 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6312echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6313 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6314echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6315 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6316echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006318## -------------------------------------- ##
6319## Report this to http://bugs.python.org/ ##
6320## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006321_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006322 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006323 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006325{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6326echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006328 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006329else
6330 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6331fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006332{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6333echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334
6335fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006336if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337
6338cat >>confdefs.h <<\_ACEOF
6339#define MAJOR_IN_SYSMACROS 1
6340_ACEOF
6341
6342fi
6343
6344
6345 fi
6346fi
6347
Michael W. Hudson54241132001-12-07 15:38:26 +00006348
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006350
6351for ac_header in term.h
6352do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006353as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6354{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6355echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006356if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358else
6359 cat >conftest.$ac_ext <<_ACEOF
6360/* confdefs.h. */
6361_ACEOF
6362cat confdefs.h >>conftest.$ac_ext
6363cat >>conftest.$ac_ext <<_ACEOF
6364/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006366#ifdef HAVE_CURSES_H
6367#include <curses.h>
6368#endif
6369
6370
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006372_ACEOF
6373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374if { (ac_try="$ac_compile"
6375case "(($ac_try" in
6376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6377 *) ac_try_echo=$ac_try;;
6378esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381 ac_status=$?
6382 grep -v '^ *+' conftest.er1 >conftest.err
6383 rm -f conftest.er1
6384 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386 (exit $ac_status); } && {
6387 test -z "$ac_c_werror_flag" ||
6388 test ! -s conftest.err
6389 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006390 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006391else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006392 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006393sed 's/^/| /' conftest.$ac_ext >&5
6394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397
6398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006399fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006400ac_res=`eval echo '${'$as_ac_Header'}'`
6401 { echo "$as_me:$LINENO: result: $ac_res" >&5
6402echo "${ECHO_T}$ac_res" >&6; }
6403if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006404 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006405#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006406_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006408fi
6409
6410done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006411
6412
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413# On Linux, netlink.h requires asm/types.h
6414
6415for ac_header in linux/netlink.h
6416do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006417as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6418{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6419echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006421 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422else
6423 cat >conftest.$ac_ext <<_ACEOF
6424/* confdefs.h. */
6425_ACEOF
6426cat confdefs.h >>conftest.$ac_ext
6427cat >>conftest.$ac_ext <<_ACEOF
6428/* end confdefs.h. */
6429
6430#ifdef HAVE_ASM_TYPES_H
6431#include <asm/types.h>
6432#endif
6433#ifdef HAVE_SYS_SOCKET_H
6434#include <sys/socket.h>
6435#endif
6436
6437
6438#include <$ac_header>
6439_ACEOF
6440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441if { (ac_try="$ac_compile"
6442case "(($ac_try" in
6443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6444 *) ac_try_echo=$ac_try;;
6445esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006448 ac_status=$?
6449 grep -v '^ *+' conftest.er1 >conftest.err
6450 rm -f conftest.er1
6451 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006453 (exit $ac_status); } && {
6454 test -z "$ac_c_werror_flag" ||
6455 test ! -s conftest.err
6456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006457 eval "$as_ac_Header=yes"
6458else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006459 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006460sed 's/^/| /' conftest.$ac_ext >&5
6461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006462 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464
6465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006466fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006467ac_res=`eval echo '${'$as_ac_Header'}'`
6468 { echo "$as_me:$LINENO: result: $ac_res" >&5
6469echo "${ECHO_T}$ac_res" >&6; }
6470if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006472#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473_ACEOF
6474
6475fi
6476
6477done
6478
6479
Guido van Rossum627b2d71993-12-24 10:39:16 +00006480# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006481was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006482{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6483echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006484cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006485/* confdefs.h. */
6486_ACEOF
6487cat confdefs.h >>conftest.$ac_ext
6488cat >>conftest.$ac_ext <<_ACEOF
6489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006491
6492_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006494 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006495 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006496else
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498
6499cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006501_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006502
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006503
Guido van Rossum627b2d71993-12-24 10:39:16 +00006504fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00006505rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006506
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006507{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6508echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006509
Neal Norwitz11690112002-07-30 01:08:28 +00006510# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006511{ echo "$as_me:$LINENO: checking for makedev" >&5
6512echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006519#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006520int
6521main ()
6522{
6523 makedev(0, 0)
6524 ;
6525 return 0;
6526}
6527_ACEOF
6528rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006529if { (ac_try="$ac_link"
6530case "(($ac_try" in
6531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6532 *) ac_try_echo=$ac_try;;
6533esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006535 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006537 grep -v '^ *+' conftest.er1 >conftest.err
6538 rm -f conftest.er1
6539 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006541 (exit $ac_status); } && {
6542 test -z "$ac_c_werror_flag" ||
6543 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006544 } && test -s conftest$ac_exeext &&
6545 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006546 ac_cv_has_makedev=yes
6547else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006549sed 's/^/| /' conftest.$ac_ext >&5
6550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006551 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553
6554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006555 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006556if test "$ac_cv_has_makedev" = "no"; then
6557 # we didn't link, try if _OSF_SOURCE will allow us to link
6558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006559/* confdefs.h. */
6560_ACEOF
6561cat confdefs.h >>conftest.$ac_ext
6562cat >>conftest.$ac_ext <<_ACEOF
6563/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006564
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006565#define _OSF_SOURCE 1
6566#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006567
Neal Norwitz11690112002-07-30 01:08:28 +00006568int
6569main ()
6570{
6571 makedev(0, 0)
6572 ;
6573 return 0;
6574}
6575_ACEOF
6576rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006577if { (ac_try="$ac_link"
6578case "(($ac_try" in
6579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6580 *) ac_try_echo=$ac_try;;
6581esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006583 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006585 grep -v '^ *+' conftest.er1 >conftest.err
6586 rm -f conftest.er1
6587 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006589 (exit $ac_status); } && {
6590 test -z "$ac_c_werror_flag" ||
6591 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006592 } && test -s conftest$ac_exeext &&
6593 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006594 ac_cv_has_makedev=yes
6595else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006597sed 's/^/| /' conftest.$ac_ext >&5
6598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601
6602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006603 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006604 if test "$ac_cv_has_makedev" = "yes"; then
6605
6606cat >>confdefs.h <<\_ACEOF
6607#define _OSF_SOURCE 1
6608_ACEOF
6609
6610 fi
6611fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006612{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6613echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006614if test "$ac_cv_has_makedev" = "yes"; then
6615
6616cat >>confdefs.h <<\_ACEOF
6617#define HAVE_MAKEDEV 1
6618_ACEOF
6619
6620fi
6621
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6623# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6624# defined, but the compiler does not support pragma redefine_extname,
6625# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6626# structures (such as rlimit64) without declaring them. As a
6627# work-around, disable LFS on such configurations
6628
6629use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006630{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6631echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006633/* confdefs.h. */
6634_ACEOF
6635cat confdefs.h >>conftest.$ac_ext
6636cat >>conftest.$ac_ext <<_ACEOF
6637/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638
6639#define _LARGEFILE_SOURCE 1
6640#define _FILE_OFFSET_BITS 64
6641#include <sys/resource.h>
6642
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643int
6644main ()
6645{
6646struct rlimit foo;
6647 ;
6648 return 0;
6649}
6650_ACEOF
6651rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652if { (ac_try="$ac_compile"
6653case "(($ac_try" in
6654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6655 *) ac_try_echo=$ac_try;;
6656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006660 grep -v '^ *+' conftest.er1 >conftest.err
6661 rm -f conftest.er1
6662 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006664 (exit $ac_status); } && {
6665 test -z "$ac_c_werror_flag" ||
6666 test ! -s conftest.err
6667 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668 sol_lfs_bug=no
6669else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006671sed 's/^/| /' conftest.$ac_ext >&5
6672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006673 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
6676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006677{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6678echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006679if test "$sol_lfs_bug" = "yes"; then
6680 use_lfs=no
6681fi
6682
6683if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006684# Two defines needed to enable largefile support on various platforms
6685# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006686
Martin v. Löwis11437992002-04-12 09:54:03 +00006687cat >>confdefs.h <<\_ACEOF
6688#define _LARGEFILE_SOURCE 1
6689_ACEOF
6690
6691
6692cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006693#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006694_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006695
Martin v. Löwis399a6892002-10-04 10:22:02 +00006696fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006697
Guido van Rossum84e7b241996-08-19 21:59:00 +00006698# Add some code to confdefs.h so that the test for off_t works on SCO
6699cat >> confdefs.h <<\EOF
6700#if defined(SCO_DS)
6701#undef _OFF_T
6702#endif
6703EOF
6704
Guido van Rossumef2255b2000-03-10 22:30:29 +00006705# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006706{ echo "$as_me:$LINENO: checking for mode_t" >&5
6707echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006708if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710else
Benjamin Petersona8332062009-09-11 22:36:27 +00006711 cat >conftest.$ac_ext <<_ACEOF
6712/* confdefs.h. */
6713_ACEOF
6714cat confdefs.h >>conftest.$ac_ext
6715cat >>conftest.$ac_ext <<_ACEOF
6716/* end confdefs.h. */
6717$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006718typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006719int
6720main ()
6721{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006722if ((ac__type_new_ *) 0)
6723 return 0;
6724if (sizeof (ac__type_new_))
6725 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006726 ;
6727 return 0;
6728}
6729_ACEOF
6730rm -f conftest.$ac_objext
6731if { (ac_try="$ac_compile"
6732case "(($ac_try" in
6733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6734 *) ac_try_echo=$ac_try;;
6735esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006737 (eval "$ac_compile") 2>conftest.er1
6738 ac_status=$?
6739 grep -v '^ *+' conftest.er1 >conftest.err
6740 rm -f conftest.er1
6741 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006743 (exit $ac_status); } && {
6744 test -z "$ac_c_werror_flag" ||
6745 test ! -s conftest.err
6746 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006747 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006748else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006750sed 's/^/| /' conftest.$ac_ext >&5
6751
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006752 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006754
6755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006756fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006757{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6758echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6759if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006760 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006761else
Martin v. Löwis11437992002-04-12 09:54:03 +00006762
6763cat >>confdefs.h <<_ACEOF
6764#define mode_t int
6765_ACEOF
6766
6767fi
6768
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006769{ echo "$as_me:$LINENO: checking for off_t" >&5
6770echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006771if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006772 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006773else
Benjamin Petersona8332062009-09-11 22:36:27 +00006774 cat >conftest.$ac_ext <<_ACEOF
6775/* confdefs.h. */
6776_ACEOF
6777cat confdefs.h >>conftest.$ac_ext
6778cat >>conftest.$ac_ext <<_ACEOF
6779/* end confdefs.h. */
6780$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006781typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006782int
6783main ()
6784{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006785if ((ac__type_new_ *) 0)
6786 return 0;
6787if (sizeof (ac__type_new_))
6788 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006789 ;
6790 return 0;
6791}
6792_ACEOF
6793rm -f conftest.$ac_objext
6794if { (ac_try="$ac_compile"
6795case "(($ac_try" in
6796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6797 *) ac_try_echo=$ac_try;;
6798esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006800 (eval "$ac_compile") 2>conftest.er1
6801 ac_status=$?
6802 grep -v '^ *+' conftest.er1 >conftest.err
6803 rm -f conftest.er1
6804 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006806 (exit $ac_status); } && {
6807 test -z "$ac_c_werror_flag" ||
6808 test ! -s conftest.err
6809 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006810 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006811else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006813sed 's/^/| /' conftest.$ac_ext >&5
6814
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006815 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817
6818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006819fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006820{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6821echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6822if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006823 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006824else
Martin v. Löwis11437992002-04-12 09:54:03 +00006825
6826cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006828_ACEOF
6829
6830fi
6831
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006832{ echo "$as_me:$LINENO: checking for pid_t" >&5
6833echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006834if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006835 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006836else
Benjamin Petersona8332062009-09-11 22:36:27 +00006837 cat >conftest.$ac_ext <<_ACEOF
6838/* confdefs.h. */
6839_ACEOF
6840cat confdefs.h >>conftest.$ac_ext
6841cat >>conftest.$ac_ext <<_ACEOF
6842/* end confdefs.h. */
6843$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006844typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006845int
6846main ()
6847{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006848if ((ac__type_new_ *) 0)
6849 return 0;
6850if (sizeof (ac__type_new_))
6851 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006852 ;
6853 return 0;
6854}
6855_ACEOF
6856rm -f conftest.$ac_objext
6857if { (ac_try="$ac_compile"
6858case "(($ac_try" in
6859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6860 *) ac_try_echo=$ac_try;;
6861esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006863 (eval "$ac_compile") 2>conftest.er1
6864 ac_status=$?
6865 grep -v '^ *+' conftest.er1 >conftest.err
6866 rm -f conftest.er1
6867 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006869 (exit $ac_status); } && {
6870 test -z "$ac_c_werror_flag" ||
6871 test ! -s conftest.err
6872 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006873 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006876sed 's/^/| /' conftest.$ac_ext >&5
6877
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006878 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880
6881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006882fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006883{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6884echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6885if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006886 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006887else
Martin v. Löwis11437992002-04-12 09:54:03 +00006888
6889cat >>confdefs.h <<_ACEOF
6890#define pid_t int
6891_ACEOF
6892
6893fi
6894
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006895{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6896echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006897if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006898 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006899else
6900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006901/* confdefs.h. */
6902_ACEOF
6903cat confdefs.h >>conftest.$ac_ext
6904cat >>conftest.$ac_ext <<_ACEOF
6905/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906#include <sys/types.h>
6907#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909int
6910main ()
6911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 ;
6914 return 0;
6915}
6916_ACEOF
6917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918if { (ac_try="$ac_compile"
6919case "(($ac_try" in
6920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6921 *) ac_try_echo=$ac_try;;
6922esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006926 grep -v '^ *+' conftest.er1 >conftest.err
6927 rm -f conftest.er1
6928 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006930 (exit $ac_status); } && {
6931 test -z "$ac_c_werror_flag" ||
6932 test ! -s conftest.err
6933 } && test -s conftest.$ac_objext; then
6934 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006937sed 's/^/| /' conftest.$ac_ext >&5
6938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006939 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941
6942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006943fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006944{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6945echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006946
Martin v. Löwis11437992002-04-12 09:54:03 +00006947cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006948#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006949_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006950
Michael W. Hudson54241132001-12-07 15:38:26 +00006951
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006952{ echo "$as_me:$LINENO: checking for size_t" >&5
6953echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006954if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006956else
Benjamin Petersona8332062009-09-11 22:36:27 +00006957 cat >conftest.$ac_ext <<_ACEOF
6958/* confdefs.h. */
6959_ACEOF
6960cat confdefs.h >>conftest.$ac_ext
6961cat >>conftest.$ac_ext <<_ACEOF
6962/* end confdefs.h. */
6963$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006964typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006965int
6966main ()
6967{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006968if ((ac__type_new_ *) 0)
6969 return 0;
6970if (sizeof (ac__type_new_))
6971 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006972 ;
6973 return 0;
6974}
6975_ACEOF
6976rm -f conftest.$ac_objext
6977if { (ac_try="$ac_compile"
6978case "(($ac_try" in
6979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6980 *) ac_try_echo=$ac_try;;
6981esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006983 (eval "$ac_compile") 2>conftest.er1
6984 ac_status=$?
6985 grep -v '^ *+' conftest.er1 >conftest.err
6986 rm -f conftest.er1
6987 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006989 (exit $ac_status); } && {
6990 test -z "$ac_c_werror_flag" ||
6991 test ! -s conftest.err
6992 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006993 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006994else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006996sed 's/^/| /' conftest.$ac_ext >&5
6997
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006998 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000
7001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007002fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007003{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7004echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7005if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007007else
Martin v. Löwis11437992002-04-12 09:54:03 +00007008
7009cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007011_ACEOF
7012
7013fi
7014
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007015{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7016echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007017if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007019else
7020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007021/* confdefs.h. */
7022_ACEOF
7023cat confdefs.h >>conftest.$ac_ext
7024cat >>conftest.$ac_ext <<_ACEOF
7025/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007026#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007027
7028_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007030 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031 ac_cv_type_uid_t=yes
7032else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033 ac_cv_type_uid_t=no
7034fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00007035rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007038{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7039echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007040if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007041
Martin v. Löwis11437992002-04-12 09:54:03 +00007042cat >>confdefs.h <<\_ACEOF
7043#define uid_t int
7044_ACEOF
7045
7046
7047cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007048#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007049_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007050
7051fi
7052
Mark Dickinsonbd792642009-03-18 20:06:12 +00007053
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007054 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7055echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007056if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007057 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007058else
7059 ac_cv_c_uint32_t=no
7060 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7061 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7062 cat >conftest.$ac_ext <<_ACEOF
7063/* confdefs.h. */
7064_ACEOF
7065cat confdefs.h >>conftest.$ac_ext
7066cat >>conftest.$ac_ext <<_ACEOF
7067/* end confdefs.h. */
7068$ac_includes_default
7069int
7070main ()
7071{
7072static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7073test_array [0] = 0
7074
7075 ;
7076 return 0;
7077}
7078_ACEOF
7079rm -f conftest.$ac_objext
7080if { (ac_try="$ac_compile"
7081case "(($ac_try" in
7082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7083 *) ac_try_echo=$ac_try;;
7084esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007086 (eval "$ac_compile") 2>conftest.er1
7087 ac_status=$?
7088 grep -v '^ *+' conftest.er1 >conftest.err
7089 rm -f conftest.er1
7090 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007092 (exit $ac_status); } && {
7093 test -z "$ac_c_werror_flag" ||
7094 test ! -s conftest.err
7095 } && test -s conftest.$ac_objext; then
7096 case $ac_type in
7097 uint32_t) ac_cv_c_uint32_t=yes ;;
7098 *) ac_cv_c_uint32_t=$ac_type ;;
7099esac
7100
7101else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007102 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007103sed 's/^/| /' conftest.$ac_ext >&5
7104
7105
7106fi
7107
7108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7109 test "$ac_cv_c_uint32_t" != no && break
7110 done
7111fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007112{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7113echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007114 case $ac_cv_c_uint32_t in #(
7115 no|yes) ;; #(
7116 *)
7117
7118cat >>confdefs.h <<\_ACEOF
7119#define _UINT32_T 1
7120_ACEOF
7121
7122
7123cat >>confdefs.h <<_ACEOF
7124#define uint32_t $ac_cv_c_uint32_t
7125_ACEOF
7126;;
7127 esac
7128
7129
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007130 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7131echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007132if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007133 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007134else
7135 ac_cv_c_uint64_t=no
7136 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7137 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7138 cat >conftest.$ac_ext <<_ACEOF
7139/* confdefs.h. */
7140_ACEOF
7141cat confdefs.h >>conftest.$ac_ext
7142cat >>conftest.$ac_ext <<_ACEOF
7143/* end confdefs.h. */
7144$ac_includes_default
7145int
7146main ()
7147{
7148static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7149test_array [0] = 0
7150
7151 ;
7152 return 0;
7153}
7154_ACEOF
7155rm -f conftest.$ac_objext
7156if { (ac_try="$ac_compile"
7157case "(($ac_try" in
7158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7159 *) ac_try_echo=$ac_try;;
7160esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007162 (eval "$ac_compile") 2>conftest.er1
7163 ac_status=$?
7164 grep -v '^ *+' conftest.er1 >conftest.err
7165 rm -f conftest.er1
7166 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007168 (exit $ac_status); } && {
7169 test -z "$ac_c_werror_flag" ||
7170 test ! -s conftest.err
7171 } && test -s conftest.$ac_objext; then
7172 case $ac_type in
7173 uint64_t) ac_cv_c_uint64_t=yes ;;
7174 *) ac_cv_c_uint64_t=$ac_type ;;
7175esac
7176
7177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007178 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007179sed 's/^/| /' conftest.$ac_ext >&5
7180
7181
7182fi
7183
7184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7185 test "$ac_cv_c_uint64_t" != no && break
7186 done
7187fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007188{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7189echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007190 case $ac_cv_c_uint64_t in #(
7191 no|yes) ;; #(
7192 *)
7193
7194cat >>confdefs.h <<\_ACEOF
7195#define _UINT64_T 1
7196_ACEOF
7197
7198
7199cat >>confdefs.h <<_ACEOF
7200#define uint64_t $ac_cv_c_uint64_t
7201_ACEOF
7202;;
7203 esac
7204
7205
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007206 { echo "$as_me:$LINENO: checking for int32_t" >&5
7207echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007208if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007209 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007210else
7211 ac_cv_c_int32_t=no
7212 for ac_type in 'int32_t' 'int' 'long int' \
7213 'long long int' 'short int' 'signed char'; do
7214 cat >conftest.$ac_ext <<_ACEOF
7215/* confdefs.h. */
7216_ACEOF
7217cat confdefs.h >>conftest.$ac_ext
7218cat >>conftest.$ac_ext <<_ACEOF
7219/* end confdefs.h. */
7220$ac_includes_default
7221int
7222main ()
7223{
7224static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7225test_array [0] = 0
7226
7227 ;
7228 return 0;
7229}
7230_ACEOF
7231rm -f conftest.$ac_objext
7232if { (ac_try="$ac_compile"
7233case "(($ac_try" in
7234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7235 *) ac_try_echo=$ac_try;;
7236esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007238 (eval "$ac_compile") 2>conftest.er1
7239 ac_status=$?
7240 grep -v '^ *+' conftest.er1 >conftest.err
7241 rm -f conftest.er1
7242 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007244 (exit $ac_status); } && {
7245 test -z "$ac_c_werror_flag" ||
7246 test ! -s conftest.err
7247 } && test -s conftest.$ac_objext; then
7248 cat >conftest.$ac_ext <<_ACEOF
7249/* confdefs.h. */
7250_ACEOF
7251cat confdefs.h >>conftest.$ac_ext
7252cat >>conftest.$ac_ext <<_ACEOF
7253/* end confdefs.h. */
7254$ac_includes_default
7255int
7256main ()
7257{
7258static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007259 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007260test_array [0] = 0
7261
7262 ;
7263 return 0;
7264}
7265_ACEOF
7266rm -f conftest.$ac_objext
7267if { (ac_try="$ac_compile"
7268case "(($ac_try" in
7269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7270 *) ac_try_echo=$ac_try;;
7271esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007273 (eval "$ac_compile") 2>conftest.er1
7274 ac_status=$?
7275 grep -v '^ *+' conftest.er1 >conftest.err
7276 rm -f conftest.er1
7277 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007279 (exit $ac_status); } && {
7280 test -z "$ac_c_werror_flag" ||
7281 test ! -s conftest.err
7282 } && test -s conftest.$ac_objext; then
7283 :
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 case $ac_type in
7289 int32_t) ac_cv_c_int32_t=yes ;;
7290 *) ac_cv_c_int32_t=$ac_type ;;
7291esac
7292
7293fi
7294
7295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7296else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007297 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007298sed 's/^/| /' conftest.$ac_ext >&5
7299
7300
7301fi
7302
7303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7304 test "$ac_cv_c_int32_t" != no && break
7305 done
7306fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007307{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7308echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007309 case $ac_cv_c_int32_t in #(
7310 no|yes) ;; #(
7311 *)
7312
7313cat >>confdefs.h <<_ACEOF
7314#define int32_t $ac_cv_c_int32_t
7315_ACEOF
7316;;
7317 esac
7318
7319
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007320 { echo "$as_me:$LINENO: checking for int64_t" >&5
7321echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007322if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007323 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007324else
7325 ac_cv_c_int64_t=no
7326 for ac_type in 'int64_t' 'int' 'long int' \
7327 'long long int' 'short int' 'signed char'; do
7328 cat >conftest.$ac_ext <<_ACEOF
7329/* confdefs.h. */
7330_ACEOF
7331cat confdefs.h >>conftest.$ac_ext
7332cat >>conftest.$ac_ext <<_ACEOF
7333/* end confdefs.h. */
7334$ac_includes_default
7335int
7336main ()
7337{
7338static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7339test_array [0] = 0
7340
7341 ;
7342 return 0;
7343}
7344_ACEOF
7345rm -f conftest.$ac_objext
7346if { (ac_try="$ac_compile"
7347case "(($ac_try" in
7348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7349 *) ac_try_echo=$ac_try;;
7350esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007352 (eval "$ac_compile") 2>conftest.er1
7353 ac_status=$?
7354 grep -v '^ *+' conftest.er1 >conftest.err
7355 rm -f conftest.er1
7356 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007358 (exit $ac_status); } && {
7359 test -z "$ac_c_werror_flag" ||
7360 test ! -s conftest.err
7361 } && test -s conftest.$ac_objext; then
7362 cat >conftest.$ac_ext <<_ACEOF
7363/* confdefs.h. */
7364_ACEOF
7365cat confdefs.h >>conftest.$ac_ext
7366cat >>conftest.$ac_ext <<_ACEOF
7367/* end confdefs.h. */
7368$ac_includes_default
7369int
7370main ()
7371{
7372static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007373 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007374test_array [0] = 0
7375
7376 ;
7377 return 0;
7378}
7379_ACEOF
7380rm -f conftest.$ac_objext
7381if { (ac_try="$ac_compile"
7382case "(($ac_try" in
7383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7384 *) ac_try_echo=$ac_try;;
7385esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007387 (eval "$ac_compile") 2>conftest.er1
7388 ac_status=$?
7389 grep -v '^ *+' conftest.er1 >conftest.err
7390 rm -f conftest.er1
7391 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007393 (exit $ac_status); } && {
7394 test -z "$ac_c_werror_flag" ||
7395 test ! -s conftest.err
7396 } && test -s conftest.$ac_objext; then
7397 :
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 case $ac_type in
7403 int64_t) ac_cv_c_int64_t=yes ;;
7404 *) ac_cv_c_int64_t=$ac_type ;;
7405esac
7406
7407fi
7408
7409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007411 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007412sed 's/^/| /' conftest.$ac_ext >&5
7413
7414
7415fi
7416
7417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7418 test "$ac_cv_c_int64_t" != no && break
7419 done
7420fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007421{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7422echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007423 case $ac_cv_c_int64_t in #(
7424 no|yes) ;; #(
7425 *)
7426
7427cat >>confdefs.h <<_ACEOF
7428#define int64_t $ac_cv_c_int64_t
7429_ACEOF
7430;;
7431 esac
7432
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007433{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7434echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007436 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007437else
Benjamin Petersona8332062009-09-11 22:36:27 +00007438 cat >conftest.$ac_ext <<_ACEOF
7439/* confdefs.h. */
7440_ACEOF
7441cat confdefs.h >>conftest.$ac_ext
7442cat >>conftest.$ac_ext <<_ACEOF
7443/* end confdefs.h. */
7444$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007445typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007446int
7447main ()
7448{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007449if ((ac__type_new_ *) 0)
7450 return 0;
7451if (sizeof (ac__type_new_))
7452 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007453 ;
7454 return 0;
7455}
7456_ACEOF
7457rm -f conftest.$ac_objext
7458if { (ac_try="$ac_compile"
7459case "(($ac_try" in
7460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7461 *) ac_try_echo=$ac_try;;
7462esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007464 (eval "$ac_compile") 2>conftest.er1
7465 ac_status=$?
7466 grep -v '^ *+' conftest.er1 >conftest.err
7467 rm -f conftest.er1
7468 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007470 (exit $ac_status); } && {
7471 test -z "$ac_c_werror_flag" ||
7472 test ! -s conftest.err
7473 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007474 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007475else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007476 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007477sed 's/^/| /' conftest.$ac_ext >&5
7478
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007479 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007481
7482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007483fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007484{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7485echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7486if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007487
7488cat >>confdefs.h <<\_ACEOF
7489#define HAVE_SSIZE_T 1
7490_ACEOF
7491
7492fi
7493
Jack Jansendd19cf82001-12-06 22:36:17 +00007494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007496# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007497{ echo "$as_me:$LINENO: checking for int" >&5
7498echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7499if test "${ac_cv_type_int+set}" = set; then
7500 echo $ECHO_N "(cached) $ECHO_C" >&6
7501else
7502 cat >conftest.$ac_ext <<_ACEOF
7503/* confdefs.h. */
7504_ACEOF
7505cat confdefs.h >>conftest.$ac_ext
7506cat >>conftest.$ac_ext <<_ACEOF
7507/* end confdefs.h. */
7508$ac_includes_default
7509typedef int ac__type_new_;
7510int
7511main ()
7512{
7513if ((ac__type_new_ *) 0)
7514 return 0;
7515if (sizeof (ac__type_new_))
7516 return 0;
7517 ;
7518 return 0;
7519}
7520_ACEOF
7521rm -f conftest.$ac_objext
7522if { (ac_try="$ac_compile"
7523case "(($ac_try" in
7524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7525 *) ac_try_echo=$ac_try;;
7526esac
7527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7528 (eval "$ac_compile") 2>conftest.er1
7529 ac_status=$?
7530 grep -v '^ *+' conftest.er1 >conftest.err
7531 rm -f conftest.er1
7532 cat conftest.err >&5
7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534 (exit $ac_status); } && {
7535 test -z "$ac_c_werror_flag" ||
7536 test ! -s conftest.err
7537 } && test -s conftest.$ac_objext; then
7538 ac_cv_type_int=yes
7539else
7540 echo "$as_me: failed program was:" >&5
7541sed 's/^/| /' conftest.$ac_ext >&5
7542
7543 ac_cv_type_int=no
7544fi
7545
7546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7547fi
7548{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7549echo "${ECHO_T}$ac_cv_type_int" >&6; }
7550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551# The cast to long int works around a bug in the HP C Compiler
7552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7554# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007555{ echo "$as_me:$LINENO: checking size of int" >&5
7556echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007557if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007559else
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 if test "$cross_compiling" = yes; then
7561 # Depending upon the size, compute the lo and hi bounds.
7562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007563/* confdefs.h. */
7564_ACEOF
7565cat confdefs.h >>conftest.$ac_ext
7566cat >>conftest.$ac_ext <<_ACEOF
7567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007568$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007569 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007570int
7571main ()
7572{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007574test_array [0] = 0
7575
7576 ;
7577 return 0;
7578}
7579_ACEOF
7580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007581if { (ac_try="$ac_compile"
7582case "(($ac_try" in
7583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7584 *) ac_try_echo=$ac_try;;
7585esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007589 grep -v '^ *+' conftest.er1 >conftest.err
7590 rm -f conftest.er1
7591 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 (exit $ac_status); } && {
7594 test -z "$ac_c_werror_flag" ||
7595 test ! -s conftest.err
7596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007597 ac_lo=0 ac_mid=0
7598 while :; do
7599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007600/* confdefs.h. */
7601_ACEOF
7602cat confdefs.h >>conftest.$ac_ext
7603cat >>conftest.$ac_ext <<_ACEOF
7604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007605$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007606 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007607int
7608main ()
7609{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007610static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007611test_array [0] = 0
7612
7613 ;
7614 return 0;
7615}
7616_ACEOF
7617rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618if { (ac_try="$ac_compile"
7619case "(($ac_try" in
7620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7621 *) ac_try_echo=$ac_try;;
7622esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007626 grep -v '^ *+' conftest.er1 >conftest.err
7627 rm -f conftest.er1
7628 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630 (exit $ac_status); } && {
7631 test -z "$ac_c_werror_flag" ||
7632 test ! -s conftest.err
7633 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 ac_hi=$ac_mid; break
7635else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007637sed 's/^/| /' conftest.$ac_ext >&5
7638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639 ac_lo=`expr $ac_mid + 1`
7640 if test $ac_lo -le $ac_mid; then
7641 ac_lo= ac_hi=
7642 break
7643 fi
7644 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646
7647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007648 done
7649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007651sed 's/^/| /' conftest.$ac_ext >&5
7652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007654/* confdefs.h. */
7655_ACEOF
7656cat confdefs.h >>conftest.$ac_ext
7657cat >>conftest.$ac_ext <<_ACEOF
7658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007659$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007660 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007661int
7662main ()
7663{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007665test_array [0] = 0
7666
7667 ;
7668 return 0;
7669}
7670_ACEOF
7671rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672if { (ac_try="$ac_compile"
7673case "(($ac_try" in
7674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7675 *) ac_try_echo=$ac_try;;
7676esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007680 grep -v '^ *+' conftest.er1 >conftest.err
7681 rm -f conftest.er1
7682 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684 (exit $ac_status); } && {
7685 test -z "$ac_c_werror_flag" ||
7686 test ! -s conftest.err
7687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 ac_hi=-1 ac_mid=-1
7689 while :; do
7690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007691/* confdefs.h. */
7692_ACEOF
7693cat confdefs.h >>conftest.$ac_ext
7694cat >>conftest.$ac_ext <<_ACEOF
7695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007696$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007697 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007698int
7699main ()
7700{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007701static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007702test_array [0] = 0
7703
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709if { (ac_try="$ac_compile"
7710case "(($ac_try" in
7711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7712 *) ac_try_echo=$ac_try;;
7713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007717 grep -v '^ *+' conftest.er1 >conftest.err
7718 rm -f conftest.er1
7719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721 (exit $ac_status); } && {
7722 test -z "$ac_c_werror_flag" ||
7723 test ! -s conftest.err
7724 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007725 ac_lo=$ac_mid; break
7726else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007728sed 's/^/| /' conftest.$ac_ext >&5
7729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730 ac_hi=`expr '(' $ac_mid ')' - 1`
7731 if test $ac_mid -le $ac_hi; then
7732 ac_lo= ac_hi=
7733 break
7734 fi
7735 ac_mid=`expr 2 '*' $ac_mid`
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 done
7740else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007742sed 's/^/| /' conftest.$ac_ext >&5
7743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746
7747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749
7750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007751# Binary search between lo and hi bounds.
7752while test "x$ac_lo" != "x$ac_hi"; do
7753 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007755/* confdefs.h. */
7756_ACEOF
7757cat confdefs.h >>conftest.$ac_ext
7758cat >>conftest.$ac_ext <<_ACEOF
7759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007760$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007761 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007762int
7763main ()
7764{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007766test_array [0] = 0
7767
7768 ;
7769 return 0;
7770}
7771_ACEOF
7772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773if { (ac_try="$ac_compile"
7774case "(($ac_try" in
7775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7776 *) ac_try_echo=$ac_try;;
7777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007781 grep -v '^ *+' conftest.er1 >conftest.err
7782 rm -f conftest.er1
7783 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 (exit $ac_status); } && {
7786 test -z "$ac_c_werror_flag" ||
7787 test ! -s conftest.err
7788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 ac_hi=$ac_mid
7790else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007792sed 's/^/| /' conftest.$ac_ext >&5
7793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796
7797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007798done
7799case $ac_lo in
7800?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007802 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007803See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007804echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007805See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007806 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 else
7808 ac_cv_sizeof_int=0
7809 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007810esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007811else
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007813/* confdefs.h. */
7814_ACEOF
7815cat confdefs.h >>conftest.$ac_ext
7816cat >>conftest.$ac_ext <<_ACEOF
7817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007818$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007819 typedef int ac__type_sizeof_;
7820static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7821static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007822#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007823#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007824int
7825main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826{
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
7828 FILE *f = fopen ("conftest.val", "w");
7829 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007831 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007834 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007836 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 }
7838 else
7839 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007841 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007843 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007846
7847 ;
7848 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007849}
Martin v. Löwis11437992002-04-12 09:54:03 +00007850_ACEOF
7851rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852if { (ac_try="$ac_link"
7853case "(($ac_try" in
7854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7855 *) ac_try_echo=$ac_try;;
7856esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 { (case "(($ac_try" in
7863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7864 *) ac_try_echo=$ac_try;;
7865esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 (exit $ac_status); }; }; then
7871 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007872else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007873 echo "$as_me: program exited with status $ac_status" >&5
7874echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007875sed 's/^/| /' conftest.$ac_ext >&5
7876
Martin v. Löwis11437992002-04-12 09:54:03 +00007877( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007879 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007880See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007881echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007882See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007883 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884 else
7885 ac_cv_sizeof_int=0
7886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888rm -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 +00007889fi
7890rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007891fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007892{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7893echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894
7895
7896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007898#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007899_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007900
7901
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007902{ echo "$as_me:$LINENO: checking for long" >&5
7903echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7904if test "${ac_cv_type_long+set}" = set; then
7905 echo $ECHO_N "(cached) $ECHO_C" >&6
7906else
7907 cat >conftest.$ac_ext <<_ACEOF
7908/* confdefs.h. */
7909_ACEOF
7910cat confdefs.h >>conftest.$ac_ext
7911cat >>conftest.$ac_ext <<_ACEOF
7912/* end confdefs.h. */
7913$ac_includes_default
7914typedef long ac__type_new_;
7915int
7916main ()
7917{
7918if ((ac__type_new_ *) 0)
7919 return 0;
7920if (sizeof (ac__type_new_))
7921 return 0;
7922 ;
7923 return 0;
7924}
7925_ACEOF
7926rm -f conftest.$ac_objext
7927if { (ac_try="$ac_compile"
7928case "(($ac_try" in
7929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7930 *) ac_try_echo=$ac_try;;
7931esac
7932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7933 (eval "$ac_compile") 2>conftest.er1
7934 ac_status=$?
7935 grep -v '^ *+' conftest.er1 >conftest.err
7936 rm -f conftest.er1
7937 cat conftest.err >&5
7938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939 (exit $ac_status); } && {
7940 test -z "$ac_c_werror_flag" ||
7941 test ! -s conftest.err
7942 } && test -s conftest.$ac_objext; then
7943 ac_cv_type_long=yes
7944else
7945 echo "$as_me: failed program was:" >&5
7946sed 's/^/| /' conftest.$ac_ext >&5
7947
7948 ac_cv_type_long=no
7949fi
7950
7951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7952fi
7953{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7954echo "${ECHO_T}$ac_cv_type_long" >&6; }
7955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956# The cast to long int works around a bug in the HP C Compiler
7957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7959# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007960{ echo "$as_me:$LINENO: checking size of long" >&5
7961echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007962if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007963 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 if test "$cross_compiling" = yes; then
7966 # Depending upon the size, compute the lo and hi bounds.
7967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007968/* confdefs.h. */
7969_ACEOF
7970cat confdefs.h >>conftest.$ac_ext
7971cat >>conftest.$ac_ext <<_ACEOF
7972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007973$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007974 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007975int
7976main ()
7977{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007978static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007979test_array [0] = 0
7980
7981 ;
7982 return 0;
7983}
7984_ACEOF
7985rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986if { (ac_try="$ac_compile"
7987case "(($ac_try" in
7988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7989 *) ac_try_echo=$ac_try;;
7990esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007994 grep -v '^ *+' conftest.er1 >conftest.err
7995 rm -f conftest.er1
7996 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 (exit $ac_status); } && {
7999 test -z "$ac_c_werror_flag" ||
8000 test ! -s conftest.err
8001 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_lo=0 ac_mid=0
8003 while :; do
8004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008005/* confdefs.h. */
8006_ACEOF
8007cat confdefs.h >>conftest.$ac_ext
8008cat >>conftest.$ac_ext <<_ACEOF
8009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008010$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008011 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008012int
8013main ()
8014{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008016test_array [0] = 0
8017
8018 ;
8019 return 0;
8020}
8021_ACEOF
8022rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023if { (ac_try="$ac_compile"
8024case "(($ac_try" in
8025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8026 *) ac_try_echo=$ac_try;;
8027esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008031 grep -v '^ *+' conftest.er1 >conftest.err
8032 rm -f conftest.er1
8033 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035 (exit $ac_status); } && {
8036 test -z "$ac_c_werror_flag" ||
8037 test ! -s conftest.err
8038 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 ac_hi=$ac_mid; break
8040else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008042sed 's/^/| /' conftest.$ac_ext >&5
8043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 ac_lo=`expr $ac_mid + 1`
8045 if test $ac_lo -le $ac_mid; then
8046 ac_lo= ac_hi=
8047 break
8048 fi
8049 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051
8052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008053 done
8054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008056sed 's/^/| /' conftest.$ac_ext >&5
8057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008059/* confdefs.h. */
8060_ACEOF
8061cat confdefs.h >>conftest.$ac_ext
8062cat >>conftest.$ac_ext <<_ACEOF
8063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008064$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008065 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008066int
8067main ()
8068{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008070test_array [0] = 0
8071
8072 ;
8073 return 0;
8074}
8075_ACEOF
8076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077if { (ac_try="$ac_compile"
8078case "(($ac_try" in
8079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8080 *) ac_try_echo=$ac_try;;
8081esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008085 grep -v '^ *+' conftest.er1 >conftest.err
8086 rm -f conftest.er1
8087 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089 (exit $ac_status); } && {
8090 test -z "$ac_c_werror_flag" ||
8091 test ! -s conftest.err
8092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ac_hi=-1 ac_mid=-1
8094 while :; do
8095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008096/* confdefs.h. */
8097_ACEOF
8098cat confdefs.h >>conftest.$ac_ext
8099cat >>conftest.$ac_ext <<_ACEOF
8100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008101$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008102 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008103int
8104main ()
8105{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008106static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008107test_array [0] = 0
8108
8109 ;
8110 return 0;
8111}
8112_ACEOF
8113rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114if { (ac_try="$ac_compile"
8115case "(($ac_try" in
8116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8117 *) ac_try_echo=$ac_try;;
8118esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008122 grep -v '^ *+' conftest.er1 >conftest.err
8123 rm -f conftest.er1
8124 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126 (exit $ac_status); } && {
8127 test -z "$ac_c_werror_flag" ||
8128 test ! -s conftest.err
8129 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008130 ac_lo=$ac_mid; break
8131else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008133sed 's/^/| /' conftest.$ac_ext >&5
8134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008135 ac_hi=`expr '(' $ac_mid ')' - 1`
8136 if test $ac_mid -le $ac_hi; then
8137 ac_lo= ac_hi=
8138 break
8139 fi
8140 ac_mid=`expr 2 '*' $ac_mid`
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 done
8145else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008147sed 's/^/| /' conftest.$ac_ext >&5
8148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151
8152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154
8155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008156# Binary search between lo and hi bounds.
8157while test "x$ac_lo" != "x$ac_hi"; do
8158 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008160/* confdefs.h. */
8161_ACEOF
8162cat confdefs.h >>conftest.$ac_ext
8163cat >>conftest.$ac_ext <<_ACEOF
8164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008165$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008166 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008167int
8168main ()
8169{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008171test_array [0] = 0
8172
8173 ;
8174 return 0;
8175}
8176_ACEOF
8177rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178if { (ac_try="$ac_compile"
8179case "(($ac_try" in
8180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8181 *) ac_try_echo=$ac_try;;
8182esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008186 grep -v '^ *+' conftest.er1 >conftest.err
8187 rm -f conftest.er1
8188 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 (exit $ac_status); } && {
8191 test -z "$ac_c_werror_flag" ||
8192 test ! -s conftest.err
8193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 ac_hi=$ac_mid
8195else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008197sed 's/^/| /' conftest.$ac_ext >&5
8198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201
8202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008203done
8204case $ac_lo in
8205?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008207 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008208See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008209echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008210See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008211 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 else
8213 ac_cv_sizeof_long=0
8214 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008215esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008218/* confdefs.h. */
8219_ACEOF
8220cat confdefs.h >>conftest.$ac_ext
8221cat >>conftest.$ac_ext <<_ACEOF
8222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008223$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008224 typedef long ac__type_sizeof_;
8225static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8226static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008227#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008228#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008229int
8230main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231{
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233 FILE *f = fopen ("conftest.val", "w");
8234 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008236 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008239 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008241 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 }
8243 else
8244 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008246 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008248 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
8252 ;
8253 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008254}
Martin v. Löwis11437992002-04-12 09:54:03 +00008255_ACEOF
8256rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257if { (ac_try="$ac_link"
8258case "(($ac_try" in
8259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8260 *) ac_try_echo=$ac_try;;
8261esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267 { (case "(($ac_try" in
8268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8269 *) ac_try_echo=$ac_try;;
8270esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 (exit $ac_status); }; }; then
8276 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008278 echo "$as_me: program exited with status $ac_status" >&5
8279echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008280sed 's/^/| /' conftest.$ac_ext >&5
8281
Martin v. Löwis11437992002-04-12 09:54:03 +00008282( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008284 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008285See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008286echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008287See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008288 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289 else
8290 ac_cv_sizeof_long=0
8291 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293rm -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 +00008294fi
8295rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008296fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008297{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8298echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299
8300
8301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008303#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008304_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008305
8306
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008307{ echo "$as_me:$LINENO: checking for void *" >&5
8308echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8309if test "${ac_cv_type_void_p+set}" = set; then
8310 echo $ECHO_N "(cached) $ECHO_C" >&6
8311else
8312 cat >conftest.$ac_ext <<_ACEOF
8313/* confdefs.h. */
8314_ACEOF
8315cat confdefs.h >>conftest.$ac_ext
8316cat >>conftest.$ac_ext <<_ACEOF
8317/* end confdefs.h. */
8318$ac_includes_default
8319typedef void * ac__type_new_;
8320int
8321main ()
8322{
8323if ((ac__type_new_ *) 0)
8324 return 0;
8325if (sizeof (ac__type_new_))
8326 return 0;
8327 ;
8328 return 0;
8329}
8330_ACEOF
8331rm -f conftest.$ac_objext
8332if { (ac_try="$ac_compile"
8333case "(($ac_try" in
8334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8335 *) ac_try_echo=$ac_try;;
8336esac
8337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8338 (eval "$ac_compile") 2>conftest.er1
8339 ac_status=$?
8340 grep -v '^ *+' conftest.er1 >conftest.err
8341 rm -f conftest.er1
8342 cat conftest.err >&5
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); } && {
8345 test -z "$ac_c_werror_flag" ||
8346 test ! -s conftest.err
8347 } && test -s conftest.$ac_objext; then
8348 ac_cv_type_void_p=yes
8349else
8350 echo "$as_me: failed program was:" >&5
8351sed 's/^/| /' conftest.$ac_ext >&5
8352
8353 ac_cv_type_void_p=no
8354fi
8355
8356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8357fi
8358{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8359echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008365{ echo "$as_me:$LINENO: checking size of void *" >&5
8366echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008367if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 if test "$cross_compiling" = yes; then
8371 # Depending upon the size, compute the lo and hi bounds.
8372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008373/* confdefs.h. */
8374_ACEOF
8375cat confdefs.h >>conftest.$ac_ext
8376cat >>conftest.$ac_ext <<_ACEOF
8377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008378$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008379 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008384test_array [0] = 0
8385
8386 ;
8387 return 0;
8388}
8389_ACEOF
8390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391if { (ac_try="$ac_compile"
8392case "(($ac_try" in
8393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8394 *) ac_try_echo=$ac_try;;
8395esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008399 grep -v '^ *+' conftest.er1 >conftest.err
8400 rm -f conftest.er1
8401 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403 (exit $ac_status); } && {
8404 test -z "$ac_c_werror_flag" ||
8405 test ! -s conftest.err
8406 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 ac_lo=0 ac_mid=0
8408 while :; do
8409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008410/* confdefs.h. */
8411_ACEOF
8412cat confdefs.h >>conftest.$ac_ext
8413cat >>conftest.$ac_ext <<_ACEOF
8414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008415$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008416 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008417int
8418main ()
8419{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008421test_array [0] = 0
8422
8423 ;
8424 return 0;
8425}
8426_ACEOF
8427rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428if { (ac_try="$ac_compile"
8429case "(($ac_try" in
8430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8431 *) ac_try_echo=$ac_try;;
8432esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008436 grep -v '^ *+' conftest.er1 >conftest.err
8437 rm -f conftest.er1
8438 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440 (exit $ac_status); } && {
8441 test -z "$ac_c_werror_flag" ||
8442 test ! -s conftest.err
8443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ac_hi=$ac_mid; break
8445else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008447sed 's/^/| /' conftest.$ac_ext >&5
8448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449 ac_lo=`expr $ac_mid + 1`
8450 if test $ac_lo -le $ac_mid; then
8451 ac_lo= ac_hi=
8452 break
8453 fi
8454 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456
8457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 done
8459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008461sed 's/^/| /' conftest.$ac_ext >&5
8462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008464/* confdefs.h. */
8465_ACEOF
8466cat confdefs.h >>conftest.$ac_ext
8467cat >>conftest.$ac_ext <<_ACEOF
8468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008469$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008470 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008471int
8472main ()
8473{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008475test_array [0] = 0
8476
8477 ;
8478 return 0;
8479}
8480_ACEOF
8481rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482if { (ac_try="$ac_compile"
8483case "(($ac_try" in
8484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8485 *) ac_try_echo=$ac_try;;
8486esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008490 grep -v '^ *+' conftest.er1 >conftest.err
8491 rm -f conftest.er1
8492 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494 (exit $ac_status); } && {
8495 test -z "$ac_c_werror_flag" ||
8496 test ! -s conftest.err
8497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_hi=-1 ac_mid=-1
8499 while :; do
8500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* confdefs.h. */
8502_ACEOF
8503cat confdefs.h >>conftest.$ac_ext
8504cat >>conftest.$ac_ext <<_ACEOF
8505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008507 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008508int
8509main ()
8510{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008511static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008512test_array [0] = 0
8513
8514 ;
8515 return 0;
8516}
8517_ACEOF
8518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519if { (ac_try="$ac_compile"
8520case "(($ac_try" in
8521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8522 *) ac_try_echo=$ac_try;;
8523esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008527 grep -v '^ *+' conftest.er1 >conftest.err
8528 rm -f conftest.er1
8529 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531 (exit $ac_status); } && {
8532 test -z "$ac_c_werror_flag" ||
8533 test ! -s conftest.err
8534 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ac_lo=$ac_mid; break
8536else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008538sed 's/^/| /' conftest.$ac_ext >&5
8539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 ac_hi=`expr '(' $ac_mid ')' - 1`
8541 if test $ac_mid -le $ac_hi; then
8542 ac_lo= ac_hi=
8543 break
8544 fi
8545 ac_mid=`expr 2 '*' $ac_mid`
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 done
8550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008552sed 's/^/| /' conftest.$ac_ext >&5
8553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556
8557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559
8560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008561# Binary search between lo and hi bounds.
8562while test "x$ac_lo" != "x$ac_hi"; do
8563 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008565/* confdefs.h. */
8566_ACEOF
8567cat confdefs.h >>conftest.$ac_ext
8568cat >>conftest.$ac_ext <<_ACEOF
8569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008570$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008571 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008572int
8573main ()
8574{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008576test_array [0] = 0
8577
8578 ;
8579 return 0;
8580}
8581_ACEOF
8582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583if { (ac_try="$ac_compile"
8584case "(($ac_try" in
8585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8586 *) ac_try_echo=$ac_try;;
8587esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008591 grep -v '^ *+' conftest.er1 >conftest.err
8592 rm -f conftest.er1
8593 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595 (exit $ac_status); } && {
8596 test -z "$ac_c_werror_flag" ||
8597 test ! -s conftest.err
8598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 ac_hi=$ac_mid
8600else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008602sed 's/^/| /' conftest.$ac_ext >&5
8603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606
8607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008608done
8609case $ac_lo in
8610?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008612 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008613See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008614echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008615See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008616 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 else
8618 ac_cv_sizeof_void_p=0
8619 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008620esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008621else
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008623/* confdefs.h. */
8624_ACEOF
8625cat confdefs.h >>conftest.$ac_ext
8626cat >>conftest.$ac_ext <<_ACEOF
8627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008628$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008629 typedef void * ac__type_sizeof_;
8630static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8631static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008632#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008633#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008634int
8635main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008636{
Martin v. Löwis11437992002-04-12 09:54:03 +00008637
8638 FILE *f = fopen ("conftest.val", "w");
8639 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008641 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008644 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008646 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 }
8648 else
8649 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008651 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008653 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008656
8657 ;
8658 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008659}
Martin v. Löwis11437992002-04-12 09:54:03 +00008660_ACEOF
8661rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662if { (ac_try="$ac_link"
8663case "(($ac_try" in
8664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8665 *) ac_try_echo=$ac_try;;
8666esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672 { (case "(($ac_try" in
8673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8674 *) ac_try_echo=$ac_try;;
8675esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 (exit $ac_status); }; }; then
8681 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008682else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008683 echo "$as_me: program exited with status $ac_status" >&5
8684echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008685sed 's/^/| /' conftest.$ac_ext >&5
8686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008689 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008690See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008691echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008692See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008693 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694 else
8695 ac_cv_sizeof_void_p=0
8696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698rm -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 +00008699fi
8700rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008701fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008702{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8703echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704
8705
8706
Martin v. Löwis11437992002-04-12 09:54:03 +00008707cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008708#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008709_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008710
8711
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008712{ echo "$as_me:$LINENO: checking for short" >&5
8713echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8714if test "${ac_cv_type_short+set}" = set; then
8715 echo $ECHO_N "(cached) $ECHO_C" >&6
8716else
8717 cat >conftest.$ac_ext <<_ACEOF
8718/* confdefs.h. */
8719_ACEOF
8720cat confdefs.h >>conftest.$ac_ext
8721cat >>conftest.$ac_ext <<_ACEOF
8722/* end confdefs.h. */
8723$ac_includes_default
8724typedef short ac__type_new_;
8725int
8726main ()
8727{
8728if ((ac__type_new_ *) 0)
8729 return 0;
8730if (sizeof (ac__type_new_))
8731 return 0;
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736rm -f conftest.$ac_objext
8737if { (ac_try="$ac_compile"
8738case "(($ac_try" in
8739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8740 *) ac_try_echo=$ac_try;;
8741esac
8742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8743 (eval "$ac_compile") 2>conftest.er1
8744 ac_status=$?
8745 grep -v '^ *+' conftest.er1 >conftest.err
8746 rm -f conftest.er1
8747 cat conftest.err >&5
8748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749 (exit $ac_status); } && {
8750 test -z "$ac_c_werror_flag" ||
8751 test ! -s conftest.err
8752 } && test -s conftest.$ac_objext; then
8753 ac_cv_type_short=yes
8754else
8755 echo "$as_me: failed program was:" >&5
8756sed 's/^/| /' conftest.$ac_ext >&5
8757
8758 ac_cv_type_short=no
8759fi
8760
8761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8762fi
8763{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8764echo "${ECHO_T}$ac_cv_type_short" >&6; }
8765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766# The cast to long int works around a bug in the HP C Compiler
8767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8769# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008770{ echo "$as_me:$LINENO: checking size of short" >&5
8771echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008772if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008773 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008774else
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 if test "$cross_compiling" = yes; then
8776 # Depending upon the size, compute the lo and hi bounds.
8777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008784 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008785int
8786main ()
8787{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008789test_array [0] = 0
8790
8791 ;
8792 return 0;
8793}
8794_ACEOF
8795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796if { (ac_try="$ac_compile"
8797case "(($ac_try" in
8798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8799 *) ac_try_echo=$ac_try;;
8800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008804 grep -v '^ *+' conftest.er1 >conftest.err
8805 rm -f conftest.er1
8806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808 (exit $ac_status); } && {
8809 test -z "$ac_c_werror_flag" ||
8810 test ! -s conftest.err
8811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_lo=0 ac_mid=0
8813 while :; do
8814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008815/* confdefs.h. */
8816_ACEOF
8817cat confdefs.h >>conftest.$ac_ext
8818cat >>conftest.$ac_ext <<_ACEOF
8819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008820$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008821 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008822int
8823main ()
8824{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008825static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008826test_array [0] = 0
8827
8828 ;
8829 return 0;
8830}
8831_ACEOF
8832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833if { (ac_try="$ac_compile"
8834case "(($ac_try" in
8835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8836 *) ac_try_echo=$ac_try;;
8837esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008841 grep -v '^ *+' conftest.er1 >conftest.err
8842 rm -f conftest.er1
8843 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845 (exit $ac_status); } && {
8846 test -z "$ac_c_werror_flag" ||
8847 test ! -s conftest.err
8848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_hi=$ac_mid; break
8850else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008852sed 's/^/| /' conftest.$ac_ext >&5
8853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854 ac_lo=`expr $ac_mid + 1`
8855 if test $ac_lo -le $ac_mid; then
8856 ac_lo= ac_hi=
8857 break
8858 fi
8859 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008861
8862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 done
8864else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008866sed 's/^/| /' conftest.$ac_ext >&5
8867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008869/* confdefs.h. */
8870_ACEOF
8871cat confdefs.h >>conftest.$ac_ext
8872cat >>conftest.$ac_ext <<_ACEOF
8873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008874$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008875 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008876int
8877main ()
8878{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008879static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008880test_array [0] = 0
8881
8882 ;
8883 return 0;
8884}
8885_ACEOF
8886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887if { (ac_try="$ac_compile"
8888case "(($ac_try" in
8889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8890 *) ac_try_echo=$ac_try;;
8891esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008895 grep -v '^ *+' conftest.er1 >conftest.err
8896 rm -f conftest.er1
8897 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 (exit $ac_status); } && {
8900 test -z "$ac_c_werror_flag" ||
8901 test ! -s conftest.err
8902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_hi=-1 ac_mid=-1
8904 while :; do
8905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* confdefs.h. */
8907_ACEOF
8908cat confdefs.h >>conftest.$ac_ext
8909cat >>conftest.$ac_ext <<_ACEOF
8910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008912 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008916static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008917test_array [0] = 0
8918
8919 ;
8920 return 0;
8921}
8922_ACEOF
8923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924if { (ac_try="$ac_compile"
8925case "(($ac_try" in
8926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8927 *) ac_try_echo=$ac_try;;
8928esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008932 grep -v '^ *+' conftest.er1 >conftest.err
8933 rm -f conftest.er1
8934 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936 (exit $ac_status); } && {
8937 test -z "$ac_c_werror_flag" ||
8938 test ! -s conftest.err
8939 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 ac_lo=$ac_mid; break
8941else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008943sed 's/^/| /' conftest.$ac_ext >&5
8944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945 ac_hi=`expr '(' $ac_mid ')' - 1`
8946 if test $ac_mid -le $ac_hi; then
8947 ac_lo= ac_hi=
8948 break
8949 fi
8950 ac_mid=`expr 2 '*' $ac_mid`
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 done
8955else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008957sed 's/^/| /' conftest.$ac_ext >&5
8958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961
8962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964
8965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008966# Binary search between lo and hi bounds.
8967while test "x$ac_lo" != "x$ac_hi"; do
8968 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008970/* confdefs.h. */
8971_ACEOF
8972cat confdefs.h >>conftest.$ac_ext
8973cat >>conftest.$ac_ext <<_ACEOF
8974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008975$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008976 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008977int
8978main ()
8979{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008981test_array [0] = 0
8982
8983 ;
8984 return 0;
8985}
8986_ACEOF
8987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988if { (ac_try="$ac_compile"
8989case "(($ac_try" in
8990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8991 *) ac_try_echo=$ac_try;;
8992esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008996 grep -v '^ *+' conftest.er1 >conftest.err
8997 rm -f conftest.er1
8998 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 (exit $ac_status); } && {
9001 test -z "$ac_c_werror_flag" ||
9002 test ! -s conftest.err
9003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ac_hi=$ac_mid
9005else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009007sed 's/^/| /' conftest.$ac_ext >&5
9008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011
9012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009013done
9014case $ac_lo in
9015?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009016'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009017 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009018See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009019echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009020See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009021 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 else
9023 ac_cv_sizeof_short=0
9024 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009025esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009026else
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009028/* confdefs.h. */
9029_ACEOF
9030cat confdefs.h >>conftest.$ac_ext
9031cat >>conftest.$ac_ext <<_ACEOF
9032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009033$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009034 typedef short ac__type_sizeof_;
9035static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9036static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009037#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009038#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009039int
9040main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041{
Martin v. Löwis11437992002-04-12 09:54:03 +00009042
9043 FILE *f = fopen ("conftest.val", "w");
9044 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009046 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009049 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009051 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 }
9053 else
9054 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009056 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009058 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009061
9062 ;
9063 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009064}
Martin v. Löwis11437992002-04-12 09:54:03 +00009065_ACEOF
9066rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067if { (ac_try="$ac_link"
9068case "(($ac_try" in
9069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9070 *) ac_try_echo=$ac_try;;
9071esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077 { (case "(($ac_try" in
9078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9079 *) ac_try_echo=$ac_try;;
9080esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 (exit $ac_status); }; }; then
9086 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009087else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009088 echo "$as_me: program exited with status $ac_status" >&5
9089echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009090sed 's/^/| /' conftest.$ac_ext >&5
9091
Martin v. Löwis11437992002-04-12 09:54:03 +00009092( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009094 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009095See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009096echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009097See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009098 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099 else
9100 ac_cv_sizeof_short=0
9101 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103rm -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 +00009104fi
9105rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009106fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009107{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9108echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009109
9110
9111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009113#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009114_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009115
9116
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009117{ echo "$as_me:$LINENO: checking for float" >&5
9118echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9119if test "${ac_cv_type_float+set}" = set; then
9120 echo $ECHO_N "(cached) $ECHO_C" >&6
9121else
9122 cat >conftest.$ac_ext <<_ACEOF
9123/* confdefs.h. */
9124_ACEOF
9125cat confdefs.h >>conftest.$ac_ext
9126cat >>conftest.$ac_ext <<_ACEOF
9127/* end confdefs.h. */
9128$ac_includes_default
9129typedef float ac__type_new_;
9130int
9131main ()
9132{
9133if ((ac__type_new_ *) 0)
9134 return 0;
9135if (sizeof (ac__type_new_))
9136 return 0;
9137 ;
9138 return 0;
9139}
9140_ACEOF
9141rm -f conftest.$ac_objext
9142if { (ac_try="$ac_compile"
9143case "(($ac_try" in
9144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9145 *) ac_try_echo=$ac_try;;
9146esac
9147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9148 (eval "$ac_compile") 2>conftest.er1
9149 ac_status=$?
9150 grep -v '^ *+' conftest.er1 >conftest.err
9151 rm -f conftest.er1
9152 cat conftest.err >&5
9153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9154 (exit $ac_status); } && {
9155 test -z "$ac_c_werror_flag" ||
9156 test ! -s conftest.err
9157 } && test -s conftest.$ac_objext; then
9158 ac_cv_type_float=yes
9159else
9160 echo "$as_me: failed program was:" >&5
9161sed 's/^/| /' conftest.$ac_ext >&5
9162
9163 ac_cv_type_float=no
9164fi
9165
9166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9167fi
9168{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9169echo "${ECHO_T}$ac_cv_type_float" >&6; }
9170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171# The cast to long int works around a bug in the HP C Compiler
9172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9174# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009175{ echo "$as_me:$LINENO: checking size of float" >&5
9176echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009177if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009178 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009179else
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 if test "$cross_compiling" = yes; then
9181 # Depending upon the size, compute the lo and hi bounds.
9182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009183/* confdefs.h. */
9184_ACEOF
9185cat confdefs.h >>conftest.$ac_ext
9186cat >>conftest.$ac_ext <<_ACEOF
9187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009188$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009189 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009190int
9191main ()
9192{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009194test_array [0] = 0
9195
9196 ;
9197 return 0;
9198}
9199_ACEOF
9200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201if { (ac_try="$ac_compile"
9202case "(($ac_try" in
9203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9204 *) ac_try_echo=$ac_try;;
9205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009209 grep -v '^ *+' conftest.er1 >conftest.err
9210 rm -f conftest.er1
9211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213 (exit $ac_status); } && {
9214 test -z "$ac_c_werror_flag" ||
9215 test ! -s conftest.err
9216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_lo=0 ac_mid=0
9218 while :; do
9219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009220/* confdefs.h. */
9221_ACEOF
9222cat confdefs.h >>conftest.$ac_ext
9223cat >>conftest.$ac_ext <<_ACEOF
9224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009225$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009226 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009227int
9228main ()
9229{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009230static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009231test_array [0] = 0
9232
9233 ;
9234 return 0;
9235}
9236_ACEOF
9237rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238if { (ac_try="$ac_compile"
9239case "(($ac_try" in
9240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9241 *) ac_try_echo=$ac_try;;
9242esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009246 grep -v '^ *+' conftest.er1 >conftest.err
9247 rm -f conftest.er1
9248 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 (exit $ac_status); } && {
9251 test -z "$ac_c_werror_flag" ||
9252 test ! -s conftest.err
9253 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 ac_hi=$ac_mid; break
9255else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009257sed 's/^/| /' conftest.$ac_ext >&5
9258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 ac_lo=`expr $ac_mid + 1`
9260 if test $ac_lo -le $ac_mid; then
9261 ac_lo= ac_hi=
9262 break
9263 fi
9264 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266
9267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 done
9269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009271sed 's/^/| /' conftest.$ac_ext >&5
9272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009274/* confdefs.h. */
9275_ACEOF
9276cat confdefs.h >>conftest.$ac_ext
9277cat >>conftest.$ac_ext <<_ACEOF
9278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009279$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009280 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009281int
9282main ()
9283{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009285test_array [0] = 0
9286
9287 ;
9288 return 0;
9289}
9290_ACEOF
9291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292if { (ac_try="$ac_compile"
9293case "(($ac_try" in
9294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9295 *) ac_try_echo=$ac_try;;
9296esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009300 grep -v '^ *+' conftest.er1 >conftest.err
9301 rm -f conftest.er1
9302 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304 (exit $ac_status); } && {
9305 test -z "$ac_c_werror_flag" ||
9306 test ! -s conftest.err
9307 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 ac_hi=-1 ac_mid=-1
9309 while :; do
9310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009311/* confdefs.h. */
9312_ACEOF
9313cat confdefs.h >>conftest.$ac_ext
9314cat >>conftest.$ac_ext <<_ACEOF
9315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009316$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009317 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009318int
9319main ()
9320{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009321static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009322test_array [0] = 0
9323
9324 ;
9325 return 0;
9326}
9327_ACEOF
9328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329if { (ac_try="$ac_compile"
9330case "(($ac_try" in
9331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9332 *) ac_try_echo=$ac_try;;
9333esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009337 grep -v '^ *+' conftest.er1 >conftest.err
9338 rm -f conftest.er1
9339 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009341 (exit $ac_status); } && {
9342 test -z "$ac_c_werror_flag" ||
9343 test ! -s conftest.err
9344 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ac_lo=$ac_mid; break
9346else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009348sed 's/^/| /' conftest.$ac_ext >&5
9349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350 ac_hi=`expr '(' $ac_mid ')' - 1`
9351 if test $ac_mid -le $ac_hi; then
9352 ac_lo= ac_hi=
9353 break
9354 fi
9355 ac_mid=`expr 2 '*' $ac_mid`
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 done
9360else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009362sed 's/^/| /' conftest.$ac_ext >&5
9363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366
9367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369
9370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009371# Binary search between lo and hi bounds.
9372while test "x$ac_lo" != "x$ac_hi"; do
9373 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009375/* confdefs.h. */
9376_ACEOF
9377cat confdefs.h >>conftest.$ac_ext
9378cat >>conftest.$ac_ext <<_ACEOF
9379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009380$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009381 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009382int
9383main ()
9384{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009386test_array [0] = 0
9387
9388 ;
9389 return 0;
9390}
9391_ACEOF
9392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393if { (ac_try="$ac_compile"
9394case "(($ac_try" in
9395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9396 *) ac_try_echo=$ac_try;;
9397esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009401 grep -v '^ *+' conftest.er1 >conftest.err
9402 rm -f conftest.er1
9403 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 (exit $ac_status); } && {
9406 test -z "$ac_c_werror_flag" ||
9407 test ! -s conftest.err
9408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ac_hi=$ac_mid
9410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009412sed 's/^/| /' conftest.$ac_ext >&5
9413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416
9417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009418done
9419case $ac_lo in
9420?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009422 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009423See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009424echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009425See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009426 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 else
9428 ac_cv_sizeof_float=0
9429 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009430esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009431else
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009433/* confdefs.h. */
9434_ACEOF
9435cat confdefs.h >>conftest.$ac_ext
9436cat >>conftest.$ac_ext <<_ACEOF
9437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009438$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009439 typedef float ac__type_sizeof_;
9440static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9441static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009442#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009443#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009444int
9445main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446{
Martin v. Löwis11437992002-04-12 09:54:03 +00009447
9448 FILE *f = fopen ("conftest.val", "w");
9449 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009451 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009454 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009456 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 }
9458 else
9459 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009461 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009463 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
9467 ;
9468 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009469}
Martin v. Löwis11437992002-04-12 09:54:03 +00009470_ACEOF
9471rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472if { (ac_try="$ac_link"
9473case "(($ac_try" in
9474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9475 *) ac_try_echo=$ac_try;;
9476esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482 { (case "(($ac_try" in
9483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9484 *) ac_try_echo=$ac_try;;
9485esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 (exit $ac_status); }; }; then
9491 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009492else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009493 echo "$as_me: program exited with status $ac_status" >&5
9494echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009495sed 's/^/| /' conftest.$ac_ext >&5
9496
Martin v. Löwis11437992002-04-12 09:54:03 +00009497( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009499 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009500See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009501echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009502See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009503 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504 else
9505 ac_cv_sizeof_float=0
9506 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508rm -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 +00009509fi
9510rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009511fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009512{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9513echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514
9515
9516
Martin v. Löwis11437992002-04-12 09:54:03 +00009517cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009518#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009519_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009520
9521
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009522{ echo "$as_me:$LINENO: checking for double" >&5
9523echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9524if test "${ac_cv_type_double+set}" = set; then
9525 echo $ECHO_N "(cached) $ECHO_C" >&6
9526else
9527 cat >conftest.$ac_ext <<_ACEOF
9528/* confdefs.h. */
9529_ACEOF
9530cat confdefs.h >>conftest.$ac_ext
9531cat >>conftest.$ac_ext <<_ACEOF
9532/* end confdefs.h. */
9533$ac_includes_default
9534typedef double ac__type_new_;
9535int
9536main ()
9537{
9538if ((ac__type_new_ *) 0)
9539 return 0;
9540if (sizeof (ac__type_new_))
9541 return 0;
9542 ;
9543 return 0;
9544}
9545_ACEOF
9546rm -f conftest.$ac_objext
9547if { (ac_try="$ac_compile"
9548case "(($ac_try" in
9549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9550 *) ac_try_echo=$ac_try;;
9551esac
9552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9553 (eval "$ac_compile") 2>conftest.er1
9554 ac_status=$?
9555 grep -v '^ *+' conftest.er1 >conftest.err
9556 rm -f conftest.er1
9557 cat conftest.err >&5
9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559 (exit $ac_status); } && {
9560 test -z "$ac_c_werror_flag" ||
9561 test ! -s conftest.err
9562 } && test -s conftest.$ac_objext; then
9563 ac_cv_type_double=yes
9564else
9565 echo "$as_me: failed program was:" >&5
9566sed 's/^/| /' conftest.$ac_ext >&5
9567
9568 ac_cv_type_double=no
9569fi
9570
9571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9572fi
9573{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9574echo "${ECHO_T}$ac_cv_type_double" >&6; }
9575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576# The cast to long int works around a bug in the HP C Compiler
9577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9579# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009580{ echo "$as_me:$LINENO: checking size of double" >&5
9581echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009582if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009584else
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 if test "$cross_compiling" = yes; then
9586 # Depending upon the size, compute the lo and hi bounds.
9587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009588/* confdefs.h. */
9589_ACEOF
9590cat confdefs.h >>conftest.$ac_ext
9591cat >>conftest.$ac_ext <<_ACEOF
9592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009593$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009594 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009595int
9596main ()
9597{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009599test_array [0] = 0
9600
9601 ;
9602 return 0;
9603}
9604_ACEOF
9605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606if { (ac_try="$ac_compile"
9607case "(($ac_try" in
9608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9609 *) ac_try_echo=$ac_try;;
9610esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009614 grep -v '^ *+' conftest.er1 >conftest.err
9615 rm -f conftest.er1
9616 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 (exit $ac_status); } && {
9619 test -z "$ac_c_werror_flag" ||
9620 test ! -s conftest.err
9621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_lo=0 ac_mid=0
9623 while :; do
9624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* confdefs.h. */
9626_ACEOF
9627cat confdefs.h >>conftest.$ac_ext
9628cat >>conftest.$ac_ext <<_ACEOF
9629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009631 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009632int
9633main ()
9634{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009636test_array [0] = 0
9637
9638 ;
9639 return 0;
9640}
9641_ACEOF
9642rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643if { (ac_try="$ac_compile"
9644case "(($ac_try" in
9645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9646 *) ac_try_echo=$ac_try;;
9647esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009651 grep -v '^ *+' conftest.er1 >conftest.err
9652 rm -f conftest.er1
9653 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655 (exit $ac_status); } && {
9656 test -z "$ac_c_werror_flag" ||
9657 test ! -s conftest.err
9658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_hi=$ac_mid; break
9660else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009662sed 's/^/| /' conftest.$ac_ext >&5
9663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664 ac_lo=`expr $ac_mid + 1`
9665 if test $ac_lo -le $ac_mid; then
9666 ac_lo= ac_hi=
9667 break
9668 fi
9669 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671
9672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 done
9674else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009676sed 's/^/| /' conftest.$ac_ext >&5
9677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* confdefs.h. */
9680_ACEOF
9681cat confdefs.h >>conftest.$ac_ext
9682cat >>conftest.$ac_ext <<_ACEOF
9683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009684$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009685 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009686int
9687main ()
9688{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009690test_array [0] = 0
9691
9692 ;
9693 return 0;
9694}
9695_ACEOF
9696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697if { (ac_try="$ac_compile"
9698case "(($ac_try" in
9699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9700 *) ac_try_echo=$ac_try;;
9701esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009705 grep -v '^ *+' conftest.er1 >conftest.err
9706 rm -f conftest.er1
9707 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709 (exit $ac_status); } && {
9710 test -z "$ac_c_werror_flag" ||
9711 test ! -s conftest.err
9712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_hi=-1 ac_mid=-1
9714 while :; do
9715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* confdefs.h. */
9717_ACEOF
9718cat confdefs.h >>conftest.$ac_ext
9719cat >>conftest.$ac_ext <<_ACEOF
9720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009722 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009723int
9724main ()
9725{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009727test_array [0] = 0
9728
9729 ;
9730 return 0;
9731}
9732_ACEOF
9733rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734if { (ac_try="$ac_compile"
9735case "(($ac_try" in
9736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9737 *) ac_try_echo=$ac_try;;
9738esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009742 grep -v '^ *+' conftest.er1 >conftest.err
9743 rm -f conftest.er1
9744 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746 (exit $ac_status); } && {
9747 test -z "$ac_c_werror_flag" ||
9748 test ! -s conftest.err
9749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ac_lo=$ac_mid; break
9751else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009753sed 's/^/| /' conftest.$ac_ext >&5
9754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009755 ac_hi=`expr '(' $ac_mid ')' - 1`
9756 if test $ac_mid -le $ac_hi; then
9757 ac_lo= ac_hi=
9758 break
9759 fi
9760 ac_mid=`expr 2 '*' $ac_mid`
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 done
9765else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009767sed 's/^/| /' conftest.$ac_ext >&5
9768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771
9772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774
9775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009776# Binary search between lo and hi bounds.
9777while test "x$ac_lo" != "x$ac_hi"; do
9778 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009780/* confdefs.h. */
9781_ACEOF
9782cat confdefs.h >>conftest.$ac_ext
9783cat >>conftest.$ac_ext <<_ACEOF
9784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009785$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009786 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009787int
9788main ()
9789{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009791test_array [0] = 0
9792
9793 ;
9794 return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798if { (ac_try="$ac_compile"
9799case "(($ac_try" in
9800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9801 *) ac_try_echo=$ac_try;;
9802esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009806 grep -v '^ *+' conftest.er1 >conftest.err
9807 rm -f conftest.er1
9808 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810 (exit $ac_status); } && {
9811 test -z "$ac_c_werror_flag" ||
9812 test ! -s conftest.err
9813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_hi=$ac_mid
9815else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009817sed 's/^/| /' conftest.$ac_ext >&5
9818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821
9822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009823done
9824case $ac_lo in
9825?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009827 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009828See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009829echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009830See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009831 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 else
9833 ac_cv_sizeof_double=0
9834 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009835esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009836else
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009838/* confdefs.h. */
9839_ACEOF
9840cat confdefs.h >>conftest.$ac_ext
9841cat >>conftest.$ac_ext <<_ACEOF
9842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009843$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009844 typedef double ac__type_sizeof_;
9845static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9846static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009848#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009849int
9850main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009851{
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
9853 FILE *f = fopen ("conftest.val", "w");
9854 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009856 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009859 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009861 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 }
9863 else
9864 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009868 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
9872 ;
9873 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874}
Martin v. Löwis11437992002-04-12 09:54:03 +00009875_ACEOF
9876rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877if { (ac_try="$ac_link"
9878case "(($ac_try" in
9879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9880 *) ac_try_echo=$ac_try;;
9881esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887 { (case "(($ac_try" in
9888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9889 *) ac_try_echo=$ac_try;;
9890esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 (exit $ac_status); }; }; then
9896 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009897else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009898 echo "$as_me: program exited with status $ac_status" >&5
9899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009900sed 's/^/| /' conftest.$ac_ext >&5
9901
Martin v. Löwis11437992002-04-12 09:54:03 +00009902( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009904 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009905See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009906echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009907See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009908 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909 else
9910 ac_cv_sizeof_double=0
9911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913rm -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 +00009914fi
9915rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009917{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9918echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919
9920
9921
Martin v. Löwis11437992002-04-12 09:54:03 +00009922cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009923#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009924_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009925
9926
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009927{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9928echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9929if test "${ac_cv_type_fpos_t+set}" = set; then
9930 echo $ECHO_N "(cached) $ECHO_C" >&6
9931else
9932 cat >conftest.$ac_ext <<_ACEOF
9933/* confdefs.h. */
9934_ACEOF
9935cat confdefs.h >>conftest.$ac_ext
9936cat >>conftest.$ac_ext <<_ACEOF
9937/* end confdefs.h. */
9938$ac_includes_default
9939typedef fpos_t ac__type_new_;
9940int
9941main ()
9942{
9943if ((ac__type_new_ *) 0)
9944 return 0;
9945if (sizeof (ac__type_new_))
9946 return 0;
9947 ;
9948 return 0;
9949}
9950_ACEOF
9951rm -f conftest.$ac_objext
9952if { (ac_try="$ac_compile"
9953case "(($ac_try" in
9954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9955 *) ac_try_echo=$ac_try;;
9956esac
9957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9958 (eval "$ac_compile") 2>conftest.er1
9959 ac_status=$?
9960 grep -v '^ *+' conftest.er1 >conftest.err
9961 rm -f conftest.er1
9962 cat conftest.err >&5
9963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9964 (exit $ac_status); } && {
9965 test -z "$ac_c_werror_flag" ||
9966 test ! -s conftest.err
9967 } && test -s conftest.$ac_objext; then
9968 ac_cv_type_fpos_t=yes
9969else
9970 echo "$as_me: failed program was:" >&5
9971sed 's/^/| /' conftest.$ac_ext >&5
9972
9973 ac_cv_type_fpos_t=no
9974fi
9975
9976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9977fi
9978{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9979echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981# The cast to long int works around a bug in the HP C Compiler
9982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9984# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009985{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9986echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009987if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009989else
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 if test "$cross_compiling" = yes; then
9991 # Depending upon the size, compute the lo and hi bounds.
9992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* confdefs.h. */
9994_ACEOF
9995cat confdefs.h >>conftest.$ac_ext
9996cat >>conftest.$ac_ext <<_ACEOF
9997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009999 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010000int
10001main ()
10002{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010004test_array [0] = 0
10005
10006 ;
10007 return 0;
10008}
10009_ACEOF
10010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011if { (ac_try="$ac_compile"
10012case "(($ac_try" in
10013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10014 *) ac_try_echo=$ac_try;;
10015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010019 grep -v '^ *+' conftest.er1 >conftest.err
10020 rm -f conftest.er1
10021 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023 (exit $ac_status); } && {
10024 test -z "$ac_c_werror_flag" ||
10025 test ! -s conftest.err
10026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 ac_lo=0 ac_mid=0
10028 while :; do
10029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* confdefs.h. */
10031_ACEOF
10032cat confdefs.h >>conftest.$ac_ext
10033cat >>conftest.$ac_ext <<_ACEOF
10034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010035$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010036 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010037int
10038main ()
10039{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010041test_array [0] = 0
10042
10043 ;
10044 return 0;
10045}
10046_ACEOF
10047rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048if { (ac_try="$ac_compile"
10049case "(($ac_try" in
10050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10051 *) ac_try_echo=$ac_try;;
10052esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010056 grep -v '^ *+' conftest.er1 >conftest.err
10057 rm -f conftest.er1
10058 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060 (exit $ac_status); } && {
10061 test -z "$ac_c_werror_flag" ||
10062 test ! -s conftest.err
10063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_hi=$ac_mid; break
10065else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010067sed 's/^/| /' conftest.$ac_ext >&5
10068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069 ac_lo=`expr $ac_mid + 1`
10070 if test $ac_lo -le $ac_mid; then
10071 ac_lo= ac_hi=
10072 break
10073 fi
10074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010076
10077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 done
10079else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010081sed 's/^/| /' conftest.$ac_ext >&5
10082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010084/* confdefs.h. */
10085_ACEOF
10086cat confdefs.h >>conftest.$ac_ext
10087cat >>conftest.$ac_ext <<_ACEOF
10088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010089$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010090 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010091int
10092main ()
10093{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010095test_array [0] = 0
10096
10097 ;
10098 return 0;
10099}
10100_ACEOF
10101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102if { (ac_try="$ac_compile"
10103case "(($ac_try" in
10104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10105 *) ac_try_echo=$ac_try;;
10106esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010110 grep -v '^ *+' conftest.er1 >conftest.err
10111 rm -f conftest.er1
10112 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114 (exit $ac_status); } && {
10115 test -z "$ac_c_werror_flag" ||
10116 test ! -s conftest.err
10117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_hi=-1 ac_mid=-1
10119 while :; do
10120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010121/* confdefs.h. */
10122_ACEOF
10123cat confdefs.h >>conftest.$ac_ext
10124cat >>conftest.$ac_ext <<_ACEOF
10125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010126$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010127 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010128int
10129main ()
10130{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010132test_array [0] = 0
10133
10134 ;
10135 return 0;
10136}
10137_ACEOF
10138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139if { (ac_try="$ac_compile"
10140case "(($ac_try" in
10141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10142 *) ac_try_echo=$ac_try;;
10143esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010147 grep -v '^ *+' conftest.er1 >conftest.err
10148 rm -f conftest.er1
10149 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151 (exit $ac_status); } && {
10152 test -z "$ac_c_werror_flag" ||
10153 test ! -s conftest.err
10154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 ac_lo=$ac_mid; break
10156else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010158sed 's/^/| /' conftest.$ac_ext >&5
10159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160 ac_hi=`expr '(' $ac_mid ')' - 1`
10161 if test $ac_mid -le $ac_hi; then
10162 ac_lo= ac_hi=
10163 break
10164 fi
10165 ac_mid=`expr 2 '*' $ac_mid`
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 done
10170else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010172sed 's/^/| /' conftest.$ac_ext >&5
10173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176
10177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179
10180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010181# Binary search between lo and hi bounds.
10182while test "x$ac_lo" != "x$ac_hi"; do
10183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010185/* confdefs.h. */
10186_ACEOF
10187cat confdefs.h >>conftest.$ac_ext
10188cat >>conftest.$ac_ext <<_ACEOF
10189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010190$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010191 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010192int
10193main ()
10194{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010196test_array [0] = 0
10197
10198 ;
10199 return 0;
10200}
10201_ACEOF
10202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203if { (ac_try="$ac_compile"
10204case "(($ac_try" in
10205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10206 *) ac_try_echo=$ac_try;;
10207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010211 grep -v '^ *+' conftest.er1 >conftest.err
10212 rm -f conftest.er1
10213 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215 (exit $ac_status); } && {
10216 test -z "$ac_c_werror_flag" ||
10217 test ! -s conftest.err
10218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 ac_hi=$ac_mid
10220else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010222sed 's/^/| /' conftest.$ac_ext >&5
10223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226
10227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010228done
10229case $ac_lo in
10230?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010232 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010233See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010234echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010235See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010236 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 else
10238 ac_cv_sizeof_fpos_t=0
10239 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010240esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010241else
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010243/* confdefs.h. */
10244_ACEOF
10245cat confdefs.h >>conftest.$ac_ext
10246cat >>conftest.$ac_ext <<_ACEOF
10247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010249 typedef fpos_t ac__type_sizeof_;
10250static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10251static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010252#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010253#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010254int
10255main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010256{
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
10258 FILE *f = fopen ("conftest.val", "w");
10259 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010261 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010264 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010266 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 }
10268 else
10269 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010273 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010276
10277 ;
10278 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010279}
Martin v. Löwis11437992002-04-12 09:54:03 +000010280_ACEOF
10281rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282if { (ac_try="$ac_link"
10283case "(($ac_try" in
10284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10285 *) ac_try_echo=$ac_try;;
10286esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292 { (case "(($ac_try" in
10293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10294 *) ac_try_echo=$ac_try;;
10295esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 (exit $ac_status); }; }; then
10301 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010303 echo "$as_me: program exited with status $ac_status" >&5
10304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010305sed 's/^/| /' conftest.$ac_ext >&5
10306
Martin v. Löwis11437992002-04-12 09:54:03 +000010307( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010310See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010311echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010312See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010313 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314 else
10315 ac_cv_sizeof_fpos_t=0
10316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318rm -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 +000010319fi
10320rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010321fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010322{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10323echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324
10325
10326
Martin v. Löwis11437992002-04-12 09:54:03 +000010327cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010328#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010329_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010330
Michael W. Hudson54241132001-12-07 15:38:26 +000010331
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010332{ echo "$as_me:$LINENO: checking for size_t" >&5
10333echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10334if test "${ac_cv_type_size_t+set}" = set; then
10335 echo $ECHO_N "(cached) $ECHO_C" >&6
10336else
10337 cat >conftest.$ac_ext <<_ACEOF
10338/* confdefs.h. */
10339_ACEOF
10340cat confdefs.h >>conftest.$ac_ext
10341cat >>conftest.$ac_ext <<_ACEOF
10342/* end confdefs.h. */
10343$ac_includes_default
10344typedef size_t ac__type_new_;
10345int
10346main ()
10347{
10348if ((ac__type_new_ *) 0)
10349 return 0;
10350if (sizeof (ac__type_new_))
10351 return 0;
10352 ;
10353 return 0;
10354}
10355_ACEOF
10356rm -f conftest.$ac_objext
10357if { (ac_try="$ac_compile"
10358case "(($ac_try" in
10359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10360 *) ac_try_echo=$ac_try;;
10361esac
10362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10363 (eval "$ac_compile") 2>conftest.er1
10364 ac_status=$?
10365 grep -v '^ *+' conftest.er1 >conftest.err
10366 rm -f conftest.er1
10367 cat conftest.err >&5
10368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10369 (exit $ac_status); } && {
10370 test -z "$ac_c_werror_flag" ||
10371 test ! -s conftest.err
10372 } && test -s conftest.$ac_objext; then
10373 ac_cv_type_size_t=yes
10374else
10375 echo "$as_me: failed program was:" >&5
10376sed 's/^/| /' conftest.$ac_ext >&5
10377
10378 ac_cv_type_size_t=no
10379fi
10380
10381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10382fi
10383{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10384echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386# The cast to long int works around a bug in the HP C Compiler
10387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10389# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010390{ echo "$as_me:$LINENO: checking size of size_t" >&5
10391echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010392if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010394else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010395 if test "$cross_compiling" = yes; then
10396 # Depending upon the size, compute the lo and hi bounds.
10397cat >conftest.$ac_ext <<_ACEOF
10398/* confdefs.h. */
10399_ACEOF
10400cat confdefs.h >>conftest.$ac_ext
10401cat >>conftest.$ac_ext <<_ACEOF
10402/* end confdefs.h. */
10403$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010404 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010405int
10406main ()
10407{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409test_array [0] = 0
10410
10411 ;
10412 return 0;
10413}
10414_ACEOF
10415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416if { (ac_try="$ac_compile"
10417case "(($ac_try" in
10418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10419 *) ac_try_echo=$ac_try;;
10420esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423 ac_status=$?
10424 grep -v '^ *+' conftest.er1 >conftest.err
10425 rm -f conftest.er1
10426 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428 (exit $ac_status); } && {
10429 test -z "$ac_c_werror_flag" ||
10430 test ! -s conftest.err
10431 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432 ac_lo=0 ac_mid=0
10433 while :; do
10434 cat >conftest.$ac_ext <<_ACEOF
10435/* confdefs.h. */
10436_ACEOF
10437cat confdefs.h >>conftest.$ac_ext
10438cat >>conftest.$ac_ext <<_ACEOF
10439/* end confdefs.h. */
10440$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010441 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010442int
10443main ()
10444{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446test_array [0] = 0
10447
10448 ;
10449 return 0;
10450}
10451_ACEOF
10452rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453if { (ac_try="$ac_compile"
10454case "(($ac_try" in
10455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10456 *) ac_try_echo=$ac_try;;
10457esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460 ac_status=$?
10461 grep -v '^ *+' conftest.er1 >conftest.err
10462 rm -f conftest.er1
10463 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465 (exit $ac_status); } && {
10466 test -z "$ac_c_werror_flag" ||
10467 test ! -s conftest.err
10468 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469 ac_hi=$ac_mid; break
10470else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010471 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472sed 's/^/| /' conftest.$ac_ext >&5
10473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474 ac_lo=`expr $ac_mid + 1`
10475 if test $ac_lo -le $ac_mid; then
10476 ac_lo= ac_hi=
10477 break
10478 fi
10479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010481
10482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010483 done
10484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010485 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486sed 's/^/| /' conftest.$ac_ext >&5
10487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489/* confdefs.h. */
10490_ACEOF
10491cat confdefs.h >>conftest.$ac_ext
10492cat >>conftest.$ac_ext <<_ACEOF
10493/* end confdefs.h. */
10494$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010495 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496int
10497main ()
10498{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500test_array [0] = 0
10501
10502 ;
10503 return 0;
10504}
10505_ACEOF
10506rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507if { (ac_try="$ac_compile"
10508case "(($ac_try" in
10509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10510 *) ac_try_echo=$ac_try;;
10511esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 ac_status=$?
10515 grep -v '^ *+' conftest.er1 >conftest.err
10516 rm -f conftest.er1
10517 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 (exit $ac_status); } && {
10520 test -z "$ac_c_werror_flag" ||
10521 test ! -s conftest.err
10522 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523 ac_hi=-1 ac_mid=-1
10524 while :; do
10525 cat >conftest.$ac_ext <<_ACEOF
10526/* confdefs.h. */
10527_ACEOF
10528cat confdefs.h >>conftest.$ac_ext
10529cat >>conftest.$ac_ext <<_ACEOF
10530/* end confdefs.h. */
10531$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010532 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010533int
10534main ()
10535{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537test_array [0] = 0
10538
10539 ;
10540 return 0;
10541}
10542_ACEOF
10543rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544if { (ac_try="$ac_compile"
10545case "(($ac_try" in
10546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10547 *) ac_try_echo=$ac_try;;
10548esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551 ac_status=$?
10552 grep -v '^ *+' conftest.er1 >conftest.err
10553 rm -f conftest.er1
10554 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556 (exit $ac_status); } && {
10557 test -z "$ac_c_werror_flag" ||
10558 test ! -s conftest.err
10559 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560 ac_lo=$ac_mid; break
10561else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010562 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563sed 's/^/| /' conftest.$ac_ext >&5
10564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565 ac_hi=`expr '(' $ac_mid ')' - 1`
10566 if test $ac_mid -le $ac_hi; then
10567 ac_lo= ac_hi=
10568 break
10569 fi
10570 ac_mid=`expr 2 '*' $ac_mid`
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 done
10575else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010576 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010577sed 's/^/| /' conftest.$ac_ext >&5
10578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581
10582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584
10585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586# Binary search between lo and hi bounds.
10587while test "x$ac_lo" != "x$ac_hi"; do
10588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10589 cat >conftest.$ac_ext <<_ACEOF
10590/* confdefs.h. */
10591_ACEOF
10592cat confdefs.h >>conftest.$ac_ext
10593cat >>conftest.$ac_ext <<_ACEOF
10594/* end confdefs.h. */
10595$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010596 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597int
10598main ()
10599{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601test_array [0] = 0
10602
10603 ;
10604 return 0;
10605}
10606_ACEOF
10607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608if { (ac_try="$ac_compile"
10609case "(($ac_try" in
10610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10611 *) ac_try_echo=$ac_try;;
10612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615 ac_status=$?
10616 grep -v '^ *+' conftest.er1 >conftest.err
10617 rm -f conftest.er1
10618 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620 (exit $ac_status); } && {
10621 test -z "$ac_c_werror_flag" ||
10622 test ! -s conftest.err
10623 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624 ac_hi=$ac_mid
10625else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010626 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627sed 's/^/| /' conftest.$ac_ext >&5
10628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631
10632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633done
10634case $ac_lo in
10635?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010639echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010641 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 else
10643 ac_cv_sizeof_size_t=0
10644 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645esac
10646else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010647 cat >conftest.$ac_ext <<_ACEOF
10648/* confdefs.h. */
10649_ACEOF
10650cat confdefs.h >>conftest.$ac_ext
10651cat >>conftest.$ac_ext <<_ACEOF
10652/* end confdefs.h. */
10653$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010654 typedef size_t ac__type_sizeof_;
10655static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10656static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657#include <stdio.h>
10658#include <stdlib.h>
10659int
10660main ()
10661{
10662
10663 FILE *f = fopen ("conftest.val", "w");
10664 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010666 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010669 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010671 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 }
10673 else
10674 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010678 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681
10682 ;
10683 return 0;
10684}
10685_ACEOF
10686rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687if { (ac_try="$ac_link"
10688case "(($ac_try" in
10689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10690 *) ac_try_echo=$ac_try;;
10691esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 { (case "(($ac_try" in
10698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10699 *) ac_try_echo=$ac_try;;
10700esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705 (exit $ac_status); }; }; then
10706 ac_cv_sizeof_size_t=`cat conftest.val`
10707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010708 echo "$as_me: program exited with status $ac_status" >&5
10709echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710sed 's/^/| /' conftest.$ac_ext >&5
10711
10712( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010714 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010716echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010718 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719 else
10720 ac_cv_sizeof_size_t=0
10721 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723rm -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 +000010724fi
10725rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010727{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10728echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729
10730
10731
Martin v. Löwis18e16552006-02-15 17:27:45 +000010732cat >>confdefs.h <<_ACEOF
10733#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10734_ACEOF
10735
10736
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010737{ echo "$as_me:$LINENO: checking for pid_t" >&5
10738echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10739if test "${ac_cv_type_pid_t+set}" = set; then
10740 echo $ECHO_N "(cached) $ECHO_C" >&6
10741else
10742 cat >conftest.$ac_ext <<_ACEOF
10743/* confdefs.h. */
10744_ACEOF
10745cat confdefs.h >>conftest.$ac_ext
10746cat >>conftest.$ac_ext <<_ACEOF
10747/* end confdefs.h. */
10748$ac_includes_default
10749typedef pid_t ac__type_new_;
10750int
10751main ()
10752{
10753if ((ac__type_new_ *) 0)
10754 return 0;
10755if (sizeof (ac__type_new_))
10756 return 0;
10757 ;
10758 return 0;
10759}
10760_ACEOF
10761rm -f conftest.$ac_objext
10762if { (ac_try="$ac_compile"
10763case "(($ac_try" in
10764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10765 *) ac_try_echo=$ac_try;;
10766esac
10767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10768 (eval "$ac_compile") 2>conftest.er1
10769 ac_status=$?
10770 grep -v '^ *+' conftest.er1 >conftest.err
10771 rm -f conftest.er1
10772 cat conftest.err >&5
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); } && {
10775 test -z "$ac_c_werror_flag" ||
10776 test ! -s conftest.err
10777 } && test -s conftest.$ac_objext; then
10778 ac_cv_type_pid_t=yes
10779else
10780 echo "$as_me: failed program was:" >&5
10781sed 's/^/| /' conftest.$ac_ext >&5
10782
10783 ac_cv_type_pid_t=no
10784fi
10785
10786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10787fi
10788{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10789echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10790
Christian Heimes400adb02008-02-01 08:12:03 +000010791# The cast to long int works around a bug in the HP C Compiler
10792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10794# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010795{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10796echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010797if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010798 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010799else
10800 if test "$cross_compiling" = yes; then
10801 # Depending upon the size, compute the lo and hi bounds.
10802cat >conftest.$ac_ext <<_ACEOF
10803/* confdefs.h. */
10804_ACEOF
10805cat confdefs.h >>conftest.$ac_ext
10806cat >>conftest.$ac_ext <<_ACEOF
10807/* end confdefs.h. */
10808$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010809 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010810int
10811main ()
10812{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010814test_array [0] = 0
10815
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820rm -f conftest.$ac_objext
10821if { (ac_try="$ac_compile"
10822case "(($ac_try" in
10823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10824 *) ac_try_echo=$ac_try;;
10825esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010827 (eval "$ac_compile") 2>conftest.er1
10828 ac_status=$?
10829 grep -v '^ *+' conftest.er1 >conftest.err
10830 rm -f conftest.er1
10831 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010833 (exit $ac_status); } && {
10834 test -z "$ac_c_werror_flag" ||
10835 test ! -s conftest.err
10836 } && test -s conftest.$ac_objext; then
10837 ac_lo=0 ac_mid=0
10838 while :; do
10839 cat >conftest.$ac_ext <<_ACEOF
10840/* confdefs.h. */
10841_ACEOF
10842cat confdefs.h >>conftest.$ac_ext
10843cat >>conftest.$ac_ext <<_ACEOF
10844/* end confdefs.h. */
10845$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010846 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010847int
10848main ()
10849{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010851test_array [0] = 0
10852
10853 ;
10854 return 0;
10855}
10856_ACEOF
10857rm -f conftest.$ac_objext
10858if { (ac_try="$ac_compile"
10859case "(($ac_try" in
10860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10861 *) ac_try_echo=$ac_try;;
10862esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010864 (eval "$ac_compile") 2>conftest.er1
10865 ac_status=$?
10866 grep -v '^ *+' conftest.er1 >conftest.err
10867 rm -f conftest.er1
10868 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010870 (exit $ac_status); } && {
10871 test -z "$ac_c_werror_flag" ||
10872 test ! -s conftest.err
10873 } && test -s conftest.$ac_objext; then
10874 ac_hi=$ac_mid; break
10875else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010876 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010877sed 's/^/| /' conftest.$ac_ext >&5
10878
10879 ac_lo=`expr $ac_mid + 1`
10880 if test $ac_lo -le $ac_mid; then
10881 ac_lo= ac_hi=
10882 break
10883 fi
10884 ac_mid=`expr 2 '*' $ac_mid + 1`
10885fi
10886
10887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888 done
10889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010890 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891sed 's/^/| /' conftest.$ac_ext >&5
10892
10893 cat >conftest.$ac_ext <<_ACEOF
10894/* confdefs.h. */
10895_ACEOF
10896cat confdefs.h >>conftest.$ac_ext
10897cat >>conftest.$ac_ext <<_ACEOF
10898/* end confdefs.h. */
10899$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010900 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010901int
10902main ()
10903{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010905test_array [0] = 0
10906
10907 ;
10908 return 0;
10909}
10910_ACEOF
10911rm -f conftest.$ac_objext
10912if { (ac_try="$ac_compile"
10913case "(($ac_try" in
10914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10915 *) ac_try_echo=$ac_try;;
10916esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010918 (eval "$ac_compile") 2>conftest.er1
10919 ac_status=$?
10920 grep -v '^ *+' conftest.er1 >conftest.err
10921 rm -f conftest.er1
10922 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010924 (exit $ac_status); } && {
10925 test -z "$ac_c_werror_flag" ||
10926 test ! -s conftest.err
10927 } && test -s conftest.$ac_objext; then
10928 ac_hi=-1 ac_mid=-1
10929 while :; do
10930 cat >conftest.$ac_ext <<_ACEOF
10931/* confdefs.h. */
10932_ACEOF
10933cat confdefs.h >>conftest.$ac_ext
10934cat >>conftest.$ac_ext <<_ACEOF
10935/* end confdefs.h. */
10936$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010937 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010938int
10939main ()
10940{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010942test_array [0] = 0
10943
10944 ;
10945 return 0;
10946}
10947_ACEOF
10948rm -f conftest.$ac_objext
10949if { (ac_try="$ac_compile"
10950case "(($ac_try" in
10951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10952 *) ac_try_echo=$ac_try;;
10953esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010955 (eval "$ac_compile") 2>conftest.er1
10956 ac_status=$?
10957 grep -v '^ *+' conftest.er1 >conftest.err
10958 rm -f conftest.er1
10959 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010961 (exit $ac_status); } && {
10962 test -z "$ac_c_werror_flag" ||
10963 test ! -s conftest.err
10964 } && test -s conftest.$ac_objext; then
10965 ac_lo=$ac_mid; break
10966else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010967 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010968sed 's/^/| /' conftest.$ac_ext >&5
10969
10970 ac_hi=`expr '(' $ac_mid ')' - 1`
10971 if test $ac_mid -le $ac_hi; then
10972 ac_lo= ac_hi=
10973 break
10974 fi
10975 ac_mid=`expr 2 '*' $ac_mid`
10976fi
10977
10978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979 done
10980else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010981 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010982sed 's/^/| /' conftest.$ac_ext >&5
10983
10984 ac_lo= ac_hi=
10985fi
10986
10987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10988fi
10989
10990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10991# Binary search between lo and hi bounds.
10992while test "x$ac_lo" != "x$ac_hi"; do
10993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10994 cat >conftest.$ac_ext <<_ACEOF
10995/* confdefs.h. */
10996_ACEOF
10997cat confdefs.h >>conftest.$ac_ext
10998cat >>conftest.$ac_ext <<_ACEOF
10999/* end confdefs.h. */
11000$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011001 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011002int
11003main ()
11004{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011006test_array [0] = 0
11007
11008 ;
11009 return 0;
11010}
11011_ACEOF
11012rm -f conftest.$ac_objext
11013if { (ac_try="$ac_compile"
11014case "(($ac_try" in
11015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11016 *) ac_try_echo=$ac_try;;
11017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011019 (eval "$ac_compile") 2>conftest.er1
11020 ac_status=$?
11021 grep -v '^ *+' conftest.er1 >conftest.err
11022 rm -f conftest.er1
11023 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011025 (exit $ac_status); } && {
11026 test -z "$ac_c_werror_flag" ||
11027 test ! -s conftest.err
11028 } && test -s conftest.$ac_objext; then
11029 ac_hi=$ac_mid
11030else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011031 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011032sed 's/^/| /' conftest.$ac_ext >&5
11033
11034 ac_lo=`expr '(' $ac_mid ')' + 1`
11035fi
11036
11037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11038done
11039case $ac_lo in
11040?*) ac_cv_sizeof_pid_t=$ac_lo;;
11041'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011043See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011044echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011045See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011046 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011047 else
11048 ac_cv_sizeof_pid_t=0
11049 fi ;;
11050esac
11051else
11052 cat >conftest.$ac_ext <<_ACEOF
11053/* confdefs.h. */
11054_ACEOF
11055cat confdefs.h >>conftest.$ac_ext
11056cat >>conftest.$ac_ext <<_ACEOF
11057/* end confdefs.h. */
11058$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011059 typedef pid_t ac__type_sizeof_;
11060static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11061static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011062#include <stdio.h>
11063#include <stdlib.h>
11064int
11065main ()
11066{
11067
11068 FILE *f = fopen ("conftest.val", "w");
11069 if (! f)
11070 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011071 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011072 {
11073 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011075 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011076 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011077 }
11078 else
11079 {
11080 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011082 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011083 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011084 }
11085 return ferror (f) || fclose (f) != 0;
11086
11087 ;
11088 return 0;
11089}
11090_ACEOF
11091rm -f conftest$ac_exeext
11092if { (ac_try="$ac_link"
11093case "(($ac_try" in
11094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11095 *) ac_try_echo=$ac_try;;
11096esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011098 (eval "$ac_link") 2>&5
11099 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11102 { (case "(($ac_try" in
11103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11104 *) ac_try_echo=$ac_try;;
11105esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011107 (eval "$ac_try") 2>&5
11108 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011110 (exit $ac_status); }; }; then
11111 ac_cv_sizeof_pid_t=`cat conftest.val`
11112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011113 echo "$as_me: program exited with status $ac_status" >&5
11114echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011115sed 's/^/| /' conftest.$ac_ext >&5
11116
11117( exit $ac_status )
11118if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011120See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011121echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011122See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011123 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011124 else
11125 ac_cv_sizeof_pid_t=0
11126 fi
11127fi
11128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11129fi
11130rm -f conftest.val
11131fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011132{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11133echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011134
11135
11136
11137cat >>confdefs.h <<_ACEOF
11138#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11139_ACEOF
11140
11141
Michael W. Hudson54241132001-12-07 15:38:26 +000011142
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011143{ echo "$as_me:$LINENO: checking for long long support" >&5
11144echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011145have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* confdefs.h. */
11148_ACEOF
11149cat confdefs.h >>conftest.$ac_ext
11150cat >>conftest.$ac_ext <<_ACEOF
11151/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153int
11154main ()
11155{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011156long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
11159}
11160_ACEOF
11161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162if { (ac_try="$ac_compile"
11163case "(($ac_try" in
11164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11165 *) ac_try_echo=$ac_try;;
11166esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011170 grep -v '^ *+' conftest.er1 >conftest.err
11171 rm -f conftest.er1
11172 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174 (exit $ac_status); } && {
11175 test -z "$ac_c_werror_flag" ||
11176 test ! -s conftest.err
11177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
11179
11180cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011182_ACEOF
11183
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011184 have_long_long=yes
11185
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011186else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011188sed 's/^/| /' conftest.$ac_ext >&5
11189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192
11193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011194{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11195echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011196if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011197{ echo "$as_me:$LINENO: checking for long long" >&5
11198echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11199if test "${ac_cv_type_long_long+set}" = set; then
11200 echo $ECHO_N "(cached) $ECHO_C" >&6
11201else
11202 cat >conftest.$ac_ext <<_ACEOF
11203/* confdefs.h. */
11204_ACEOF
11205cat confdefs.h >>conftest.$ac_ext
11206cat >>conftest.$ac_ext <<_ACEOF
11207/* end confdefs.h. */
11208$ac_includes_default
11209typedef long long ac__type_new_;
11210int
11211main ()
11212{
11213if ((ac__type_new_ *) 0)
11214 return 0;
11215if (sizeof (ac__type_new_))
11216 return 0;
11217 ;
11218 return 0;
11219}
11220_ACEOF
11221rm -f conftest.$ac_objext
11222if { (ac_try="$ac_compile"
11223case "(($ac_try" in
11224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11225 *) ac_try_echo=$ac_try;;
11226esac
11227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11228 (eval "$ac_compile") 2>conftest.er1
11229 ac_status=$?
11230 grep -v '^ *+' conftest.er1 >conftest.err
11231 rm -f conftest.er1
11232 cat conftest.err >&5
11233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11234 (exit $ac_status); } && {
11235 test -z "$ac_c_werror_flag" ||
11236 test ! -s conftest.err
11237 } && test -s conftest.$ac_objext; then
11238 ac_cv_type_long_long=yes
11239else
11240 echo "$as_me: failed program was:" >&5
11241sed 's/^/| /' conftest.$ac_ext >&5
11242
11243 ac_cv_type_long_long=no
11244fi
11245
11246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11247fi
11248{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11249echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251# The cast to long int works around a bug in the HP C Compiler
11252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11254# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011255{ echo "$as_me:$LINENO: checking size of long long" >&5
11256echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011257if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011258 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011259else
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 if test "$cross_compiling" = yes; then
11261 # Depending upon the size, compute the lo and hi bounds.
11262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* confdefs.h. */
11264_ACEOF
11265cat confdefs.h >>conftest.$ac_ext
11266cat >>conftest.$ac_ext <<_ACEOF
11267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011268$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011269 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011274test_array [0] = 0
11275
11276 ;
11277 return 0;
11278}
11279_ACEOF
11280rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281if { (ac_try="$ac_compile"
11282case "(($ac_try" in
11283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11284 *) ac_try_echo=$ac_try;;
11285esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011289 grep -v '^ *+' conftest.er1 >conftest.err
11290 rm -f conftest.er1
11291 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293 (exit $ac_status); } && {
11294 test -z "$ac_c_werror_flag" ||
11295 test ! -s conftest.err
11296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011297 ac_lo=0 ac_mid=0
11298 while :; do
11299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011300/* confdefs.h. */
11301_ACEOF
11302cat confdefs.h >>conftest.$ac_ext
11303cat >>conftest.$ac_ext <<_ACEOF
11304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011305$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011306 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011307int
11308main ()
11309{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011311test_array [0] = 0
11312
11313 ;
11314 return 0;
11315}
11316_ACEOF
11317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318if { (ac_try="$ac_compile"
11319case "(($ac_try" in
11320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11321 *) ac_try_echo=$ac_try;;
11322esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011326 grep -v '^ *+' conftest.er1 >conftest.err
11327 rm -f conftest.er1
11328 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330 (exit $ac_status); } && {
11331 test -z "$ac_c_werror_flag" ||
11332 test ! -s conftest.err
11333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ac_hi=$ac_mid; break
11335else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011337sed 's/^/| /' conftest.$ac_ext >&5
11338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 ac_lo=`expr $ac_mid + 1`
11340 if test $ac_lo -le $ac_mid; then
11341 ac_lo= ac_hi=
11342 break
11343 fi
11344 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346
11347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 done
11349else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011351sed 's/^/| /' conftest.$ac_ext >&5
11352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* confdefs.h. */
11355_ACEOF
11356cat confdefs.h >>conftest.$ac_ext
11357cat >>conftest.$ac_ext <<_ACEOF
11358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011359$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011360 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011361int
11362main ()
11363{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011365test_array [0] = 0
11366
11367 ;
11368 return 0;
11369}
11370_ACEOF
11371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372if { (ac_try="$ac_compile"
11373case "(($ac_try" in
11374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11375 *) ac_try_echo=$ac_try;;
11376esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011380 grep -v '^ *+' conftest.er1 >conftest.err
11381 rm -f conftest.er1
11382 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384 (exit $ac_status); } && {
11385 test -z "$ac_c_werror_flag" ||
11386 test ! -s conftest.err
11387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ac_hi=-1 ac_mid=-1
11389 while :; do
11390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* confdefs.h. */
11392_ACEOF
11393cat confdefs.h >>conftest.$ac_ext
11394cat >>conftest.$ac_ext <<_ACEOF
11395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011396$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011397 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011398int
11399main ()
11400{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011402test_array [0] = 0
11403
11404 ;
11405 return 0;
11406}
11407_ACEOF
11408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409if { (ac_try="$ac_compile"
11410case "(($ac_try" in
11411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11412 *) ac_try_echo=$ac_try;;
11413esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011417 grep -v '^ *+' conftest.er1 >conftest.err
11418 rm -f conftest.er1
11419 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421 (exit $ac_status); } && {
11422 test -z "$ac_c_werror_flag" ||
11423 test ! -s conftest.err
11424 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 ac_lo=$ac_mid; break
11426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011428sed 's/^/| /' conftest.$ac_ext >&5
11429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430 ac_hi=`expr '(' $ac_mid ')' - 1`
11431 if test $ac_mid -le $ac_hi; then
11432 ac_lo= ac_hi=
11433 break
11434 fi
11435 ac_mid=`expr 2 '*' $ac_mid`
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 done
11440else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011442sed 's/^/| /' conftest.$ac_ext >&5
11443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446
11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449
11450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011451# Binary search between lo and hi bounds.
11452while test "x$ac_lo" != "x$ac_hi"; do
11453 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* confdefs.h. */
11456_ACEOF
11457cat confdefs.h >>conftest.$ac_ext
11458cat >>conftest.$ac_ext <<_ACEOF
11459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011460$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011461 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011462int
11463main ()
11464{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011465static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011466test_array [0] = 0
11467
11468 ;
11469 return 0;
11470}
11471_ACEOF
11472rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473if { (ac_try="$ac_compile"
11474case "(($ac_try" in
11475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11476 *) ac_try_echo=$ac_try;;
11477esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011481 grep -v '^ *+' conftest.er1 >conftest.err
11482 rm -f conftest.er1
11483 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 (exit $ac_status); } && {
11486 test -z "$ac_c_werror_flag" ||
11487 test ! -s conftest.err
11488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 ac_hi=$ac_mid
11490else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011492sed 's/^/| /' conftest.$ac_ext >&5
11493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496
11497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011498done
11499case $ac_lo in
11500?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011502 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011503See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011504echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011505See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011506 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 else
11508 ac_cv_sizeof_long_long=0
11509 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011510esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011511else
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011513/* confdefs.h. */
11514_ACEOF
11515cat confdefs.h >>conftest.$ac_ext
11516cat >>conftest.$ac_ext <<_ACEOF
11517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011518$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011519 typedef long long ac__type_sizeof_;
11520static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11521static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011522#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011523#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011524int
11525main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011526{
Martin v. Löwis11437992002-04-12 09:54:03 +000011527
11528 FILE *f = fopen ("conftest.val", "w");
11529 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011531 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011534 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011536 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 }
11538 else
11539 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011541 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011543 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
11547 ;
11548 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549}
Martin v. Löwis11437992002-04-12 09:54:03 +000011550_ACEOF
11551rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552if { (ac_try="$ac_link"
11553case "(($ac_try" in
11554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11555 *) ac_try_echo=$ac_try;;
11556esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562 { (case "(($ac_try" in
11563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11564 *) ac_try_echo=$ac_try;;
11565esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 (exit $ac_status); }; }; then
11571 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011572else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011573 echo "$as_me: program exited with status $ac_status" >&5
11574echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011575sed 's/^/| /' conftest.$ac_ext >&5
11576
Martin v. Löwis11437992002-04-12 09:54:03 +000011577( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011579 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011580See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011581echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011582See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011583 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584 else
11585 ac_cv_sizeof_long_long=0
11586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588rm -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 +000011589fi
11590rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011591fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011592{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11593echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594
11595
11596
Martin v. Löwis11437992002-04-12 09:54:03 +000011597cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011598#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011599_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011600
Michael W. Hudson54241132001-12-07 15:38:26 +000011601
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011602fi
11603
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011604{ echo "$as_me:$LINENO: checking for long double support" >&5
11605echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011606have_long_double=no
11607cat >conftest.$ac_ext <<_ACEOF
11608/* confdefs.h. */
11609_ACEOF
11610cat confdefs.h >>conftest.$ac_ext
11611cat >>conftest.$ac_ext <<_ACEOF
11612/* end confdefs.h. */
11613
11614int
11615main ()
11616{
11617long double x; x = (long double)0;
11618 ;
11619 return 0;
11620}
11621_ACEOF
11622rm -f conftest.$ac_objext
11623if { (ac_try="$ac_compile"
11624case "(($ac_try" in
11625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11626 *) ac_try_echo=$ac_try;;
11627esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011629 (eval "$ac_compile") 2>conftest.er1
11630 ac_status=$?
11631 grep -v '^ *+' conftest.er1 >conftest.err
11632 rm -f conftest.er1
11633 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011635 (exit $ac_status); } && {
11636 test -z "$ac_c_werror_flag" ||
11637 test ! -s conftest.err
11638 } && test -s conftest.$ac_objext; then
11639
11640
11641cat >>confdefs.h <<\_ACEOF
11642#define HAVE_LONG_DOUBLE 1
11643_ACEOF
11644
11645 have_long_double=yes
11646
11647else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011648 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011649sed 's/^/| /' conftest.$ac_ext >&5
11650
11651
11652fi
11653
11654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011655{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11656echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011657if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011658{ echo "$as_me:$LINENO: checking for long double" >&5
11659echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11660if test "${ac_cv_type_long_double+set}" = set; then
11661 echo $ECHO_N "(cached) $ECHO_C" >&6
11662else
11663 cat >conftest.$ac_ext <<_ACEOF
11664/* confdefs.h. */
11665_ACEOF
11666cat confdefs.h >>conftest.$ac_ext
11667cat >>conftest.$ac_ext <<_ACEOF
11668/* end confdefs.h. */
11669$ac_includes_default
11670typedef long double ac__type_new_;
11671int
11672main ()
11673{
11674if ((ac__type_new_ *) 0)
11675 return 0;
11676if (sizeof (ac__type_new_))
11677 return 0;
11678 ;
11679 return 0;
11680}
11681_ACEOF
11682rm -f conftest.$ac_objext
11683if { (ac_try="$ac_compile"
11684case "(($ac_try" in
11685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11686 *) ac_try_echo=$ac_try;;
11687esac
11688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11689 (eval "$ac_compile") 2>conftest.er1
11690 ac_status=$?
11691 grep -v '^ *+' conftest.er1 >conftest.err
11692 rm -f conftest.er1
11693 cat conftest.err >&5
11694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695 (exit $ac_status); } && {
11696 test -z "$ac_c_werror_flag" ||
11697 test ! -s conftest.err
11698 } && test -s conftest.$ac_objext; then
11699 ac_cv_type_long_double=yes
11700else
11701 echo "$as_me: failed program was:" >&5
11702sed 's/^/| /' conftest.$ac_ext >&5
11703
11704 ac_cv_type_long_double=no
11705fi
11706
11707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11708fi
11709{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11710echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11711
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011712# The cast to long int works around a bug in the HP C Compiler
11713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11715# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011716{ echo "$as_me:$LINENO: checking size of long double" >&5
11717echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011718if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011719 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011720else
11721 if test "$cross_compiling" = yes; then
11722 # Depending upon the size, compute the lo and hi bounds.
11723cat >conftest.$ac_ext <<_ACEOF
11724/* confdefs.h. */
11725_ACEOF
11726cat confdefs.h >>conftest.$ac_ext
11727cat >>conftest.$ac_ext <<_ACEOF
11728/* end confdefs.h. */
11729$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011730 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011731int
11732main ()
11733{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735test_array [0] = 0
11736
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (ac_try="$ac_compile"
11743case "(($ac_try" in
11744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11745 *) ac_try_echo=$ac_try;;
11746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011748 (eval "$ac_compile") 2>conftest.er1
11749 ac_status=$?
11750 grep -v '^ *+' conftest.er1 >conftest.err
11751 rm -f conftest.er1
11752 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011754 (exit $ac_status); } && {
11755 test -z "$ac_c_werror_flag" ||
11756 test ! -s conftest.err
11757 } && test -s conftest.$ac_objext; then
11758 ac_lo=0 ac_mid=0
11759 while :; do
11760 cat >conftest.$ac_ext <<_ACEOF
11761/* confdefs.h. */
11762_ACEOF
11763cat confdefs.h >>conftest.$ac_ext
11764cat >>conftest.$ac_ext <<_ACEOF
11765/* end confdefs.h. */
11766$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011767 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011768int
11769main ()
11770{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011772test_array [0] = 0
11773
11774 ;
11775 return 0;
11776}
11777_ACEOF
11778rm -f conftest.$ac_objext
11779if { (ac_try="$ac_compile"
11780case "(($ac_try" in
11781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11782 *) ac_try_echo=$ac_try;;
11783esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011785 (eval "$ac_compile") 2>conftest.er1
11786 ac_status=$?
11787 grep -v '^ *+' conftest.er1 >conftest.err
11788 rm -f conftest.er1
11789 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011791 (exit $ac_status); } && {
11792 test -z "$ac_c_werror_flag" ||
11793 test ! -s conftest.err
11794 } && test -s conftest.$ac_objext; then
11795 ac_hi=$ac_mid; break
11796else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011797 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011798sed 's/^/| /' conftest.$ac_ext >&5
11799
11800 ac_lo=`expr $ac_mid + 1`
11801 if test $ac_lo -le $ac_mid; then
11802 ac_lo= ac_hi=
11803 break
11804 fi
11805 ac_mid=`expr 2 '*' $ac_mid + 1`
11806fi
11807
11808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11809 done
11810else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011811 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812sed 's/^/| /' conftest.$ac_ext >&5
11813
11814 cat >conftest.$ac_ext <<_ACEOF
11815/* confdefs.h. */
11816_ACEOF
11817cat confdefs.h >>conftest.$ac_ext
11818cat >>conftest.$ac_ext <<_ACEOF
11819/* end confdefs.h. */
11820$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011821 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011822int
11823main ()
11824{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011825static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826test_array [0] = 0
11827
11828 ;
11829 return 0;
11830}
11831_ACEOF
11832rm -f conftest.$ac_objext
11833if { (ac_try="$ac_compile"
11834case "(($ac_try" in
11835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11836 *) ac_try_echo=$ac_try;;
11837esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011839 (eval "$ac_compile") 2>conftest.er1
11840 ac_status=$?
11841 grep -v '^ *+' conftest.er1 >conftest.err
11842 rm -f conftest.er1
11843 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845 (exit $ac_status); } && {
11846 test -z "$ac_c_werror_flag" ||
11847 test ! -s conftest.err
11848 } && test -s conftest.$ac_objext; then
11849 ac_hi=-1 ac_mid=-1
11850 while :; do
11851 cat >conftest.$ac_ext <<_ACEOF
11852/* confdefs.h. */
11853_ACEOF
11854cat confdefs.h >>conftest.$ac_ext
11855cat >>conftest.$ac_ext <<_ACEOF
11856/* end confdefs.h. */
11857$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011858 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859int
11860main ()
11861{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011863test_array [0] = 0
11864
11865 ;
11866 return 0;
11867}
11868_ACEOF
11869rm -f conftest.$ac_objext
11870if { (ac_try="$ac_compile"
11871case "(($ac_try" in
11872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11873 *) ac_try_echo=$ac_try;;
11874esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011876 (eval "$ac_compile") 2>conftest.er1
11877 ac_status=$?
11878 grep -v '^ *+' conftest.er1 >conftest.err
11879 rm -f conftest.er1
11880 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011882 (exit $ac_status); } && {
11883 test -z "$ac_c_werror_flag" ||
11884 test ! -s conftest.err
11885 } && test -s conftest.$ac_objext; then
11886 ac_lo=$ac_mid; break
11887else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011888 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011889sed 's/^/| /' conftest.$ac_ext >&5
11890
11891 ac_hi=`expr '(' $ac_mid ')' - 1`
11892 if test $ac_mid -le $ac_hi; then
11893 ac_lo= ac_hi=
11894 break
11895 fi
11896 ac_mid=`expr 2 '*' $ac_mid`
11897fi
11898
11899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11900 done
11901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011902 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903sed 's/^/| /' conftest.$ac_ext >&5
11904
11905 ac_lo= ac_hi=
11906fi
11907
11908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11909fi
11910
11911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11912# Binary search between lo and hi bounds.
11913while test "x$ac_lo" != "x$ac_hi"; do
11914 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11915 cat >conftest.$ac_ext <<_ACEOF
11916/* confdefs.h. */
11917_ACEOF
11918cat confdefs.h >>conftest.$ac_ext
11919cat >>conftest.$ac_ext <<_ACEOF
11920/* end confdefs.h. */
11921$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011922 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011923int
11924main ()
11925{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011926static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011927test_array [0] = 0
11928
11929 ;
11930 return 0;
11931}
11932_ACEOF
11933rm -f conftest.$ac_objext
11934if { (ac_try="$ac_compile"
11935case "(($ac_try" in
11936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11937 *) ac_try_echo=$ac_try;;
11938esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011940 (eval "$ac_compile") 2>conftest.er1
11941 ac_status=$?
11942 grep -v '^ *+' conftest.er1 >conftest.err
11943 rm -f conftest.er1
11944 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011946 (exit $ac_status); } && {
11947 test -z "$ac_c_werror_flag" ||
11948 test ! -s conftest.err
11949 } && test -s conftest.$ac_objext; then
11950 ac_hi=$ac_mid
11951else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011952 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011953sed 's/^/| /' conftest.$ac_ext >&5
11954
11955 ac_lo=`expr '(' $ac_mid ')' + 1`
11956fi
11957
11958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11959done
11960case $ac_lo in
11961?*) ac_cv_sizeof_long_double=$ac_lo;;
11962'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011963 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011964See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011965echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011967 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011968 else
11969 ac_cv_sizeof_long_double=0
11970 fi ;;
11971esac
11972else
11973 cat >conftest.$ac_ext <<_ACEOF
11974/* confdefs.h. */
11975_ACEOF
11976cat confdefs.h >>conftest.$ac_ext
11977cat >>conftest.$ac_ext <<_ACEOF
11978/* end confdefs.h. */
11979$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011980 typedef long double ac__type_sizeof_;
11981static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11982static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983#include <stdio.h>
11984#include <stdlib.h>
11985int
11986main ()
11987{
11988
11989 FILE *f = fopen ("conftest.val", "w");
11990 if (! f)
11991 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011992 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 {
11994 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011995 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011997 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998 }
11999 else
12000 {
12001 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012002 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012004 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012005 }
12006 return ferror (f) || fclose (f) != 0;
12007
12008 ;
12009 return 0;
12010}
12011_ACEOF
12012rm -f conftest$ac_exeext
12013if { (ac_try="$ac_link"
12014case "(($ac_try" in
12015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12016 *) ac_try_echo=$ac_try;;
12017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012019 (eval "$ac_link") 2>&5
12020 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12023 { (case "(($ac_try" in
12024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12025 *) ac_try_echo=$ac_try;;
12026esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012028 (eval "$ac_try") 2>&5
12029 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012031 (exit $ac_status); }; }; then
12032 ac_cv_sizeof_long_double=`cat conftest.val`
12033else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012034 echo "$as_me: program exited with status $ac_status" >&5
12035echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012036sed 's/^/| /' conftest.$ac_ext >&5
12037
12038( exit $ac_status )
12039if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012040 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012041See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012042echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012044 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045 else
12046 ac_cv_sizeof_long_double=0
12047 fi
12048fi
12049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12050fi
12051rm -f conftest.val
12052fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012053{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12054echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012055
12056
12057
12058cat >>confdefs.h <<_ACEOF
12059#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12060_ACEOF
12061
12062
12063fi
12064
12065
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012066{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12067echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012068have_c99_bool=no
12069cat >conftest.$ac_ext <<_ACEOF
12070/* confdefs.h. */
12071_ACEOF
12072cat confdefs.h >>conftest.$ac_ext
12073cat >>conftest.$ac_ext <<_ACEOF
12074/* end confdefs.h. */
12075
12076int
12077main ()
12078{
12079_Bool x; x = (_Bool)0;
12080 ;
12081 return 0;
12082}
12083_ACEOF
12084rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085if { (ac_try="$ac_compile"
12086case "(($ac_try" in
12087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12088 *) ac_try_echo=$ac_try;;
12089esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012092 ac_status=$?
12093 grep -v '^ *+' conftest.er1 >conftest.err
12094 rm -f conftest.er1
12095 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097 (exit $ac_status); } && {
12098 test -z "$ac_c_werror_flag" ||
12099 test ! -s conftest.err
12100 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012101
12102
12103cat >>confdefs.h <<\_ACEOF
12104#define HAVE_C99_BOOL 1
12105_ACEOF
12106
12107 have_c99_bool=yes
12108
12109else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012110 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012111sed 's/^/| /' conftest.$ac_ext >&5
12112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113
Thomas Woutersb2137042007-02-01 18:02:27 +000012114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115
12116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012117{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12118echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012119if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012120{ echo "$as_me:$LINENO: checking for _Bool" >&5
12121echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12122if test "${ac_cv_type__Bool+set}" = set; then
12123 echo $ECHO_N "(cached) $ECHO_C" >&6
12124else
12125 cat >conftest.$ac_ext <<_ACEOF
12126/* confdefs.h. */
12127_ACEOF
12128cat confdefs.h >>conftest.$ac_ext
12129cat >>conftest.$ac_ext <<_ACEOF
12130/* end confdefs.h. */
12131$ac_includes_default
12132typedef _Bool ac__type_new_;
12133int
12134main ()
12135{
12136if ((ac__type_new_ *) 0)
12137 return 0;
12138if (sizeof (ac__type_new_))
12139 return 0;
12140 ;
12141 return 0;
12142}
12143_ACEOF
12144rm -f conftest.$ac_objext
12145if { (ac_try="$ac_compile"
12146case "(($ac_try" in
12147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12148 *) ac_try_echo=$ac_try;;
12149esac
12150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12151 (eval "$ac_compile") 2>conftest.er1
12152 ac_status=$?
12153 grep -v '^ *+' conftest.er1 >conftest.err
12154 rm -f conftest.er1
12155 cat conftest.err >&5
12156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12157 (exit $ac_status); } && {
12158 test -z "$ac_c_werror_flag" ||
12159 test ! -s conftest.err
12160 } && test -s conftest.$ac_objext; then
12161 ac_cv_type__Bool=yes
12162else
12163 echo "$as_me: failed program was:" >&5
12164sed 's/^/| /' conftest.$ac_ext >&5
12165
12166 ac_cv_type__Bool=no
12167fi
12168
12169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12170fi
12171{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12172echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174# The cast to long int works around a bug in the HP C Compiler
12175# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12176# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12177# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012178{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12179echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012180if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012181 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012182else
12183 if test "$cross_compiling" = yes; then
12184 # Depending upon the size, compute the lo and hi bounds.
12185cat >conftest.$ac_ext <<_ACEOF
12186/* confdefs.h. */
12187_ACEOF
12188cat confdefs.h >>conftest.$ac_ext
12189cat >>conftest.$ac_ext <<_ACEOF
12190/* end confdefs.h. */
12191$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012192 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012193int
12194main ()
12195{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012196static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012197test_array [0] = 0
12198
12199 ;
12200 return 0;
12201}
12202_ACEOF
12203rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204if { (ac_try="$ac_compile"
12205case "(($ac_try" in
12206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12207 *) ac_try_echo=$ac_try;;
12208esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012211 ac_status=$?
12212 grep -v '^ *+' conftest.er1 >conftest.err
12213 rm -f conftest.er1
12214 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216 (exit $ac_status); } && {
12217 test -z "$ac_c_werror_flag" ||
12218 test ! -s conftest.err
12219 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012220 ac_lo=0 ac_mid=0
12221 while :; do
12222 cat >conftest.$ac_ext <<_ACEOF
12223/* confdefs.h. */
12224_ACEOF
12225cat confdefs.h >>conftest.$ac_ext
12226cat >>conftest.$ac_ext <<_ACEOF
12227/* end confdefs.h. */
12228$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012229 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012230int
12231main ()
12232{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012234test_array [0] = 0
12235
12236 ;
12237 return 0;
12238}
12239_ACEOF
12240rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241if { (ac_try="$ac_compile"
12242case "(($ac_try" in
12243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12244 *) ac_try_echo=$ac_try;;
12245esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012248 ac_status=$?
12249 grep -v '^ *+' conftest.er1 >conftest.err
12250 rm -f conftest.er1
12251 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253 (exit $ac_status); } && {
12254 test -z "$ac_c_werror_flag" ||
12255 test ! -s conftest.err
12256 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012257 ac_hi=$ac_mid; break
12258else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012259 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012260sed 's/^/| /' conftest.$ac_ext >&5
12261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 ac_lo=`expr $ac_mid + 1`
12263 if test $ac_lo -le $ac_mid; then
12264 ac_lo= ac_hi=
12265 break
12266 fi
12267 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269
12270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012271 done
12272else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012273 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012274sed 's/^/| /' conftest.$ac_ext >&5
12275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012277/* confdefs.h. */
12278_ACEOF
12279cat confdefs.h >>conftest.$ac_ext
12280cat >>conftest.$ac_ext <<_ACEOF
12281/* end confdefs.h. */
12282$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012283 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012284int
12285main ()
12286{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012288test_array [0] = 0
12289
12290 ;
12291 return 0;
12292}
12293_ACEOF
12294rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295if { (ac_try="$ac_compile"
12296case "(($ac_try" in
12297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12298 *) ac_try_echo=$ac_try;;
12299esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012302 ac_status=$?
12303 grep -v '^ *+' conftest.er1 >conftest.err
12304 rm -f conftest.er1
12305 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307 (exit $ac_status); } && {
12308 test -z "$ac_c_werror_flag" ||
12309 test ! -s conftest.err
12310 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012311 ac_hi=-1 ac_mid=-1
12312 while :; do
12313 cat >conftest.$ac_ext <<_ACEOF
12314/* confdefs.h. */
12315_ACEOF
12316cat confdefs.h >>conftest.$ac_ext
12317cat >>conftest.$ac_ext <<_ACEOF
12318/* end confdefs.h. */
12319$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012320 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012321int
12322main ()
12323{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012325test_array [0] = 0
12326
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332if { (ac_try="$ac_compile"
12333case "(($ac_try" in
12334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12335 *) ac_try_echo=$ac_try;;
12336esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012338 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012339 ac_status=$?
12340 grep -v '^ *+' conftest.er1 >conftest.err
12341 rm -f conftest.er1
12342 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344 (exit $ac_status); } && {
12345 test -z "$ac_c_werror_flag" ||
12346 test ! -s conftest.err
12347 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012348 ac_lo=$ac_mid; break
12349else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012350 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012351sed 's/^/| /' conftest.$ac_ext >&5
12352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012353 ac_hi=`expr '(' $ac_mid ')' - 1`
12354 if test $ac_mid -le $ac_hi; then
12355 ac_lo= ac_hi=
12356 break
12357 fi
12358 ac_mid=`expr 2 '*' $ac_mid`
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 done
12363else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012364 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012365sed 's/^/| /' conftest.$ac_ext >&5
12366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369
12370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372
12373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012374# Binary search between lo and hi bounds.
12375while test "x$ac_lo" != "x$ac_hi"; do
12376 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12377 cat >conftest.$ac_ext <<_ACEOF
12378/* confdefs.h. */
12379_ACEOF
12380cat confdefs.h >>conftest.$ac_ext
12381cat >>conftest.$ac_ext <<_ACEOF
12382/* end confdefs.h. */
12383$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012384 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012385int
12386main ()
12387{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012388static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012389test_array [0] = 0
12390
12391 ;
12392 return 0;
12393}
12394_ACEOF
12395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396if { (ac_try="$ac_compile"
12397case "(($ac_try" in
12398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12399 *) ac_try_echo=$ac_try;;
12400esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012403 ac_status=$?
12404 grep -v '^ *+' conftest.er1 >conftest.err
12405 rm -f conftest.er1
12406 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408 (exit $ac_status); } && {
12409 test -z "$ac_c_werror_flag" ||
12410 test ! -s conftest.err
12411 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012412 ac_hi=$ac_mid
12413else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012414 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012415sed 's/^/| /' conftest.$ac_ext >&5
12416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419
12420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012421done
12422case $ac_lo in
12423?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012425 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012426See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012427echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012428See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012429 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 else
12431 ac_cv_sizeof__Bool=0
12432 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012433esac
12434else
12435 cat >conftest.$ac_ext <<_ACEOF
12436/* confdefs.h. */
12437_ACEOF
12438cat confdefs.h >>conftest.$ac_ext
12439cat >>conftest.$ac_ext <<_ACEOF
12440/* end confdefs.h. */
12441$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012442 typedef _Bool ac__type_sizeof_;
12443static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12444static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012445#include <stdio.h>
12446#include <stdlib.h>
12447int
12448main ()
12449{
12450
12451 FILE *f = fopen ("conftest.val", "w");
12452 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012454 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012455 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012457 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012459 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012460 }
12461 else
12462 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012464 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012466 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012467 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012469
12470 ;
12471 return 0;
12472}
12473_ACEOF
12474rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475if { (ac_try="$ac_link"
12476case "(($ac_try" in
12477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12478 *) ac_try_echo=$ac_try;;
12479esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012482 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012484 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485 { (case "(($ac_try" in
12486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12487 *) ac_try_echo=$ac_try;;
12488esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012491 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012493 (exit $ac_status); }; }; then
12494 ac_cv_sizeof__Bool=`cat conftest.val`
12495else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012496 echo "$as_me: program exited with status $ac_status" >&5
12497echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012498sed 's/^/| /' conftest.$ac_ext >&5
12499
12500( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012502 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012503See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012504echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012505See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012506 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507 else
12508 ac_cv_sizeof__Bool=0
12509 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511rm -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 +000012512fi
12513rm -f conftest.val
12514fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012515{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12516echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517
12518
12519
Thomas Woutersb2137042007-02-01 18:02:27 +000012520cat >>confdefs.h <<_ACEOF
12521#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12522_ACEOF
12523
12524
12525fi
12526
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012527{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12528echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012529if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012530 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012531else
12532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* confdefs.h. */
12534_ACEOF
12535cat confdefs.h >>conftest.$ac_ext
12536cat >>conftest.$ac_ext <<_ACEOF
12537/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012538#ifdef HAVE_STDINT_H
12539 #include <stdint.h>
12540 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012541
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012542typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012543int
12544main ()
12545{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012546if ((ac__type_new_ *) 0)
12547 return 0;
12548if (sizeof (ac__type_new_))
12549 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ;
12551 return 0;
12552}
12553_ACEOF
12554rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555if { (ac_try="$ac_compile"
12556case "(($ac_try" in
12557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12558 *) ac_try_echo=$ac_try;;
12559esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012563 grep -v '^ *+' conftest.er1 >conftest.err
12564 rm -f conftest.er1
12565 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567 (exit $ac_status); } && {
12568 test -z "$ac_c_werror_flag" ||
12569 test ! -s conftest.err
12570 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012571 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012572else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012574sed 's/^/| /' conftest.$ac_ext >&5
12575
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012576 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578
12579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012580fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012581{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12582echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12583if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012584
12585cat >>confdefs.h <<_ACEOF
12586#define HAVE_UINTPTR_T 1
12587_ACEOF
12588
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012589{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12590echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12591if test "${ac_cv_type_uintptr_t+set}" = set; then
12592 echo $ECHO_N "(cached) $ECHO_C" >&6
12593else
12594 cat >conftest.$ac_ext <<_ACEOF
12595/* confdefs.h. */
12596_ACEOF
12597cat confdefs.h >>conftest.$ac_ext
12598cat >>conftest.$ac_ext <<_ACEOF
12599/* end confdefs.h. */
12600$ac_includes_default
12601typedef uintptr_t ac__type_new_;
12602int
12603main ()
12604{
12605if ((ac__type_new_ *) 0)
12606 return 0;
12607if (sizeof (ac__type_new_))
12608 return 0;
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613rm -f conftest.$ac_objext
12614if { (ac_try="$ac_compile"
12615case "(($ac_try" in
12616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12617 *) ac_try_echo=$ac_try;;
12618esac
12619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12620 (eval "$ac_compile") 2>conftest.er1
12621 ac_status=$?
12622 grep -v '^ *+' conftest.er1 >conftest.err
12623 rm -f conftest.er1
12624 cat conftest.err >&5
12625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12626 (exit $ac_status); } && {
12627 test -z "$ac_c_werror_flag" ||
12628 test ! -s conftest.err
12629 } && test -s conftest.$ac_objext; then
12630 ac_cv_type_uintptr_t=yes
12631else
12632 echo "$as_me: failed program was:" >&5
12633sed 's/^/| /' conftest.$ac_ext >&5
12634
12635 ac_cv_type_uintptr_t=no
12636fi
12637
12638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12639fi
12640{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12641echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643# The cast to long int works around a bug in the HP C Compiler
12644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12646# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012647{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12648echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012649if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012651else
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 if test "$cross_compiling" = yes; then
12653 # Depending upon the size, compute the lo and hi bounds.
12654cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* confdefs.h. */
12656_ACEOF
12657cat confdefs.h >>conftest.$ac_ext
12658cat >>conftest.$ac_ext <<_ACEOF
12659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012660$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012661 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012662int
12663main ()
12664{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012666test_array [0] = 0
12667
12668 ;
12669 return 0;
12670}
12671_ACEOF
12672rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673if { (ac_try="$ac_compile"
12674case "(($ac_try" in
12675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12676 *) ac_try_echo=$ac_try;;
12677esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012681 grep -v '^ *+' conftest.er1 >conftest.err
12682 rm -f conftest.er1
12683 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 (exit $ac_status); } && {
12686 test -z "$ac_c_werror_flag" ||
12687 test ! -s conftest.err
12688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 ac_lo=0 ac_mid=0
12690 while :; do
12691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012692/* confdefs.h. */
12693_ACEOF
12694cat confdefs.h >>conftest.$ac_ext
12695cat >>conftest.$ac_ext <<_ACEOF
12696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012697$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012698 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012699int
12700main ()
12701{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012702static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012703test_array [0] = 0
12704
12705 ;
12706 return 0;
12707}
12708_ACEOF
12709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710if { (ac_try="$ac_compile"
12711case "(($ac_try" in
12712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12713 *) ac_try_echo=$ac_try;;
12714esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012718 grep -v '^ *+' conftest.er1 >conftest.err
12719 rm -f conftest.er1
12720 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722 (exit $ac_status); } && {
12723 test -z "$ac_c_werror_flag" ||
12724 test ! -s conftest.err
12725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ac_hi=$ac_mid; break
12727else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012729sed 's/^/| /' conftest.$ac_ext >&5
12730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731 ac_lo=`expr $ac_mid + 1`
12732 if test $ac_lo -le $ac_mid; then
12733 ac_lo= ac_hi=
12734 break
12735 fi
12736 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738
12739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 done
12741else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012743sed 's/^/| /' conftest.$ac_ext >&5
12744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012746/* confdefs.h. */
12747_ACEOF
12748cat confdefs.h >>conftest.$ac_ext
12749cat >>conftest.$ac_ext <<_ACEOF
12750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012751$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012752 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012753int
12754main ()
12755{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012757test_array [0] = 0
12758
12759 ;
12760 return 0;
12761}
12762_ACEOF
12763rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764if { (ac_try="$ac_compile"
12765case "(($ac_try" in
12766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12767 *) ac_try_echo=$ac_try;;
12768esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012772 grep -v '^ *+' conftest.er1 >conftest.err
12773 rm -f conftest.er1
12774 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776 (exit $ac_status); } && {
12777 test -z "$ac_c_werror_flag" ||
12778 test ! -s conftest.err
12779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 ac_hi=-1 ac_mid=-1
12781 while :; do
12782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* confdefs.h. */
12784_ACEOF
12785cat confdefs.h >>conftest.$ac_ext
12786cat >>conftest.$ac_ext <<_ACEOF
12787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012788$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012789 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012790int
12791main ()
12792{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012793static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012794test_array [0] = 0
12795
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801if { (ac_try="$ac_compile"
12802case "(($ac_try" in
12803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12804 *) ac_try_echo=$ac_try;;
12805esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012809 grep -v '^ *+' conftest.er1 >conftest.err
12810 rm -f conftest.er1
12811 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813 (exit $ac_status); } && {
12814 test -z "$ac_c_werror_flag" ||
12815 test ! -s conftest.err
12816 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 ac_lo=$ac_mid; break
12818else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012820sed 's/^/| /' conftest.$ac_ext >&5
12821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822 ac_hi=`expr '(' $ac_mid ')' - 1`
12823 if test $ac_mid -le $ac_hi; then
12824 ac_lo= ac_hi=
12825 break
12826 fi
12827 ac_mid=`expr 2 '*' $ac_mid`
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 done
12832else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012834sed 's/^/| /' conftest.$ac_ext >&5
12835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838
12839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841
12842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012843# Binary search between lo and hi bounds.
12844while test "x$ac_lo" != "x$ac_hi"; do
12845 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012847/* confdefs.h. */
12848_ACEOF
12849cat confdefs.h >>conftest.$ac_ext
12850cat >>conftest.$ac_ext <<_ACEOF
12851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012852$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012853 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012854int
12855main ()
12856{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012857static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012858test_array [0] = 0
12859
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865if { (ac_try="$ac_compile"
12866case "(($ac_try" in
12867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12868 *) ac_try_echo=$ac_try;;
12869esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012873 grep -v '^ *+' conftest.er1 >conftest.err
12874 rm -f conftest.er1
12875 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877 (exit $ac_status); } && {
12878 test -z "$ac_c_werror_flag" ||
12879 test ! -s conftest.err
12880 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 ac_hi=$ac_mid
12882else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012884sed 's/^/| /' conftest.$ac_ext >&5
12885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888
12889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012890done
12891case $ac_lo in
12892?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012894 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012895See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012896echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012897See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012898 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 else
12900 ac_cv_sizeof_uintptr_t=0
12901 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012902esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012903else
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* confdefs.h. */
12906_ACEOF
12907cat confdefs.h >>conftest.$ac_ext
12908cat >>conftest.$ac_ext <<_ACEOF
12909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012910$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012911 typedef uintptr_t ac__type_sizeof_;
12912static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12913static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012914#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012915#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012916int
12917main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012918{
Martin v. Löwis11437992002-04-12 09:54:03 +000012919
12920 FILE *f = fopen ("conftest.val", "w");
12921 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012923 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012926 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012928 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 }
12930 else
12931 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012933 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012935 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012938
12939 ;
12940 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012941}
Martin v. Löwis11437992002-04-12 09:54:03 +000012942_ACEOF
12943rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944if { (ac_try="$ac_link"
12945case "(($ac_try" in
12946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12947 *) ac_try_echo=$ac_try;;
12948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012954 { (case "(($ac_try" in
12955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12956 *) ac_try_echo=$ac_try;;
12957esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 (exit $ac_status); }; }; then
12963 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012965 echo "$as_me: program exited with status $ac_status" >&5
12966echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012967sed 's/^/| /' conftest.$ac_ext >&5
12968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012972See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012973echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012974See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012975 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976 else
12977 ac_cv_sizeof_uintptr_t=0
12978 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980rm -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 +000012981fi
12982rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012983fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012984{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12985echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986
12987
12988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012990#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012991_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012992
Michael W. Hudson54241132001-12-07 15:38:26 +000012993
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012994fi
12995
Thomas Wouters89f507f2006-12-13 04:49:30 +000012996
12997
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012998# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012999{ echo "$as_me:$LINENO: checking size of off_t" >&5
13000echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013001if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013003else
13004 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013005 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013006else
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013008/* confdefs.h. */
13009_ACEOF
13010cat confdefs.h >>conftest.$ac_ext
13011cat >>conftest.$ac_ext <<_ACEOF
13012/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013013#include <stdio.h>
13014#include <sys/types.h>
13015main()
13016{
13017 FILE *f=fopen("conftestval", "w");
13018 if (!f) exit(1);
13019 fprintf(f, "%d\n", sizeof(off_t));
13020 exit(0);
13021}
Martin v. Löwis11437992002-04-12 09:54:03 +000013022_ACEOF
13023rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024if { (ac_try="$ac_link"
13025case "(($ac_try" in
13026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13027 *) ac_try_echo=$ac_try;;
13028esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034 { (case "(($ac_try" in
13035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13036 *) ac_try_echo=$ac_try;;
13037esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013043 ac_cv_sizeof_off_t=`cat conftestval`
13044else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013045 echo "$as_me: program exited with status $ac_status" >&5
13046echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013047sed 's/^/| /' conftest.$ac_ext >&5
13048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049( exit $ac_status )
13050ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -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 +000013053fi
13054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055
13056
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013057fi
13058
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013059{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13060echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
13062cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013063#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013064_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013065
Michael W. Hudson54241132001-12-07 15:38:26 +000013066
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013067{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13068echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013069if test "$have_long_long" = yes
13070then
13071if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013072 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013073
Martin v. Löwis11437992002-04-12 09:54:03 +000013074cat >>confdefs.h <<\_ACEOF
13075#define HAVE_LARGEFILE_SUPPORT 1
13076_ACEOF
13077
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013078 { echo "$as_me:$LINENO: result: yes" >&5
13079echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013080else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013081 { echo "$as_me:$LINENO: result: no" >&5
13082echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013083fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013084else
13085 { echo "$as_me:$LINENO: result: no" >&5
13086echo "${ECHO_T}no" >&6; }
13087fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013088
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013089# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013090{ echo "$as_me:$LINENO: checking size of time_t" >&5
13091echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013092if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013094else
13095 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013096 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013097else
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013099/* confdefs.h. */
13100_ACEOF
13101cat confdefs.h >>conftest.$ac_ext
13102cat >>conftest.$ac_ext <<_ACEOF
13103/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013104#include <stdio.h>
13105#include <time.h>
13106main()
13107{
13108 FILE *f=fopen("conftestval", "w");
13109 if (!f) exit(1);
13110 fprintf(f, "%d\n", sizeof(time_t));
13111 exit(0);
13112}
Martin v. Löwis11437992002-04-12 09:54:03 +000013113_ACEOF
13114rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115if { (ac_try="$ac_link"
13116case "(($ac_try" in
13117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13118 *) ac_try_echo=$ac_try;;
13119esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125 { (case "(($ac_try" in
13126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13127 *) ac_try_echo=$ac_try;;
13128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013134 ac_cv_sizeof_time_t=`cat conftestval`
13135else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013136 echo "$as_me: program exited with status $ac_status" >&5
13137echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013138sed 's/^/| /' conftest.$ac_ext >&5
13139
Martin v. Löwis11437992002-04-12 09:54:03 +000013140( exit $ac_status )
13141ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143rm -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 +000013144fi
13145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146
13147
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013148fi
13149
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013150{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13151echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
13153cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013154#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013155_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013156
Michael W. Hudson54241132001-12-07 15:38:26 +000013157
13158
Trent Mick635f6fb2000-08-23 21:33:05 +000013159# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013160ac_save_cc="$CC"
13161if test "$ac_cv_kpthread" = "yes"
13162then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013163elif test "$ac_cv_kthread" = "yes"
13164then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013165elif test "$ac_cv_pthread" = "yes"
13166then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013167fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013168{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13169echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013170have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013172/* confdefs.h. */
13173_ACEOF
13174cat confdefs.h >>conftest.$ac_ext
13175cat >>conftest.$ac_ext <<_ACEOF
13176/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013177#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013178int
13179main ()
13180{
Guido van Rossum12580492000-09-24 16:47:19 +000013181pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 ;
13183 return 0;
13184}
13185_ACEOF
13186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187if { (ac_try="$ac_compile"
13188case "(($ac_try" in
13189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13190 *) ac_try_echo=$ac_try;;
13191esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013195 grep -v '^ *+' conftest.er1 >conftest.err
13196 rm -f conftest.er1
13197 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199 (exit $ac_status); } && {
13200 test -z "$ac_c_werror_flag" ||
13201 test ! -s conftest.err
13202 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013203 have_pthread_t=yes
13204else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013206sed 's/^/| /' conftest.$ac_ext >&5
13207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208
Trent Mick635f6fb2000-08-23 21:33:05 +000013209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210
13211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013212{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13213echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013214if test "$have_pthread_t" = yes ; then
13215 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013216 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13217echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013219 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013220else
13221 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013222 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013223else
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* confdefs.h. */
13226_ACEOF
13227cat confdefs.h >>conftest.$ac_ext
13228cat >>conftest.$ac_ext <<_ACEOF
13229/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013230#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013231#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013232 main()
13233 {
13234 FILE *f=fopen("conftestval", "w");
13235 if (!f) exit(1);
13236 fprintf(f, "%d\n", sizeof(pthread_t));
13237 exit(0);
13238 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013239_ACEOF
13240rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241if { (ac_try="$ac_link"
13242case "(($ac_try" in
13243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13244 *) ac_try_echo=$ac_try;;
13245esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013250 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251 { (case "(($ac_try" in
13252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13253 *) ac_try_echo=$ac_try;;
13254esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013260 ac_cv_sizeof_pthread_t=`cat conftestval`
13261else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013262 echo "$as_me: program exited with status $ac_status" >&5
13263echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013264sed 's/^/| /' conftest.$ac_ext >&5
13265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266( exit $ac_status )
13267ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269rm -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 +000013270fi
13271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272
13273
Trent Mick635f6fb2000-08-23 21:33:05 +000013274fi
13275
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013276 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13277echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
13279cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013280#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013281_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013282
13283fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013284CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013285
Michael W. Hudson54241132001-12-07 15:38:26 +000013286
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013287
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013288
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013289case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013290 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013291 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13292 ;;
13293 Darwin/*)
13294 OTHER_LIBTOOL_OPT=""
13295 ;;
13296esac
13297
13298
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013299ARCH_RUN_32BIT=""
13300
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013301case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013302 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013303 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13304 if test "${enable_universalsdk}"; then
13305 :
13306 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013307 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013308 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013309 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013310 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013311 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013312 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013313 if test ${gcc_version} '<' 4.0
13314 then
13315 LIBTOOL_CRUFT="-lcc_dynamic"
13316 else
13317 LIBTOOL_CRUFT=""
13318 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013319 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013320 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013321else
13322 cat >conftest.$ac_ext <<_ACEOF
13323/* confdefs.h. */
13324_ACEOF
13325cat confdefs.h >>conftest.$ac_ext
13326cat >>conftest.$ac_ext <<_ACEOF
13327/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013328
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013329 #include <unistd.h>
13330 int main(int argc, char*argv[])
13331 {
13332 if (sizeof(long) == 4) {
13333 return 0;
13334 } else {
13335 return 1;
13336 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013337 }
13338
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013339_ACEOF
13340rm -f conftest$ac_exeext
13341if { (ac_try="$ac_link"
13342case "(($ac_try" in
13343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13344 *) ac_try_echo=$ac_try;;
13345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013347 (eval "$ac_link") 2>&5
13348 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13351 { (case "(($ac_try" in
13352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13353 *) ac_try_echo=$ac_try;;
13354esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013356 (eval "$ac_try") 2>&5
13357 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013359 (exit $ac_status); }; }; then
13360 ac_osx_32bit=yes
13361else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013362 echo "$as_me: program exited with status $ac_status" >&5
13363echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013364sed 's/^/| /' conftest.$ac_ext >&5
13365
13366( exit $ac_status )
13367ac_osx_32bit=no
13368fi
13369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13370fi
13371
13372
13373
13374 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013375 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013376 i386)
13377 MACOSX_DEFAULT_ARCH="i386"
13378 ;;
13379 ppc)
13380 MACOSX_DEFAULT_ARCH="ppc"
13381 ;;
13382 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013383 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13384echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013385 { (exit 1); exit 1; }; }
13386 ;;
13387 esac
13388 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013389 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013390 i386)
13391 MACOSX_DEFAULT_ARCH="x86_64"
13392 ;;
13393 ppc)
13394 MACOSX_DEFAULT_ARCH="ppc64"
13395 ;;
13396 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013397 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13398echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013399 { (exit 1); exit 1; }; }
13400 ;;
13401 esac
13402
13403 #ARCH_RUN_32BIT="true"
13404 fi
13405
13406 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013407 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013408 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013409esac
13410
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013411{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13412echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013413if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013414then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013415 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013417 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419cat >>confdefs.h <<\_ACEOF
13420#define WITH_NEXT_FRAMEWORK 1
13421_ACEOF
13422
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013423 { echo "$as_me:$LINENO: result: yes" >&5
13424echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013425 if test $enable_shared = "yes"
13426 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013427 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13428echo "$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 +000013429 { (exit 1); exit 1; }; }
13430 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013431else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013432 { echo "$as_me:$LINENO: result: no" >&5
13433echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013434fi
13435
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013436{ echo "$as_me:$LINENO: checking for dyld" >&5
13437echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013438case $ac_sys_system/$ac_sys_release in
13439 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441cat >>confdefs.h <<\_ACEOF
13442#define WITH_DYLD 1
13443_ACEOF
13444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013445 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13446echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013447 ;;
13448 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013449 { echo "$as_me:$LINENO: result: no" >&5
13450echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013451 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013452esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013453
Guido van Rossum0a516c91994-09-12 10:58:40 +000013454# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013455
Michael W. Hudson54241132001-12-07 15:38:26 +000013456
13457
13458
13459
Guido van Rossum0a516c91994-09-12 10:58:40 +000013460# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013461# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013462{ echo "$as_me:$LINENO: checking SO" >&5
13463echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013464if test -z "$SO"
13465then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013467 hp*|HP*)
13468 case `uname -m` in
13469 ia64) SO=.so;;
13470 *) SO=.sl;;
13471 esac
13472 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013473 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013474 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013475 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013476else
13477 # this might also be a termcap variable, see #610332
13478 echo
13479 echo '====================================================================='
13480 echo '+ +'
13481 echo '+ WARNING: You have set SO in your environment. +'
13482 echo '+ Do you really mean to change the extension for shared libraries? +'
13483 echo '+ Continuing in 10 seconds to let you to ponder. +'
13484 echo '+ +'
13485 echo '====================================================================='
13486 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013487fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013488{ echo "$as_me:$LINENO: result: $SO" >&5
13489echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013490
Georg Brandlb1441c72009-01-03 22:33:39 +000013491
Thomas Wouters477c8d52006-05-27 19:21:47 +000013492cat >>confdefs.h <<_ACEOF
13493#define SHLIB_EXT "$SO"
13494_ACEOF
13495
Guido van Rossum0a516c91994-09-12 10:58:40 +000013496# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013497# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013498# (Shared libraries in this instance are shared modules to be loaded into
13499# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013500{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13501echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013502if test -z "$LDSHARED"
13503then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013505 AIX*)
13506 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013507 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013508 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013509 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013510 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013512 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013513 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013514 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013515 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013516 hp*|HP*)
13517 if test "$GCC" = "yes"
13518 then LDSHARED='$(CC) -shared'
13519 else LDSHARED='ld -b';
13520 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013521 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013522 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013523 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13524 if test "$enable_framework" ; then
13525 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013526 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13527 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013528 else
13529 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013530 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013531 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013532 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013533 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13534 if test "$enable_framework" ; then
13535 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013536 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13537 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013538 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013539 # No framework, use the Python app as bundle-loader
13540 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013541 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013542 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013543 Darwin/*)
13544 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13545 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013546
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013547 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013548 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013549 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013550 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013551 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013552 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13553 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013554 else
13555 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13556 if test "$enable_framework" ; then
13557 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013558 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13559 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013560 else
13561 # No framework, use the Python app as bundle-loader
13562 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13563 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13564 fi
13565 fi
13566 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013567 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013568 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013569 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013570 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013571 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013572 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013573 else
13574 LDSHARED="ld -Bshareable ${LDFLAGS}"
13575 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013576 OpenBSD*)
13577 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13578 then
13579 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13580 else
13581 case `uname -r` in
13582 [01].* | 2.[0-7] | 2.[0-7].*)
13583 LDSHARED="ld -Bshareable ${LDFLAGS}"
13584 ;;
13585 *)
13586 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13587 ;;
13588 esac
13589 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013590 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013591 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013592 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013593 then LDSHARED='$(CC) -shared'
13594 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013595 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013596 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013597 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013598 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013599 *) LDSHARED="ld";;
13600 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013601fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013602{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13603echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013604BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013605# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013606# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013607{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13608echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013609if test -z "$CCSHARED"
13610then
Guido van Rossum07397971997-04-29 21:49:50 +000013611 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013612 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013613 then CCSHARED="-fPIC";
13614 elif test `uname -p` = sparc;
13615 then CCSHARED="-xcode=pic32";
13616 else CCSHARED="-Kpic";
13617 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013618 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013619 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013620 else CCSHARED="+z";
13621 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013622 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013623 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013624 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013625 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013626 if test "$GCC" = "yes"
13627 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013628 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013629 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013630 SCO_SV*)
13631 if test "$GCC" = "yes"
13632 then CCSHARED="-fPIC"
13633 else CCSHARED="-Kpic -belf"
13634 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013635 IRIX*/6*) case $CC in
13636 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013637 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013638 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013639 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013641fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013642{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13643echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013644# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013645# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013646{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13647echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013648if test -z "$LINKFORSHARED"
13649then
Guido van Rossum07397971997-04-29 21:49:50 +000013650 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013651 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013652 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013653 LINKFORSHARED="-Wl,-E -Wl,+s";;
13654# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013655 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013656 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013657 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013659 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013660 if test "$enable_framework"
13661 then
Jack Jansenda49e192005-01-07 13:08:22 +000013662 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013663 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013664 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013665 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013666 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013667 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013668 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013669 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13670 then
13671 LINKFORSHARED="-Wl,--export-dynamic"
13672 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013673 SunOS/5*) case $CC in
13674 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013675 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013676 then
13677 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013678 fi;;
13679 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013680 CYGWIN*)
13681 if test $enable_shared = "no"
13682 then
13683 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13684 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013685 QNX*)
13686 # -Wl,-E causes the symbols to be added to the dynamic
13687 # symbol table so that they can be found when a module
13688 # is loaded. -N 2048K causes the stack size to be set
13689 # to 2048 kilobytes so that the stack doesn't overflow
13690 # when running test_compile.py.
13691 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013692 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013693fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013694{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13695echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013696
Michael W. Hudson54241132001-12-07 15:38:26 +000013697
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013698
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013699{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13700echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013701if test ! "$LIBRARY" = "$LDLIBRARY"
13702then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013703 case $ac_sys_system in
13704 CYGWIN*)
13705 # Cygwin needs CCSHARED when building extension DLLs
13706 # but not when building the interpreter DLL.
13707 CFLAGSFORSHARED='';;
13708 *)
13709 CFLAGSFORSHARED='$(CCSHARED)'
13710 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013711fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013712{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13713echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013714
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013715# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13716# library (with --enable-shared).
13717# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013718# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13719# if it is not required, since it creates a dependency of the shared library
13720# to LIBS. This, in turn, means that applications linking the shared libpython
13721# don't need to link LIBS explicitly. The default should be only changed
13722# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013723
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013724{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13725echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013726case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013727 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013728 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013729esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013730{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13731echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013732
13733
Guido van Rossum627b2d71993-12-24 10:39:16 +000013734# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013736{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13737echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013738if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740else
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013742LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013744/* confdefs.h. */
13745_ACEOF
13746cat confdefs.h >>conftest.$ac_ext
13747cat >>conftest.$ac_ext <<_ACEOF
13748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750/* Override any GCC internal prototype to avoid an error.
13751 Use char because int might match the return type of a GCC
13752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013753#ifdef __cplusplus
13754extern "C"
13755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013756char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013757int
13758main ()
13759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ;
13762 return 0;
13763}
13764_ACEOF
13765rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766if { (ac_try="$ac_link"
13767case "(($ac_try" in
13768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13769 *) ac_try_echo=$ac_try;;
13770esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013774 grep -v '^ *+' conftest.er1 >conftest.err
13775 rm -f conftest.er1
13776 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 (exit $ac_status); } && {
13779 test -z "$ac_c_werror_flag" ||
13780 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013781 } && test -s conftest$ac_exeext &&
13782 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013786sed 's/^/| /' conftest.$ac_ext >&5
13787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790
13791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013794fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013795{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13796echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13797if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 cat >>confdefs.h <<_ACEOF
13799#define HAVE_LIBDL 1
13800_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013801
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013802 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013803
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804fi
13805 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013807{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13808echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013809if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811else
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013813LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* confdefs.h. */
13816_ACEOF
13817cat confdefs.h >>conftest.$ac_ext
13818cat >>conftest.$ac_ext <<_ACEOF
13819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821/* Override any GCC internal prototype to avoid an error.
13822 Use char because int might match the return type of a GCC
13823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013824#ifdef __cplusplus
13825extern "C"
13826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013827char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013828int
13829main ()
13830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 ;
13833 return 0;
13834}
13835_ACEOF
13836rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837if { (ac_try="$ac_link"
13838case "(($ac_try" in
13839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13840 *) ac_try_echo=$ac_try;;
13841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013845 grep -v '^ *+' conftest.er1 >conftest.err
13846 rm -f conftest.er1
13847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849 (exit $ac_status); } && {
13850 test -z "$ac_c_werror_flag" ||
13851 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013852 } && test -s conftest$ac_exeext &&
13853 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013855else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013857sed 's/^/| /' conftest.$ac_ext >&5
13858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861
13862rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013864LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013865fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013866{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13867echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13868if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 cat >>confdefs.h <<_ACEOF
13870#define HAVE_LIBDLD 1
13871_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013873 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875fi
13876 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013877
Georg Brandlb1441c72009-01-03 22:33:39 +000013878# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013879if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013880 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13881echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013882if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013884else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013885 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013887/* confdefs.h. */
13888_ACEOF
13889cat confdefs.h >>conftest.$ac_ext
13890cat >>conftest.$ac_ext <<_ACEOF
13891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893/* Override any GCC internal prototype to avoid an error.
13894 Use char because int might match the return type of a GCC
13895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013896#ifdef __cplusplus
13897extern "C"
13898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013899char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013900int
13901main ()
13902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908for ac_lib in '' pthread rt posix4; do
13909 if test -z "$ac_lib"; then
13910 ac_res="none required"
13911 else
13912 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013913 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 fi
13915 rm -f conftest.$ac_objext conftest$ac_exeext
13916if { (ac_try="$ac_link"
13917case "(($ac_try" in
13918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13919 *) ac_try_echo=$ac_try;;
13920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013923 ac_status=$?
13924 grep -v '^ *+' conftest.er1 >conftest.err
13925 rm -f conftest.er1
13926 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 (exit $ac_status); } && {
13929 test -z "$ac_c_werror_flag" ||
13930 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013931 } && test -s conftest$ac_exeext &&
13932 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013934else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013935 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013936sed 's/^/| /' conftest.$ac_ext >&5
13937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938
Thomas Wouters477c8d52006-05-27 19:21:47 +000013939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940
13941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13942 conftest$ac_exeext
13943 if test "${ac_cv_search_sem_init+set}" = set; then
13944 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946done
13947if test "${ac_cv_search_sem_init+set}" = set; then
13948 :
13949else
13950 ac_cv_search_sem_init=no
13951fi
13952rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013953LIBS=$ac_func_search_save_LIBS
13954fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013955{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13956echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957ac_res=$ac_cv_search_sem_init
13958if test "$ac_res" != no; then
13959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013960
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013961fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013962 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013963 # posix4 on Solaris 2.6
13964 # pthread (first!) on Linux
13965fi
13966
Martin v. Löwis19d17342003-06-14 21:03:05 +000013967# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013968{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13969echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013970if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013972else
13973 ac_check_lib_save_LIBS=$LIBS
13974LIBS="-lintl $LIBS"
13975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* confdefs.h. */
13977_ACEOF
13978cat confdefs.h >>conftest.$ac_ext
13979cat >>conftest.$ac_ext <<_ACEOF
13980/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982/* Override any GCC internal prototype to avoid an error.
13983 Use char because int might match the return type of a GCC
13984 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013985#ifdef __cplusplus
13986extern "C"
13987#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013988char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013989int
13990main ()
13991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013992return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013993 ;
13994 return 0;
13995}
13996_ACEOF
13997rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998if { (ac_try="$ac_link"
13999case "(($ac_try" in
14000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14001 *) ac_try_echo=$ac_try;;
14002esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014006 grep -v '^ *+' conftest.er1 >conftest.err
14007 rm -f conftest.er1
14008 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010 (exit $ac_status); } && {
14011 test -z "$ac_c_werror_flag" ||
14012 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014013 } && test -s conftest$ac_exeext &&
14014 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014015 ac_cv_lib_intl_textdomain=yes
14016else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014018sed 's/^/| /' conftest.$ac_ext >&5
14019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022
14023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014025LIBS=$ac_check_lib_save_LIBS
14026fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014027{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14028echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14029if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014030
14031cat >>confdefs.h <<\_ACEOF
14032#define WITH_LIBINTL 1
14033_ACEOF
14034
Brett Cannonc6d936e2009-06-07 20:09:53 +000014035 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014036fi
14037
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014038
14039# checks for system dependent C++ extensions support
14040case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014041 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14042echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014044/* confdefs.h. */
14045_ACEOF
14046cat confdefs.h >>conftest.$ac_ext
14047cat >>conftest.$ac_ext <<_ACEOF
14048/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014049#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014050int
14051main ()
14052{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014053loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 ;
14055 return 0;
14056}
14057_ACEOF
14058rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059if { (ac_try="$ac_link"
14060case "(($ac_try" in
14061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14062 *) ac_try_echo=$ac_try;;
14063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014067 grep -v '^ *+' conftest.er1 >conftest.err
14068 rm -f conftest.er1
14069 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071 (exit $ac_status); } && {
14072 test -z "$ac_c_werror_flag" ||
14073 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014074 } && test -s conftest$ac_exeext &&
14075 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014076
Martin v. Löwis11437992002-04-12 09:54:03 +000014077cat >>confdefs.h <<\_ACEOF
14078#define AIX_GENUINE_CPLUSPLUS 1
14079_ACEOF
14080
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014081 { echo "$as_me:$LINENO: result: yes" >&5
14082echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014083else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014085sed 's/^/| /' conftest.$ac_ext >&5
14086
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014087 { echo "$as_me:$LINENO: result: no" >&5
14088echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014090
14091rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014092 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014093 *) ;;
14094esac
14095
Guido van Rossum70c7f481998-03-26 18:44:10 +000014096# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014097{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14098echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014099if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014101else
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014103LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014105/* confdefs.h. */
14106_ACEOF
14107cat confdefs.h >>conftest.$ac_ext
14108cat >>conftest.$ac_ext <<_ACEOF
14109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111/* Override any GCC internal prototype to avoid an error.
14112 Use char because int might match the return type of a GCC
14113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014114#ifdef __cplusplus
14115extern "C"
14116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014117char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014118int
14119main ()
14120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ;
14123 return 0;
14124}
14125_ACEOF
14126rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127if { (ac_try="$ac_link"
14128case "(($ac_try" in
14129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14130 *) ac_try_echo=$ac_try;;
14131esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014135 grep -v '^ *+' conftest.er1 >conftest.err
14136 rm -f conftest.er1
14137 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139 (exit $ac_status); } && {
14140 test -z "$ac_c_werror_flag" ||
14141 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014142 } && test -s conftest$ac_exeext &&
14143 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014145else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014147sed 's/^/| /' conftest.$ac_ext >&5
14148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151
14152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014154LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014155fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014156{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14157echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14158if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014159 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014160fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014161 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014162{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14163echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014164if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014165 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014166else
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014168LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014170/* confdefs.h. */
14171_ACEOF
14172cat confdefs.h >>conftest.$ac_ext
14173cat >>conftest.$ac_ext <<_ACEOF
14174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176/* Override any GCC internal prototype to avoid an error.
14177 Use char because int might match the return type of a GCC
14178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014179#ifdef __cplusplus
14180extern "C"
14181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014182char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014183int
14184main ()
14185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 ;
14188 return 0;
14189}
14190_ACEOF
14191rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192if { (ac_try="$ac_link"
14193case "(($ac_try" in
14194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14195 *) ac_try_echo=$ac_try;;
14196esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014200 grep -v '^ *+' conftest.er1 >conftest.err
14201 rm -f conftest.er1
14202 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204 (exit $ac_status); } && {
14205 test -z "$ac_c_werror_flag" ||
14206 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014207 } && test -s conftest$ac_exeext &&
14208 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014210else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014212sed 's/^/| /' conftest.$ac_ext >&5
14213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216
14217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014218 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014219LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014220fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014221{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14222echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14223if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014224 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014225fi
14226 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014227
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014228{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14229echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014232if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014234{ echo "$as_me:$LINENO: result: $withval" >&5
14235echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014236LIBS="$withval $LIBS"
14237
14238else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014239 { echo "$as_me:$LINENO: result: no" >&5
14240echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241fi
14242
Guido van Rossum7f43da71994-08-01 12:15:30 +000014243
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014244# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014245{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14246echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014249if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250 withval=$with_system_ffi;
14251fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014252
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014253
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014254{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14255echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014256
Matthias Klose55708cc2009-04-30 08:06:49 +000014257# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014258{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14259echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014260
14261# Check whether --with-dbmliborder was given.
14262if test "${with_dbmliborder+set}" = set; then
14263 withval=$with_dbmliborder;
14264if test x$with_dbmliborder = xyes
14265then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014266{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14267echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014268 { (exit 1); exit 1; }; }
14269else
14270 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14271 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14272 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014273 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14274echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014275 { (exit 1); exit 1; }; }
14276 fi
14277 done
14278fi
14279fi
14280
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014281{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14282echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014283
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014284# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014285
14286
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014287{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14288echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014291if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292 withval=$with_signal_module;
14293fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014294
14295
14296if test -z "$with_signal_module"
14297then with_signal_module="yes"
14298fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014299{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14300echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014301
14302if test "${with_signal_module}" = "yes"; then
14303 USE_SIGNAL_MODULE=""
14304 SIGNAL_OBJS=""
14305else
14306 USE_SIGNAL_MODULE="#"
14307 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14308fi
14309
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014310# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014311
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014312USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014313
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014314{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14315echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014316
Guido van Rossumec2f0731997-01-22 20:54:01 +000014317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014319if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014321{ echo "$as_me:$LINENO: result: $withval" >&5
14322echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014323LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014324if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014325 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014326fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014328 { echo "$as_me:$LINENO: result: no" >&5
14329echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330fi
14331
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
14333# Templates for things AC_DEFINEd more than once.
14334# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014335
14336
Martin v. Löwis11437992002-04-12 09:54:03 +000014337
14338
14339
14340
14341
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014342{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14343echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014345# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014346if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347 withval=$with_threads;
14348fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014349
14350
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014351# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014354if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355 withval=$with_thread; with_threads=$with_thread
14356fi
14357
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014358
14359if test -z "$with_threads"
14360then with_threads="yes"
14361fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014362{ echo "$as_me:$LINENO: result: $with_threads" >&5
14363echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014364
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014365
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014366if test "$with_threads" = "no"
14367then
14368 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014369elif test "$ac_cv_pthread_is_default" = yes
14370then
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014373_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014374
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014375 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014377#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014378_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014379
14380 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014381 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014382elif test "$ac_cv_kpthread" = "yes"
14383then
14384 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014385 if test "$ac_cv_cxx_thread" = "yes"; then
14386 CXX="$CXX -Kpthread"
14387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014389#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014393 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014394elif test "$ac_cv_kthread" = "yes"
14395then
14396 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014397 if test "$ac_cv_cxx_thread" = "yes"; then
14398 CXX="$CXX -Kthread"
14399 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +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öwis4ee6eef2003-05-26 05:37:51 +000014406elif test "$ac_cv_pthread" = "yes"
14407then
14408 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014409 if test "$ac_cv_cxx_thread" = "yes"; then
14410 CXX="$CXX -pthread"
14411 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014412 cat >>confdefs.h <<\_ACEOF
14413#define WITH_THREAD 1
14414_ACEOF
14415
14416 posix_threads=yes
14417 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014418else
14419 if test ! -z "$with_threads" -a -d "$with_threads"
14420 then LDFLAGS="$LDFLAGS -L$with_threads"
14421 fi
14422 if test ! -z "$withval" -a -d "$withval"
14423 then LDFLAGS="$LDFLAGS -L$withval"
14424 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014425
14426 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014427 # define _POSIX_THREADS in unistd.h. Some apparently don't
14428 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014429 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14430echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014432/* confdefs.h. */
14433_ACEOF
14434cat confdefs.h >>conftest.$ac_ext
14435cat >>conftest.$ac_ext <<_ACEOF
14436/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014437
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014438#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014439#ifdef _POSIX_THREADS
14440yes
14441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
14443_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014445 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014446 unistd_defines_pthreads=yes
14447else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014448 unistd_defines_pthreads=no
14449fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000014450rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014451
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014452 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14453echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014456#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014457_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014458
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014460 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14461echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014462if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014463 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014464fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014465{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14466echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014467else
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014469{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14470echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014472/* confdefs.h. */
14473_ACEOF
14474cat confdefs.h >>conftest.$ac_ext
14475cat >>conftest.$ac_ext <<_ACEOF
14476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014477$ac_includes_default
14478#include <cthreads.h>
14479_ACEOF
14480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481if { (ac_try="$ac_compile"
14482case "(($ac_try" in
14483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14484 *) ac_try_echo=$ac_try;;
14485esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014489 grep -v '^ *+' conftest.er1 >conftest.err
14490 rm -f conftest.er1
14491 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 (exit $ac_status); } && {
14494 test -z "$ac_c_werror_flag" ||
14495 test ! -s conftest.err
14496 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 ac_header_compiler=yes
14498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014500sed 's/^/| /' conftest.$ac_ext >&5
14501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504
14505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014506{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14507echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
14509# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014510{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14511echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014512cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014513/* confdefs.h. */
14514_ACEOF
14515cat confdefs.h >>conftest.$ac_ext
14516cat >>conftest.$ac_ext <<_ACEOF
14517/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014518#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014519_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520if { (ac_try="$ac_cpp conftest.$ac_ext"
14521case "(($ac_try" in
14522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14523 *) ac_try_echo=$ac_try;;
14524esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014528 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 rm -f conftest.er1
14530 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 (exit $ac_status); } >/dev/null && {
14533 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14534 test ! -s conftest.err
14535 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 ac_header_preproc=yes
14537else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014539sed 's/^/| /' conftest.$ac_ext >&5
14540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543
Martin v. Löwis11437992002-04-12 09:54:03 +000014544rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014545{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14546echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
14548# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014549case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14550 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014551 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14552echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14553 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14554echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014556 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014557 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014558 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14559echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14560 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14561echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14562 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14563echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14564 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14565echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14566 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14567echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14568 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14569echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014571## -------------------------------------- ##
14572## Report this to http://bugs.python.org/ ##
14573## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014574_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014576 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014577esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014578{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14579echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014580if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014582else
14583 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014584fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014585{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14586echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
14588fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014589if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014591#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014592_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014595#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014596_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598
14599cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014600#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014601_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014602
14603 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014604 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014605else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014608 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14609echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014610if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014611 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014612fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014613{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14614echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014615else
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014617{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14618echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014620/* confdefs.h. */
14621_ACEOF
14622cat confdefs.h >>conftest.$ac_ext
14623cat >>conftest.$ac_ext <<_ACEOF
14624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014625$ac_includes_default
14626#include <mach/cthreads.h>
14627_ACEOF
14628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629if { (ac_try="$ac_compile"
14630case "(($ac_try" in
14631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14632 *) ac_try_echo=$ac_try;;
14633esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014637 grep -v '^ *+' conftest.er1 >conftest.err
14638 rm -f conftest.er1
14639 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 (exit $ac_status); } && {
14642 test -z "$ac_c_werror_flag" ||
14643 test ! -s conftest.err
14644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014645 ac_header_compiler=yes
14646else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014648sed 's/^/| /' conftest.$ac_ext >&5
14649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014652
14653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14655echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014656
14657# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014658{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14659echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014661/* confdefs.h. */
14662_ACEOF
14663cat confdefs.h >>conftest.$ac_ext
14664cat >>conftest.$ac_ext <<_ACEOF
14665/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014666#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014667_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668if { (ac_try="$ac_cpp conftest.$ac_ext"
14669case "(($ac_try" in
14670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14671 *) ac_try_echo=$ac_try;;
14672esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014676 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 rm -f conftest.er1
14678 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 (exit $ac_status); } >/dev/null && {
14681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14682 test ! -s conftest.err
14683 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 ac_header_preproc=yes
14685else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014687sed 's/^/| /' conftest.$ac_ext >&5
14688
Martin v. Löwis11437992002-04-12 09:54:03 +000014689 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691
Martin v. Löwis11437992002-04-12 09:54:03 +000014692rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14694echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
14696# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14698 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014699 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14700echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14701 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14702echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014703 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014704 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014705 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14707echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14709echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14711echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14713echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14715echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14716 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14717echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014719## -------------------------------------- ##
14720## Report this to http://bugs.python.org/ ##
14721## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014722_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014724 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014725esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014726{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14727echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014728if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014730else
14731 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014732fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014733{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14734echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014735
14736fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014737if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014739#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014740_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014741
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014743#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014744_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014745
Martin v. Löwis11437992002-04-12 09:54:03 +000014746
14747cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014748#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014749_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014750
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014751 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014752else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014753
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014754 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14755echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014758if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014759 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14760echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014761 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014762#define WITH_THREAD 1
14763_ACEOF
14764
14765
14766cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014767#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014768_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014769
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014770 LIBS="-lpth $LIBS"
14771 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014772else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014773 { echo "$as_me:$LINENO: result: no" >&5
14774echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014775
14776 # Just looking for pthread_create in libpthread is not enough:
14777 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14778 # So we really have to include pthread.h, and then link.
14779 _libs=$LIBS
14780 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014781 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14782echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014784/* confdefs.h. */
14785_ACEOF
14786cat confdefs.h >>conftest.$ac_ext
14787cat >>conftest.$ac_ext <<_ACEOF
14788/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014789#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014790
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014791void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014792int
14793main ()
14794{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014795
14796pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 ;
14798 return 0;
14799}
14800_ACEOF
14801rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802if { (ac_try="$ac_link"
14803case "(($ac_try" in
14804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14805 *) ac_try_echo=$ac_try;;
14806esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014810 grep -v '^ *+' conftest.er1 >conftest.err
14811 rm -f conftest.er1
14812 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014814 (exit $ac_status); } && {
14815 test -z "$ac_c_werror_flag" ||
14816 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014817 } && test -s conftest$ac_exeext &&
14818 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014820 { echo "$as_me:$LINENO: result: yes" >&5
14821echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014823#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014824_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014825
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014826 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014827 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014830sed 's/^/| /' conftest.$ac_ext >&5
14831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014833 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014834 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14835echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014836if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014838else
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014840/* confdefs.h. */
14841_ACEOF
14842cat confdefs.h >>conftest.$ac_ext
14843cat >>conftest.$ac_ext <<_ACEOF
14844/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014845/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14846 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14847#define pthread_detach innocuous_pthread_detach
14848
Guido van Rossumad678af1998-10-02 14:42:15 +000014849/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014850 which can conflict with char pthread_detach (); below.
14851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014852 <limits.h> exists even on freestanding compilers. */
14853
14854#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014855# include <limits.h>
14856#else
14857# include <assert.h>
14858#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014859
14860#undef pthread_detach
14861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862/* Override any GCC internal prototype to avoid an error.
14863 Use char because int might match the return type of a GCC
14864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014865#ifdef __cplusplus
14866extern "C"
14867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014868char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014869/* The GNU C library defines this for functions which it implements
14870 to always fail with ENOSYS. Some functions are actually named
14871 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014873choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014874#endif
14875
Skip Montanaro6dead952003-09-25 14:50:04 +000014876int
14877main ()
14878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 ;
14881 return 0;
14882}
14883_ACEOF
14884rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885if { (ac_try="$ac_link"
14886case "(($ac_try" in
14887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14888 *) ac_try_echo=$ac_try;;
14889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014893 grep -v '^ *+' conftest.er1 >conftest.err
14894 rm -f conftest.er1
14895 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 (exit $ac_status); } && {
14898 test -z "$ac_c_werror_flag" ||
14899 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014900 } && test -s conftest$ac_exeext &&
14901 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014903else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014905sed 's/^/| /' conftest.$ac_ext >&5
14906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909
14910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014911 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014912fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014913{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14914echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14915if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014917#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014918_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014919
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014920 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014921 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014922else
Guido van Rossumad678af1998-10-02 14:42:15 +000014923
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014925 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14926echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014927if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014930{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14931echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932else
14933 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014934{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14935echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* confdefs.h. */
14938_ACEOF
14939cat confdefs.h >>conftest.$ac_ext
14940cat >>conftest.$ac_ext <<_ACEOF
14941/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014942$ac_includes_default
14943#include <atheos/threads.h>
14944_ACEOF
14945rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946if { (ac_try="$ac_compile"
14947case "(($ac_try" in
14948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14949 *) ac_try_echo=$ac_try;;
14950esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014954 grep -v '^ *+' conftest.er1 >conftest.err
14955 rm -f conftest.er1
14956 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958 (exit $ac_status); } && {
14959 test -z "$ac_c_werror_flag" ||
14960 test ! -s conftest.err
14961 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014962 ac_header_compiler=yes
14963else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014965sed 's/^/| /' conftest.$ac_ext >&5
14966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969
14970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014971{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14972echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014973
14974# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014975{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14976echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014978/* confdefs.h. */
14979_ACEOF
14980cat confdefs.h >>conftest.$ac_ext
14981cat >>conftest.$ac_ext <<_ACEOF
14982/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014983#include <atheos/threads.h>
14984_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985if { (ac_try="$ac_cpp conftest.$ac_ext"
14986case "(($ac_try" in
14987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14988 *) ac_try_echo=$ac_try;;
14989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014992 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014993 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014994 rm -f conftest.er1
14995 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 (exit $ac_status); } >/dev/null && {
14998 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14999 test ! -s conftest.err
15000 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015001 ac_header_preproc=yes
15002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015004sed 's/^/| /' conftest.$ac_ext >&5
15005
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015006 ac_header_preproc=no
15007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015009rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015010{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15011echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012
15013# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15015 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015016 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15017echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15018 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15019echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015021 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015023 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15024echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15025 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15026echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15027 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15028echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15029 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15030echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15031 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15032echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15033 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15034echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015036## -------------------------------------- ##
15037## Report this to http://bugs.python.org/ ##
15038## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015039_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015041 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015042esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015043{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15044echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015045if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015047else
15048 ac_cv_header_atheos_threads_h=$ac_header_preproc
15049fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015050{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15051echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015052
15053fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015054if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015055 cat >>confdefs.h <<\_ACEOF
15056#define WITH_THREAD 1
15057_ACEOF
15058
15059
15060cat >>confdefs.h <<\_ACEOF
15061#define ATHEOS_THREADS 1
15062_ACEOF
15063
15064 THREADOBJ="Python/thread.o"
15065else
15066
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015067 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15068echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015069if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015070 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015071else
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015073LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015075/* confdefs.h. */
15076_ACEOF
15077cat confdefs.h >>conftest.$ac_ext
15078cat >>conftest.$ac_ext <<_ACEOF
15079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081/* Override any GCC internal prototype to avoid an error.
15082 Use char because int might match the return type of a GCC
15083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015084#ifdef __cplusplus
15085extern "C"
15086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015087char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015088int
15089main ()
15090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ;
15093 return 0;
15094}
15095_ACEOF
15096rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097if { (ac_try="$ac_link"
15098case "(($ac_try" in
15099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15100 *) ac_try_echo=$ac_try;;
15101esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015105 grep -v '^ *+' conftest.er1 >conftest.err
15106 rm -f conftest.er1
15107 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109 (exit $ac_status); } && {
15110 test -z "$ac_c_werror_flag" ||
15111 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015112 } && test -s conftest$ac_exeext &&
15113 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015115else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015117sed 's/^/| /' conftest.$ac_ext >&5
15118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121
15122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015124LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015125fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015126{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15127echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15128if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015130#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015131_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015132
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015133 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015134 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015135 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015136else
Greg Steinadf63d62000-07-05 10:38:09 +000015137
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015138 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15139echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015140if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015141 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015142else
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015144LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015146/* confdefs.h. */
15147_ACEOF
15148cat confdefs.h >>conftest.$ac_ext
15149cat >>conftest.$ac_ext <<_ACEOF
15150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152/* Override any GCC internal prototype to avoid an error.
15153 Use char because int might match the return type of a GCC
15154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015155#ifdef __cplusplus
15156extern "C"
15157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015158char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015159int
15160main ()
15161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 ;
15164 return 0;
15165}
15166_ACEOF
15167rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168if { (ac_try="$ac_link"
15169case "(($ac_try" in
15170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15171 *) ac_try_echo=$ac_try;;
15172esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015176 grep -v '^ *+' conftest.er1 >conftest.err
15177 rm -f conftest.er1
15178 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180 (exit $ac_status); } && {
15181 test -z "$ac_c_werror_flag" ||
15182 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015183 } && test -s conftest$ac_exeext &&
15184 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015186else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015188sed 's/^/| /' conftest.$ac_ext >&5
15189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192
15193rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015195LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015196fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015197{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15198echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15199if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015201#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015202_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015203
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015204 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015205 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015206 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015207else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015208
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015209 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15210echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015211if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015213else
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015215LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015217/* confdefs.h. */
15218_ACEOF
15219cat confdefs.h >>conftest.$ac_ext
15220cat >>conftest.$ac_ext <<_ACEOF
15221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223/* Override any GCC internal prototype to avoid an error.
15224 Use char because int might match the return type of a GCC
15225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015226#ifdef __cplusplus
15227extern "C"
15228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015229char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 ;
15235 return 0;
15236}
15237_ACEOF
15238rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239if { (ac_try="$ac_link"
15240case "(($ac_try" in
15241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15242 *) ac_try_echo=$ac_try;;
15243esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015247 grep -v '^ *+' conftest.er1 >conftest.err
15248 rm -f conftest.er1
15249 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251 (exit $ac_status); } && {
15252 test -z "$ac_c_werror_flag" ||
15253 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015254 } && test -s conftest$ac_exeext &&
15255 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015259sed 's/^/| /' conftest.$ac_ext >&5
15260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263
15264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015266LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015267fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015268{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15269echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15270if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015272#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015273_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015275 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015276 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015277 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015278else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015279
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015280 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15281echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015282if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015284else
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015286LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* confdefs.h. */
15289_ACEOF
15290cat confdefs.h >>conftest.$ac_ext
15291cat >>conftest.$ac_ext <<_ACEOF
15292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294/* Override any GCC internal prototype to avoid an error.
15295 Use char because int might match the return type of a GCC
15296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015297#ifdef __cplusplus
15298extern "C"
15299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015300char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015301int
15302main ()
15303{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 ;
15306 return 0;
15307}
15308_ACEOF
15309rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310if { (ac_try="$ac_link"
15311case "(($ac_try" in
15312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15313 *) ac_try_echo=$ac_try;;
15314esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015318 grep -v '^ *+' conftest.er1 >conftest.err
15319 rm -f conftest.er1
15320 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322 (exit $ac_status); } && {
15323 test -z "$ac_c_werror_flag" ||
15324 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015325 } && test -s conftest$ac_exeext &&
15326 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015328else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015330sed 's/^/| /' conftest.$ac_ext >&5
15331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334
15335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015337LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015338fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015339{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15340echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15341if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015342 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015343#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015344_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015346 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015347 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015348 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015349else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015350
Martin v. Löwis130fb172001-07-19 11:00:41 +000015351 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015352fi
15353
Guido van Rossum627b2d71993-12-24 10:39:16 +000015354
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015355fi
15356
Guido van Rossum0be3e491997-05-22 20:33:33 +000015357fi
15358
Guido van Rossum49545951997-12-02 19:28:29 +000015359fi
15360
Guido van Rossumb93a8621998-05-07 13:27:32 +000015361fi
15362
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015363
Michael W. Hudson54241132001-12-07 15:38:26 +000015364fi
15365
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367
15368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015369 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370fi
15371
Martin v. Löwis11437992002-04-12 09:54:03 +000015372fi
15373
15374
15375fi
15376
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015377
Michael W. Hudson54241132001-12-07 15:38:26 +000015378
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015379 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15380echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015381if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015382 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015383else
Martin v. Löwis11437992002-04-12 09:54:03 +000015384 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015385LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015386cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015387/* confdefs.h. */
15388_ACEOF
15389cat confdefs.h >>conftest.$ac_ext
15390cat >>conftest.$ac_ext <<_ACEOF
15391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393/* Override any GCC internal prototype to avoid an error.
15394 Use char because int might match the return type of a GCC
15395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015396#ifdef __cplusplus
15397extern "C"
15398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015399char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015400int
15401main ()
15402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ;
15405 return 0;
15406}
15407_ACEOF
15408rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409if { (ac_try="$ac_link"
15410case "(($ac_try" in
15411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15412 *) ac_try_echo=$ac_try;;
15413esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015417 grep -v '^ *+' conftest.er1 >conftest.err
15418 rm -f conftest.er1
15419 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421 (exit $ac_status); } && {
15422 test -z "$ac_c_werror_flag" ||
15423 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015424 } && test -s conftest$ac_exeext &&
15425 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015427else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015429sed 's/^/| /' conftest.$ac_ext >&5
15430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433
15434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015436LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015437fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015438{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15439echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15440if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015442#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015443_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015444
Martin v. Löwis130fb172001-07-19 11:00:41 +000015445 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015446 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015447 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015448fi
15449
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015450
Neal Norwitza978ab02002-11-02 16:58:05 +000015451 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015452 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15453echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015454if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015456else
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015458LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015460/* confdefs.h. */
15461_ACEOF
15462cat confdefs.h >>conftest.$ac_ext
15463cat >>conftest.$ac_ext <<_ACEOF
15464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466/* Override any GCC internal prototype to avoid an error.
15467 Use char because int might match the return type of a GCC
15468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015469#ifdef __cplusplus
15470extern "C"
15471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015472char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015473int
15474main ()
15475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ;
15478 return 0;
15479}
15480_ACEOF
15481rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482if { (ac_try="$ac_link"
15483case "(($ac_try" in
15484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15485 *) ac_try_echo=$ac_try;;
15486esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015490 grep -v '^ *+' conftest.er1 >conftest.err
15491 rm -f conftest.er1
15492 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015494 (exit $ac_status); } && {
15495 test -z "$ac_c_werror_flag" ||
15496 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015497 } && test -s conftest$ac_exeext &&
15498 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015502sed 's/^/| /' conftest.$ac_ext >&5
15503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506
15507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015510fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015511{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15512echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15513if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015515#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015517
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015518 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015519 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015520 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015521fi
15522
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015523 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015524
Martin v. Löwis130fb172001-07-19 11:00:41 +000015525 if test "$USE_THREAD_MODULE" != "#"
15526 then
15527 # If the above checks didn't disable threads, (at least) OSF1
15528 # needs this '-threads' argument during linking.
15529 case $ac_sys_system in
15530 OSF1) LDLAST=-threads;;
15531 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015532 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015533fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015535if test "$posix_threads" = "yes"; then
15536 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015537
15538cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015539#define _POSIX_THREADS 1
15540_ACEOF
15541
15542 fi
15543
15544 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15545 case $ac_sys_system/$ac_sys_release in
15546 SunOS/5.6)
15547cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015548#define HAVE_PTHREAD_DESTRUCTOR 1
15549_ACEOF
15550
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015551 ;;
15552 SunOS/5.8)
15553cat >>confdefs.h <<\_ACEOF
15554#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15555_ACEOF
15556
15557 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015558 AIX/5)
15559cat >>confdefs.h <<\_ACEOF
15560#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15561_ACEOF
15562
15563 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015564 esac
15565
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015566 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15567echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015568 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015570else
15571 if test "$cross_compiling" = yes; then
15572 ac_cv_pthread_system_supported=no
15573else
15574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015575/* confdefs.h. */
15576_ACEOF
15577cat confdefs.h >>conftest.$ac_ext
15578cat >>conftest.$ac_ext <<_ACEOF
15579/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015580#include <pthread.h>
15581 void *foo(void *parm) {
15582 return NULL;
15583 }
15584 main() {
15585 pthread_attr_t attr;
15586 pthread_t id;
15587 if (pthread_attr_init(&attr)) exit(-1);
15588 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15589 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15590 exit(0);
15591 }
15592_ACEOF
15593rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594if { (ac_try="$ac_link"
15595case "(($ac_try" in
15596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15597 *) ac_try_echo=$ac_try;;
15598esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015601 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015603 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604 { (case "(($ac_try" in
15605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15606 *) ac_try_echo=$ac_try;;
15607esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015610 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015612 (exit $ac_status); }; }; then
15613 ac_cv_pthread_system_supported=yes
15614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015615 echo "$as_me: program exited with status $ac_status" >&5
15616echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015617sed 's/^/| /' conftest.$ac_ext >&5
15618
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015619( exit $ac_status )
15620ac_cv_pthread_system_supported=no
15621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622rm -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 +000015623fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625
15626
Guido van Rossum627b2d71993-12-24 10:39:16 +000015627fi
15628
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015629 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15630echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015631 if test "$ac_cv_pthread_system_supported" = "yes"; then
15632
15633cat >>confdefs.h <<\_ACEOF
15634#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15635_ACEOF
15636
15637 fi
15638
15639for ac_func in pthread_sigmask
15640do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15642{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015645 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015646else
15647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015648/* confdefs.h. */
15649_ACEOF
15650cat confdefs.h >>conftest.$ac_ext
15651cat >>conftest.$ac_ext <<_ACEOF
15652/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015653/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15655#define $ac_func innocuous_$ac_func
15656
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015657/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015658 which can conflict with char $ac_func (); below.
15659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015660 <limits.h> exists even on freestanding compilers. */
15661
15662#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015663# include <limits.h>
15664#else
15665# include <assert.h>
15666#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015667
15668#undef $ac_func
15669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670/* Override any GCC internal prototype to avoid an error.
15671 Use char because int might match the return type of a GCC
15672 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015673#ifdef __cplusplus
15674extern "C"
15675#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015676char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677/* The GNU C library defines this for functions which it implements
15678 to always fail with ENOSYS. Some functions are actually named
15679 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015682#endif
15683
Skip Montanaro6dead952003-09-25 14:50:04 +000015684int
15685main ()
15686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015687return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015688 ;
15689 return 0;
15690}
15691_ACEOF
15692rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693if { (ac_try="$ac_link"
15694case "(($ac_try" in
15695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15696 *) ac_try_echo=$ac_try;;
15697esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015701 grep -v '^ *+' conftest.er1 >conftest.err
15702 rm -f conftest.er1
15703 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705 (exit $ac_status); } && {
15706 test -z "$ac_c_werror_flag" ||
15707 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015708 } && test -s conftest$ac_exeext &&
15709 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015710 eval "$as_ac_var=yes"
15711else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015713sed 's/^/| /' conftest.$ac_ext >&5
15714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717
15718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015721ac_res=`eval echo '${'$as_ac_var'}'`
15722 { echo "$as_me:$LINENO: result: $ac_res" >&5
15723echo "${ECHO_T}$ac_res" >&6; }
15724if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015725 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015726#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015727_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015728 case $ac_sys_system in
15729 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015730
Jason Tishlerfac083d2003-07-22 15:20:49 +000015731cat >>confdefs.h <<\_ACEOF
15732#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15733_ACEOF
15734
15735 ;;
15736 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015737fi
15738done
15739
15740fi
15741
15742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015743# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015744
15745
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015746{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15747echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015749if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015751 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015752 { echo "$as_me:$LINENO: result: no" >&5
15753echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015754 ipv6=no
15755 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015756 *) { echo "$as_me:$LINENO: result: yes" >&5
15757echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015759#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015760_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015761
15762 ipv6=yes
15763 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015765else
Martin v. Löwis11437992002-04-12 09:54:03 +000015766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015767 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015768 { echo "$as_me:$LINENO: result: no" >&5
15769echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015770 ipv6=no
15771
15772else
Martin v. Löwis11437992002-04-12 09:54:03 +000015773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015774/* confdefs.h. */
15775_ACEOF
15776cat confdefs.h >>conftest.$ac_ext
15777cat >>conftest.$ac_ext <<_ACEOF
15778/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015779 /* AF_INET6 available check */
15780#include <sys/types.h>
15781#include <sys/socket.h>
15782main()
15783{
15784 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15785 exit(1);
15786 else
15787 exit(0);
15788}
15789
Martin v. Löwis11437992002-04-12 09:54:03 +000015790_ACEOF
15791rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792if { (ac_try="$ac_link"
15793case "(($ac_try" in
15794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15795 *) ac_try_echo=$ac_try;;
15796esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015798 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802 { (case "(($ac_try" in
15803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15804 *) ac_try_echo=$ac_try;;
15805esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015811 { echo "$as_me:$LINENO: result: yes" >&5
15812echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015813 ipv6=yes
15814else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015815 echo "$as_me: program exited with status $ac_status" >&5
15816echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015817sed 's/^/| /' conftest.$ac_ext >&5
15818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015820{ echo "$as_me:$LINENO: result: no" >&5
15821echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015822 ipv6=no
15823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824rm -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 +000015825fi
15826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827
15828
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015829if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015830 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15831echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015833/* confdefs.h. */
15834_ACEOF
15835cat confdefs.h >>conftest.$ac_ext
15836cat >>conftest.$ac_ext <<_ACEOF
15837/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015838#include <sys/types.h>
15839#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015840int
15841main ()
15842{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015843struct sockaddr_in6 x;
15844x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 ;
15846 return 0;
15847}
15848_ACEOF
15849rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850if { (ac_try="$ac_compile"
15851case "(($ac_try" in
15852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15853 *) ac_try_echo=$ac_try;;
15854esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015858 grep -v '^ *+' conftest.er1 >conftest.err
15859 rm -f conftest.er1
15860 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862 (exit $ac_status); } && {
15863 test -z "$ac_c_werror_flag" ||
15864 test ! -s conftest.err
15865 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015866 { echo "$as_me:$LINENO: result: yes" >&5
15867echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015868 ipv6=yes
15869else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015871sed 's/^/| /' conftest.$ac_ext >&5
15872
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015873 { echo "$as_me:$LINENO: result: no" >&5
15874echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015875 ipv6=no
15876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877
15878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015879fi
15880
15881if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015883#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015885
15886fi
15887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888fi
15889
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015890
15891ipv6type=unknown
15892ipv6lib=none
15893ipv6trylibc=no
15894
15895if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015896 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15897echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015898 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15899 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015900 case $i in
15901 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015903/* confdefs.h. */
15904_ACEOF
15905cat confdefs.h >>conftest.$ac_ext
15906cat >>conftest.$ac_ext <<_ACEOF
15907/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015909#include <netinet/in.h>
15910#ifdef IPV6_INRIA_VERSION
15911yes
15912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015915 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015916 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015917fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015918rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919
15920 ;;
15921 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015923/* confdefs.h. */
15924_ACEOF
15925cat confdefs.h >>conftest.$ac_ext
15926cat >>conftest.$ac_ext <<_ACEOF
15927/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015929#include <netinet/in.h>
15930#ifdef __KAME__
15931yes
15932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015933_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015935 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015936 ipv6type=$i;
15937 ipv6lib=inet6
15938 ipv6libdir=/usr/local/v6/lib
15939 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015940fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015941rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015942
15943 ;;
15944 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015946/* confdefs.h. */
15947_ACEOF
15948cat confdefs.h >>conftest.$ac_ext
15949cat >>conftest.$ac_ext <<_ACEOF
15950/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015952#include <features.h>
15953#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15954yes
15955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015956_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015958 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015959 ipv6type=$i;
15960 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015962rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963
15964 ;;
15965 linux-inet6)
15966 if test -d /usr/inet6; then
15967 ipv6type=$i
15968 ipv6lib=inet6
15969 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015970 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015971 fi
15972 ;;
15973 solaris)
15974 if test -f /etc/netconfig; then
15975 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15976 ipv6type=$i
15977 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015978 fi
15979 fi
15980 ;;
15981 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015983/* confdefs.h. */
15984_ACEOF
15985cat confdefs.h >>conftest.$ac_ext
15986cat >>conftest.$ac_ext <<_ACEOF
15987/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015989#include <sys/param.h>
15990#ifdef _TOSHIBA_INET6
15991yes
15992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015993_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015995 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015996 ipv6type=$i;
15997 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015998 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015999fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000016000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016001
16002 ;;
16003 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* confdefs.h. */
16006_ACEOF
16007cat confdefs.h >>conftest.$ac_ext
16008cat >>conftest.$ac_ext <<_ACEOF
16009/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016011#include </usr/local/v6/include/sys/v6config.h>
16012#ifdef __V6D__
16013yes
16014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016015_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016017 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016018 ipv6type=$i;
16019 ipv6lib=v6;
16020 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016021 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000016023rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016024
16025 ;;
16026 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016028/* confdefs.h. */
16029_ACEOF
16030cat confdefs.h >>conftest.$ac_ext
16031cat >>conftest.$ac_ext <<_ACEOF
16032/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016033
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016034#include <sys/param.h>
16035#ifdef _ZETA_MINAMI_INET6
16036yes
16037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016038_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016040 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016041 ipv6type=$i;
16042 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016043 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016044fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000016045rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016046
16047 ;;
16048 esac
16049 if test "$ipv6type" != "unknown"; then
16050 break
16051 fi
16052 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016053 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16054echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016055fi
16056
16057if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16058 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16059 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16060 echo "using lib$ipv6lib"
16061 else
16062 if test $ipv6trylibc = "yes"; then
16063 echo "using libc"
16064 else
16065 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16066 echo "You need to fetch lib$ipv6lib.a from appropriate"
16067 echo 'ipv6 kit and compile beforehand.'
16068 exit 1
16069 fi
16070 fi
16071fi
16072
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016073{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16074echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016075cat >conftest.$ac_ext <<_ACEOF
16076/* confdefs.h. */
16077_ACEOF
16078cat confdefs.h >>conftest.$ac_ext
16079cat >>conftest.$ac_ext <<_ACEOF
16080/* end confdefs.h. */
16081#include <Carbon/Carbon.h>
16082int
16083main ()
16084{
16085FSIORefNum fRef = 0
16086 ;
16087 return 0;
16088}
16089_ACEOF
16090rm -f conftest.$ac_objext
16091if { (ac_try="$ac_compile"
16092case "(($ac_try" in
16093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16094 *) ac_try_echo=$ac_try;;
16095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016097 (eval "$ac_compile") 2>conftest.er1
16098 ac_status=$?
16099 grep -v '^ *+' conftest.er1 >conftest.err
16100 rm -f conftest.er1
16101 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016103 (exit $ac_status); } && {
16104 test -z "$ac_c_werror_flag" ||
16105 test ! -s conftest.err
16106 } && test -s conftest.$ac_objext; then
16107
16108cat >>confdefs.h <<\_ACEOF
16109#define HAVE_OSX105_SDK 1
16110_ACEOF
16111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016112 { echo "$as_me:$LINENO: result: yes" >&5
16113echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016115 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016116sed 's/^/| /' conftest.$ac_ext >&5
16117
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016118 { echo "$as_me:$LINENO: result: no" >&5
16119echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016120
16121fi
16122
16123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16124
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016125# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016126{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16127echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016130if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016131 withval=$with_doc_strings;
16132fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016133
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016134
16135if test -z "$with_doc_strings"
16136then with_doc_strings="yes"
16137fi
16138if test "$with_doc_strings" != "no"
16139then
16140
16141cat >>confdefs.h <<\_ACEOF
16142#define WITH_DOC_STRINGS 1
16143_ACEOF
16144
16145fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016146{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16147echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016148
Neil Schemenauera35c6882001-02-27 04:45:05 +000016149# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016150{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16151echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016154if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016156if test "$withval" != no
16157then
16158
16159cat >>confdefs.h <<\_ACEOF
16160#define WITH_TSC 1
16161_ACEOF
16162
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016163 { echo "$as_me:$LINENO: result: yes" >&5
16164echo "${ECHO_T}yes" >&6; }
16165else { echo "$as_me:$LINENO: result: no" >&5
16166echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016167fi
16168else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016169 { echo "$as_me:$LINENO: result: no" >&5
16170echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171fi
16172
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016173
16174# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016175{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16176echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016179if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 withval=$with_pymalloc;
16181fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016182
Neil Schemenauera35c6882001-02-27 04:45:05 +000016183
Neil Schemenauer16c22972002-03-22 15:34:49 +000016184if test -z "$with_pymalloc"
16185then with_pymalloc="yes"
16186fi
16187if test "$with_pymalloc" != "no"
16188then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
16190cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016191#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016192_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016193
16194fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016195{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16196echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016197
Barry Warsawef82cd72000-06-30 16:21:01 +000016198# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016199{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16200echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016203if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016205if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016206then
16207
16208cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016209#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016210_ACEOF
16211
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016212 { echo "$as_me:$LINENO: result: yes" >&5
16213echo "${ECHO_T}yes" >&6; }
16214else { echo "$as_me:$LINENO: result: no" >&5
16215echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016216fi
16217else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016218 { echo "$as_me:$LINENO: result: no" >&5
16219echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220fi
16221
Barry Warsawef82cd72000-06-30 16:21:01 +000016222
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016223# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016224
Guido van Rossum98935bf2001-09-05 19:13:16 +000016225DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016226
Guido van Rossume97ee181999-12-20 21:27:22 +000016227# the dlopen() function means we might want to use dynload_shlib.o. some
16228# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016229
Thomas Wouters3a584202000-08-05 23:28:51 +000016230for ac_func in dlopen
16231do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016232as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16233{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16234echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016236 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016237else
Martin v. Löwis11437992002-04-12 09:54:03 +000016238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016239/* confdefs.h. */
16240_ACEOF
16241cat confdefs.h >>conftest.$ac_ext
16242cat >>conftest.$ac_ext <<_ACEOF
16243/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016244/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16245 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16246#define $ac_func innocuous_$ac_func
16247
Guido van Rossume97ee181999-12-20 21:27:22 +000016248/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016249 which can conflict with char $ac_func (); below.
16250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016251 <limits.h> exists even on freestanding compilers. */
16252
16253#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016254# include <limits.h>
16255#else
16256# include <assert.h>
16257#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016258
16259#undef $ac_func
16260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261/* Override any GCC internal prototype to avoid an error.
16262 Use char because int might match the return type of a GCC
16263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016264#ifdef __cplusplus
16265extern "C"
16266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016267char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016268/* The GNU C library defines this for functions which it implements
16269 to always fail with ENOSYS. Some functions are actually named
16270 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016272choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016273#endif
16274
Skip Montanaro6dead952003-09-25 14:50:04 +000016275int
16276main ()
16277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ;
16280 return 0;
16281}
16282_ACEOF
16283rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284if { (ac_try="$ac_link"
16285case "(($ac_try" in
16286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16287 *) ac_try_echo=$ac_try;;
16288esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 grep -v '^ *+' conftest.er1 >conftest.err
16293 rm -f conftest.er1
16294 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296 (exit $ac_status); } && {
16297 test -z "$ac_c_werror_flag" ||
16298 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016299 } && test -s conftest$ac_exeext &&
16300 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016304sed 's/^/| /' conftest.$ac_ext >&5
16305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308
16309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016311fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016312ac_res=`eval echo '${'$as_ac_var'}'`
16313 { echo "$as_me:$LINENO: result: $ac_res" >&5
16314echo "${ECHO_T}$ac_res" >&6; }
16315if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016318_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016319
Guido van Rossume97ee181999-12-20 21:27:22 +000016320fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016321done
Guido van Rossume97ee181999-12-20 21:27:22 +000016322
Michael W. Hudson54241132001-12-07 15:38:26 +000016323
Guido van Rossume97ee181999-12-20 21:27:22 +000016324# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16325# loading of modules.
16326
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016327{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16328echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016329if test -z "$DYNLOADFILE"
16330then
16331 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016332 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16333 if test "$ac_cv_func_dlopen" = yes
16334 then DYNLOADFILE="dynload_shlib.o"
16335 else DYNLOADFILE="dynload_aix.o"
16336 fi
16337 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016338 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016339 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16340 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016341 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016342 *)
16343 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16344 # out any dynamic loading
16345 if test "$ac_cv_func_dlopen" = yes
16346 then DYNLOADFILE="dynload_shlib.o"
16347 else DYNLOADFILE="dynload_stub.o"
16348 fi
16349 ;;
16350 esac
16351fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016352{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16353echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016354if test "$DYNLOADFILE" != "dynload_stub.o"
16355then
Martin v. Löwis11437992002-04-12 09:54:03 +000016356
16357cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016358#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016359_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016360
16361fi
16362
Neil Schemenauer4e425612001-06-19 15:44:15 +000016363# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16364
Michael W. Hudson54241132001-12-07 15:38:26 +000016365
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016366{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16367echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016368if test -z "$MACHDEP_OBJS"
16369then
Jack Jansene578a632001-08-15 01:27:14 +000016370 MACHDEP_OBJS=$extra_machdep_objs
16371else
16372 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016373fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016374{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16375echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016376
Guido van Rossum627b2d71993-12-24 10:39:16 +000016377# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016378
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
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
Martin v. Löwisd6320502004-08-12 13:45:08 +000016449
Martin v. Löwisc3001752005-01-23 09:27:24 +000016450
16451
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016452
16453
Thomas Wouterscf297e42007-02-23 15:07:44 +000016454
16455
Gregory P. Smith25523d22007-09-03 16:44:55 +000016456
Christian Heimes4e30a842007-11-30 22:12:06 +000016457
Martin v. Löwis92fab752008-03-08 10:40:41 +000016458
Martin v. Löwis823725e2008-03-24 13:39:54 +000016459
16460
Benjamin Peterson965ce872009-04-05 21:24:58 +000016461
16462
16463
16464
Martin v. Löwis011e8422009-05-05 04:43:17 +000016465
Martin v. Löwis113a0852009-05-29 17:25:39 +000016466
Martin v. Löwis823725e2008-03-24 13:39:54 +000016467for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16468 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016469 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016470 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016471 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016472 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016473 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016474 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16475 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016476 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016477 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016478 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016479 truncate uname unsetenv utimes waitpid wait3 wait4 \
16480 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016481do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016482as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16483{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16484echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016487else
Martin v. Löwis11437992002-04-12 09:54:03 +000016488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016489/* confdefs.h. */
16490_ACEOF
16491cat confdefs.h >>conftest.$ac_ext
16492cat >>conftest.$ac_ext <<_ACEOF
16493/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016494/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16495 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16496#define $ac_func innocuous_$ac_func
16497
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016498/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016499 which can conflict with char $ac_func (); below.
16500 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016501 <limits.h> exists even on freestanding compilers. */
16502
16503#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016504# include <limits.h>
16505#else
16506# include <assert.h>
16507#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016508
16509#undef $ac_func
16510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511/* Override any GCC internal prototype to avoid an error.
16512 Use char because int might match the return type of a GCC
16513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016514#ifdef __cplusplus
16515extern "C"
16516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016517char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016518/* The GNU C library defines this for functions which it implements
16519 to always fail with ENOSYS. Some functions are actually named
16520 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016522choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016523#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016524
Skip Montanaro6dead952003-09-25 14:50:04 +000016525int
16526main ()
16527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ;
16530 return 0;
16531}
16532_ACEOF
16533rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534if { (ac_try="$ac_link"
16535case "(($ac_try" in
16536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16537 *) ac_try_echo=$ac_try;;
16538esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016542 grep -v '^ *+' conftest.er1 >conftest.err
16543 rm -f conftest.er1
16544 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 (exit $ac_status); } && {
16547 test -z "$ac_c_werror_flag" ||
16548 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016549 } && test -s conftest$ac_exeext &&
16550 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016552else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016554sed 's/^/| /' conftest.$ac_ext >&5
16555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558
16559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016560 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016561fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016562ac_res=`eval echo '${'$as_ac_var'}'`
16563 { echo "$as_me:$LINENO: result: $ac_res" >&5
16564echo "${ECHO_T}$ac_res" >&6; }
16565if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016567#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016568_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016569
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016570fi
16571done
16572
Michael W. Hudson54241132001-12-07 15:38:26 +000016573
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016574# For some functions, having a definition is not sufficient, since
16575# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016576{ echo "$as_me:$LINENO: checking for chroot" >&5
16577echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016579/* confdefs.h. */
16580_ACEOF
16581cat confdefs.h >>conftest.$ac_ext
16582cat >>conftest.$ac_ext <<_ACEOF
16583/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016584#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016585int
16586main ()
16587{
16588void *x=chroot
16589 ;
16590 return 0;
16591}
16592_ACEOF
16593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594if { (ac_try="$ac_compile"
16595case "(($ac_try" in
16596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16597 *) ac_try_echo=$ac_try;;
16598esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016602 grep -v '^ *+' conftest.er1 >conftest.err
16603 rm -f conftest.er1
16604 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606 (exit $ac_status); } && {
16607 test -z "$ac_c_werror_flag" ||
16608 test ! -s conftest.err
16609 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016610
16611cat >>confdefs.h <<\_ACEOF
16612#define HAVE_CHROOT 1
16613_ACEOF
16614
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016615 { echo "$as_me:$LINENO: result: yes" >&5
16616echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016617else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016619sed 's/^/| /' conftest.$ac_ext >&5
16620
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016621 { echo "$as_me:$LINENO: result: no" >&5
16622echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016623
16624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625
16626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016627{ echo "$as_me:$LINENO: checking for link" >&5
16628echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016630/* confdefs.h. */
16631_ACEOF
16632cat confdefs.h >>conftest.$ac_ext
16633cat >>conftest.$ac_ext <<_ACEOF
16634/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016635#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016636int
16637main ()
16638{
16639void *x=link
16640 ;
16641 return 0;
16642}
16643_ACEOF
16644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645if { (ac_try="$ac_compile"
16646case "(($ac_try" in
16647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16648 *) ac_try_echo=$ac_try;;
16649esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016653 grep -v '^ *+' conftest.er1 >conftest.err
16654 rm -f conftest.er1
16655 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657 (exit $ac_status); } && {
16658 test -z "$ac_c_werror_flag" ||
16659 test ! -s conftest.err
16660 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016661
16662cat >>confdefs.h <<\_ACEOF
16663#define HAVE_LINK 1
16664_ACEOF
16665
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016666 { echo "$as_me:$LINENO: result: yes" >&5
16667echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016668else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016670sed 's/^/| /' conftest.$ac_ext >&5
16671
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016672 { echo "$as_me:$LINENO: result: no" >&5
16673echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016674
16675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676
16677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016678{ echo "$as_me:$LINENO: checking for symlink" >&5
16679echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016681/* confdefs.h. */
16682_ACEOF
16683cat confdefs.h >>conftest.$ac_ext
16684cat >>conftest.$ac_ext <<_ACEOF
16685/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016686#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016687int
16688main ()
16689{
16690void *x=symlink
16691 ;
16692 return 0;
16693}
16694_ACEOF
16695rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696if { (ac_try="$ac_compile"
16697case "(($ac_try" in
16698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16699 *) ac_try_echo=$ac_try;;
16700esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016704 grep -v '^ *+' conftest.er1 >conftest.err
16705 rm -f conftest.er1
16706 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708 (exit $ac_status); } && {
16709 test -z "$ac_c_werror_flag" ||
16710 test ! -s conftest.err
16711 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016712
16713cat >>confdefs.h <<\_ACEOF
16714#define HAVE_SYMLINK 1
16715_ACEOF
16716
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016717 { echo "$as_me:$LINENO: result: yes" >&5
16718echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016719else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016721sed 's/^/| /' conftest.$ac_ext >&5
16722
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016723 { echo "$as_me:$LINENO: result: no" >&5
16724echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016725
16726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727
16728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016729{ echo "$as_me:$LINENO: checking for fchdir" >&5
16730echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016732/* confdefs.h. */
16733_ACEOF
16734cat confdefs.h >>conftest.$ac_ext
16735cat >>conftest.$ac_ext <<_ACEOF
16736/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016737#include <unistd.h>
16738int
16739main ()
16740{
16741void *x=fchdir
16742 ;
16743 return 0;
16744}
16745_ACEOF
16746rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747if { (ac_try="$ac_compile"
16748case "(($ac_try" in
16749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16750 *) ac_try_echo=$ac_try;;
16751esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016755 grep -v '^ *+' conftest.er1 >conftest.err
16756 rm -f conftest.er1
16757 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759 (exit $ac_status); } && {
16760 test -z "$ac_c_werror_flag" ||
16761 test ! -s conftest.err
16762 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016763
16764cat >>confdefs.h <<\_ACEOF
16765#define HAVE_FCHDIR 1
16766_ACEOF
16767
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016768 { echo "$as_me:$LINENO: result: yes" >&5
16769echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016770else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016772sed 's/^/| /' conftest.$ac_ext >&5
16773
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016774 { echo "$as_me:$LINENO: result: no" >&5
16775echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016776
16777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778
16779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016780{ echo "$as_me:$LINENO: checking for fsync" >&5
16781echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016783/* confdefs.h. */
16784_ACEOF
16785cat confdefs.h >>conftest.$ac_ext
16786cat >>conftest.$ac_ext <<_ACEOF
16787/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016788#include <unistd.h>
16789int
16790main ()
16791{
16792void *x=fsync
16793 ;
16794 return 0;
16795}
16796_ACEOF
16797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798if { (ac_try="$ac_compile"
16799case "(($ac_try" in
16800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16801 *) ac_try_echo=$ac_try;;
16802esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016806 grep -v '^ *+' conftest.er1 >conftest.err
16807 rm -f conftest.er1
16808 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810 (exit $ac_status); } && {
16811 test -z "$ac_c_werror_flag" ||
16812 test ! -s conftest.err
16813 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016814
16815cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016816#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016817_ACEOF
16818
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016819 { echo "$as_me:$LINENO: result: yes" >&5
16820echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016821else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016823sed 's/^/| /' conftest.$ac_ext >&5
16824
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016825 { echo "$as_me:$LINENO: result: no" >&5
16826echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016827
16828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829
16830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016831{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16832echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016834/* confdefs.h. */
16835_ACEOF
16836cat confdefs.h >>conftest.$ac_ext
16837cat >>conftest.$ac_ext <<_ACEOF
16838/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016839#include <unistd.h>
16840int
16841main ()
16842{
16843void *x=fdatasync
16844 ;
16845 return 0;
16846}
16847_ACEOF
16848rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849if { (ac_try="$ac_compile"
16850case "(($ac_try" in
16851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16852 *) ac_try_echo=$ac_try;;
16853esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016857 grep -v '^ *+' conftest.er1 >conftest.err
16858 rm -f conftest.er1
16859 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861 (exit $ac_status); } && {
16862 test -z "$ac_c_werror_flag" ||
16863 test ! -s conftest.err
16864 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016865
16866cat >>confdefs.h <<\_ACEOF
16867#define HAVE_FDATASYNC 1
16868_ACEOF
16869
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016870 { echo "$as_me:$LINENO: result: yes" >&5
16871echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016872else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016874sed 's/^/| /' conftest.$ac_ext >&5
16875
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016876 { echo "$as_me:$LINENO: result: no" >&5
16877echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016878
16879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880
16881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016882{ echo "$as_me:$LINENO: checking for epoll" >&5
16883echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016884cat >conftest.$ac_ext <<_ACEOF
16885/* confdefs.h. */
16886_ACEOF
16887cat confdefs.h >>conftest.$ac_ext
16888cat >>conftest.$ac_ext <<_ACEOF
16889/* end confdefs.h. */
16890#include <sys/epoll.h>
16891int
16892main ()
16893{
16894void *x=epoll_create
16895 ;
16896 return 0;
16897}
16898_ACEOF
16899rm -f conftest.$ac_objext
16900if { (ac_try="$ac_compile"
16901case "(($ac_try" in
16902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16903 *) ac_try_echo=$ac_try;;
16904esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016906 (eval "$ac_compile") 2>conftest.er1
16907 ac_status=$?
16908 grep -v '^ *+' conftest.er1 >conftest.err
16909 rm -f conftest.er1
16910 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016912 (exit $ac_status); } && {
16913 test -z "$ac_c_werror_flag" ||
16914 test ! -s conftest.err
16915 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016916
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016917cat >>confdefs.h <<\_ACEOF
16918#define HAVE_EPOLL 1
16919_ACEOF
16920
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016921 { echo "$as_me:$LINENO: result: yes" >&5
16922echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016923else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016924 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016925sed 's/^/| /' conftest.$ac_ext >&5
16926
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016927 { echo "$as_me:$LINENO: result: no" >&5
16928echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016929
16930fi
16931
16932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016933{ echo "$as_me:$LINENO: checking for kqueue" >&5
16934echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016935cat >conftest.$ac_ext <<_ACEOF
16936/* confdefs.h. */
16937_ACEOF
16938cat confdefs.h >>conftest.$ac_ext
16939cat >>conftest.$ac_ext <<_ACEOF
16940/* end confdefs.h. */
16941
16942#include <sys/types.h>
16943#include <sys/event.h>
16944
16945int
16946main ()
16947{
16948int x=kqueue()
16949 ;
16950 return 0;
16951}
16952_ACEOF
16953rm -f conftest.$ac_objext
16954if { (ac_try="$ac_compile"
16955case "(($ac_try" in
16956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16957 *) ac_try_echo=$ac_try;;
16958esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016960 (eval "$ac_compile") 2>conftest.er1
16961 ac_status=$?
16962 grep -v '^ *+' conftest.er1 >conftest.err
16963 rm -f conftest.er1
16964 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016966 (exit $ac_status); } && {
16967 test -z "$ac_c_werror_flag" ||
16968 test ! -s conftest.err
16969 } && test -s conftest.$ac_objext; then
16970
16971cat >>confdefs.h <<\_ACEOF
16972#define HAVE_KQUEUE 1
16973_ACEOF
16974
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016975 { echo "$as_me:$LINENO: result: yes" >&5
16976echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016977else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016978 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016979sed 's/^/| /' conftest.$ac_ext >&5
16980
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016981 { echo "$as_me:$LINENO: result: no" >&5
16982echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016983
16984fi
16985
16986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016987# On some systems (eg. FreeBSD 5), we would find a definition of the
16988# functions ctermid_r, setgroups in the library, but no prototype
16989# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16990# address to avoid compiler warnings and potential miscompilations
16991# because of the missing prototypes.
16992
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016993{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16994echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017001
17002#include "confdefs.h"
17003#include <stdio.h>
17004
Martin v. Löwisd5843682002-11-21 20:41:28 +000017005int
17006main ()
17007{
17008void* p = ctermid_r
17009 ;
17010 return 0;
17011}
17012_ACEOF
17013rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014if { (ac_try="$ac_compile"
17015case "(($ac_try" in
17016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17017 *) ac_try_echo=$ac_try;;
17018esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017022 grep -v '^ *+' conftest.er1 >conftest.err
17023 rm -f conftest.er1
17024 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026 (exit $ac_status); } && {
17027 test -z "$ac_c_werror_flag" ||
17028 test ! -s conftest.err
17029 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017030
17031cat >>confdefs.h <<\_ACEOF
17032#define HAVE_CTERMID_R 1
17033_ACEOF
17034
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017035 { echo "$as_me:$LINENO: result: yes" >&5
17036echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017037else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017039sed 's/^/| /' conftest.$ac_ext >&5
17040
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017041 { echo "$as_me:$LINENO: result: no" >&5
17042echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017043
17044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17047
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017048{ echo "$as_me:$LINENO: checking for flock" >&5
17049echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017051/* confdefs.h. */
17052_ACEOF
17053cat confdefs.h >>conftest.$ac_ext
17054cat >>conftest.$ac_ext <<_ACEOF
17055/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017056
17057#include "confdefs.h"
17058#include <sys/file.h>
17059
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017060int
17061main ()
17062{
17063void* p = flock
17064 ;
17065 return 0;
17066}
17067_ACEOF
17068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069if { (ac_try="$ac_compile"
17070case "(($ac_try" in
17071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17072 *) ac_try_echo=$ac_try;;
17073esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017077 grep -v '^ *+' conftest.er1 >conftest.err
17078 rm -f conftest.er1
17079 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081 (exit $ac_status); } && {
17082 test -z "$ac_c_werror_flag" ||
17083 test ! -s conftest.err
17084 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017085
17086cat >>confdefs.h <<\_ACEOF
17087#define HAVE_FLOCK 1
17088_ACEOF
17089
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017090 { echo "$as_me:$LINENO: result: yes" >&5
17091echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017092else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017094sed 's/^/| /' conftest.$ac_ext >&5
17095
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017096 { echo "$as_me:$LINENO: result: no" >&5
17097echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017098
17099fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17102
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017103{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17104echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017106/* confdefs.h. */
17107_ACEOF
17108cat confdefs.h >>conftest.$ac_ext
17109cat >>conftest.$ac_ext <<_ACEOF
17110/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017111
17112#include "confdefs.h"
17113#include <unistd.h>
17114
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017115int
17116main ()
17117{
17118void* p = getpagesize
17119 ;
17120 return 0;
17121}
17122_ACEOF
17123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124if { (ac_try="$ac_compile"
17125case "(($ac_try" in
17126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17127 *) ac_try_echo=$ac_try;;
17128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017132 grep -v '^ *+' conftest.er1 >conftest.err
17133 rm -f conftest.er1
17134 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 (exit $ac_status); } && {
17137 test -z "$ac_c_werror_flag" ||
17138 test ! -s conftest.err
17139 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017140
17141cat >>confdefs.h <<\_ACEOF
17142#define HAVE_GETPAGESIZE 1
17143_ACEOF
17144
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017145 { echo "$as_me:$LINENO: result: yes" >&5
17146echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017147else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017149sed 's/^/| /' conftest.$ac_ext >&5
17150
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017151 { echo "$as_me:$LINENO: result: no" >&5
17152echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017153
17154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155
17156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017157
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158for ac_prog in true
17159do
17160 # Extract the first word of "$ac_prog", so it can be a program name with args.
17161set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017162{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017164if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017165 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017166else
17167 if test -n "$TRUE"; then
17168 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17169else
17170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17171for as_dir in $PATH
17172do
17173 IFS=$as_save_IFS
17174 test -z "$as_dir" && as_dir=.
17175 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176 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 +000017177 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017179 break 2
17180 fi
17181done
17182done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017184
17185fi
17186fi
17187TRUE=$ac_cv_prog_TRUE
17188if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017189 { echo "$as_me:$LINENO: result: $TRUE" >&5
17190echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017191else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017192 { echo "$as_me:$LINENO: result: no" >&5
17193echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017194fi
17195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017197 test -n "$TRUE" && break
17198done
17199test -n "$TRUE" || TRUE="/bin/true"
17200
17201
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017202{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17203echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017204if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017205 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017206else
17207 ac_check_lib_save_LIBS=$LIBS
17208LIBS="-lc $LIBS"
17209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017210/* confdefs.h. */
17211_ACEOF
17212cat confdefs.h >>conftest.$ac_ext
17213cat >>conftest.$ac_ext <<_ACEOF
17214/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216/* Override any GCC internal prototype to avoid an error.
17217 Use char because int might match the return type of a GCC
17218 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017219#ifdef __cplusplus
17220extern "C"
17221#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017222char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017223int
17224main ()
17225{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017227 ;
17228 return 0;
17229}
17230_ACEOF
17231rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232if { (ac_try="$ac_link"
17233case "(($ac_try" in
17234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17235 *) ac_try_echo=$ac_try;;
17236esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017240 grep -v '^ *+' conftest.er1 >conftest.err
17241 rm -f conftest.er1
17242 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244 (exit $ac_status); } && {
17245 test -z "$ac_c_werror_flag" ||
17246 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017247 } && test -s conftest$ac_exeext &&
17248 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017249 ac_cv_lib_c_inet_aton=yes
17250else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017252sed 's/^/| /' conftest.$ac_ext >&5
17253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256
17257rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017259LIBS=$ac_check_lib_save_LIBS
17260fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017261{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17262echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17263if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017264 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017265else
17266
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017267{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17268echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017269if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017271else
17272 ac_check_lib_save_LIBS=$LIBS
17273LIBS="-lresolv $LIBS"
17274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017275/* confdefs.h. */
17276_ACEOF
17277cat confdefs.h >>conftest.$ac_ext
17278cat >>conftest.$ac_ext <<_ACEOF
17279/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281/* Override any GCC internal prototype to avoid an error.
17282 Use char because int might match the return type of a GCC
17283 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017284#ifdef __cplusplus
17285extern "C"
17286#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017287char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017288int
17289main ()
17290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017292 ;
17293 return 0;
17294}
17295_ACEOF
17296rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297if { (ac_try="$ac_link"
17298case "(($ac_try" in
17299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17300 *) ac_try_echo=$ac_try;;
17301esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017305 grep -v '^ *+' conftest.er1 >conftest.err
17306 rm -f conftest.er1
17307 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309 (exit $ac_status); } && {
17310 test -z "$ac_c_werror_flag" ||
17311 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017312 } && test -s conftest$ac_exeext &&
17313 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017314 ac_cv_lib_resolv_inet_aton=yes
17315else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017317sed 's/^/| /' conftest.$ac_ext >&5
17318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321
17322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017324LIBS=$ac_check_lib_save_LIBS
17325fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017326{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17327echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17328if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017329 cat >>confdefs.h <<_ACEOF
17330#define HAVE_LIBRESOLV 1
17331_ACEOF
17332
17333 LIBS="-lresolv $LIBS"
17334
17335fi
17336
17337
17338fi
17339
17340
Christian Heimesd0764e22007-12-04 15:00:33 +000017341# On Tru64, chflags seems to be present, but calling it will
17342# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017343{ echo "$as_me:$LINENO: checking for chflags" >&5
17344echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017345if test "${ac_cv_have_chflags+set}" = set; then
17346 echo $ECHO_N "(cached) $ECHO_C" >&6
17347else
17348 if test "$cross_compiling" = yes; then
17349 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017350else
17351 cat >conftest.$ac_ext <<_ACEOF
17352/* confdefs.h. */
17353_ACEOF
17354cat confdefs.h >>conftest.$ac_ext
17355cat >>conftest.$ac_ext <<_ACEOF
17356/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017357[
Christian Heimesd0764e22007-12-04 15:00:33 +000017358#include <sys/stat.h>
17359#include <unistd.h>
17360int main(int argc, char*argv[])
17361{
17362 if(chflags(argv[0], 0) != 0)
17363 return 1;
17364 return 0;
17365}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017366]
Christian Heimesd0764e22007-12-04 15:00:33 +000017367_ACEOF
17368rm -f conftest$ac_exeext
17369if { (ac_try="$ac_link"
17370case "(($ac_try" in
17371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17372 *) ac_try_echo=$ac_try;;
17373esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017375 (eval "$ac_link") 2>&5
17376 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017378 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17379 { (case "(($ac_try" in
17380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17381 *) ac_try_echo=$ac_try;;
17382esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017384 (eval "$ac_try") 2>&5
17385 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017387 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017388 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017390 echo "$as_me: program exited with status $ac_status" >&5
17391echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017392sed 's/^/| /' conftest.$ac_ext >&5
17393
17394( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017395ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017396fi
17397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17398fi
17399
17400
17401
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017402fi
17403{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17404echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17405if test "$ac_cv_have_chflags" = cross ; then
17406 { echo "$as_me:$LINENO: checking for chflags" >&5
17407echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17408if test "${ac_cv_func_chflags+set}" = set; then
17409 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017410else
17411 cat >conftest.$ac_ext <<_ACEOF
17412/* confdefs.h. */
17413_ACEOF
17414cat confdefs.h >>conftest.$ac_ext
17415cat >>conftest.$ac_ext <<_ACEOF
17416/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017417/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17418 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17419#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017420
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017421/* System header to define __stub macros and hopefully few prototypes,
17422 which can conflict with char chflags (); below.
17423 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17424 <limits.h> exists even on freestanding compilers. */
17425
17426#ifdef __STDC__
17427# include <limits.h>
17428#else
17429# include <assert.h>
17430#endif
17431
17432#undef chflags
17433
17434/* Override any GCC internal prototype to avoid an error.
17435 Use char because int might match the return type of a GCC
17436 builtin and then its argument prototype would still apply. */
17437#ifdef __cplusplus
17438extern "C"
17439#endif
17440char chflags ();
17441/* The GNU C library defines this for functions which it implements
17442 to always fail with ENOSYS. Some functions are actually named
17443 something starting with __ and the normal name is an alias. */
17444#if defined __stub_chflags || defined __stub___chflags
17445choke me
17446#endif
17447
17448int
17449main ()
17450{
17451return chflags ();
17452 ;
17453 return 0;
17454}
17455_ACEOF
17456rm -f conftest.$ac_objext conftest$ac_exeext
17457if { (ac_try="$ac_link"
17458case "(($ac_try" in
17459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17460 *) ac_try_echo=$ac_try;;
17461esac
17462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17463 (eval "$ac_link") 2>conftest.er1
17464 ac_status=$?
17465 grep -v '^ *+' conftest.er1 >conftest.err
17466 rm -f conftest.er1
17467 cat conftest.err >&5
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469 (exit $ac_status); } && {
17470 test -z "$ac_c_werror_flag" ||
17471 test ! -s conftest.err
17472 } && test -s conftest$ac_exeext &&
17473 $as_test_x conftest$ac_exeext; then
17474 ac_cv_func_chflags=yes
17475else
17476 echo "$as_me: failed program was:" >&5
17477sed 's/^/| /' conftest.$ac_ext >&5
17478
17479 ac_cv_func_chflags=no
17480fi
17481
17482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17483 conftest$ac_exeext conftest.$ac_ext
17484fi
17485{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17486echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17487if test $ac_cv_func_chflags = yes; then
17488 ac_cv_have_chflags="yes"
17489else
17490 ac_cv_have_chflags="no"
17491fi
17492
17493fi
17494if test "$ac_cv_have_chflags" = yes ; then
17495
17496cat >>confdefs.h <<\_ACEOF
17497#define HAVE_CHFLAGS 1
17498_ACEOF
17499
17500fi
17501
17502{ echo "$as_me:$LINENO: checking for lchflags" >&5
17503echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17504if test "${ac_cv_have_lchflags+set}" = set; then
17505 echo $ECHO_N "(cached) $ECHO_C" >&6
17506else
17507 if test "$cross_compiling" = yes; then
17508 ac_cv_have_lchflags=cross
17509else
17510 cat >conftest.$ac_ext <<_ACEOF
17511/* confdefs.h. */
17512_ACEOF
17513cat confdefs.h >>conftest.$ac_ext
17514cat >>conftest.$ac_ext <<_ACEOF
17515/* end confdefs.h. */
17516[
Christian Heimesd0764e22007-12-04 15:00:33 +000017517#include <sys/stat.h>
17518#include <unistd.h>
17519int main(int argc, char*argv[])
17520{
17521 if(lchflags(argv[0], 0) != 0)
17522 return 1;
17523 return 0;
17524}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017525]
Christian Heimesd0764e22007-12-04 15:00:33 +000017526_ACEOF
17527rm -f conftest$ac_exeext
17528if { (ac_try="$ac_link"
17529case "(($ac_try" in
17530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17531 *) ac_try_echo=$ac_try;;
17532esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017534 (eval "$ac_link") 2>&5
17535 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17538 { (case "(($ac_try" in
17539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17540 *) ac_try_echo=$ac_try;;
17541esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017543 (eval "$ac_try") 2>&5
17544 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017546 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017547 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017548else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017549 echo "$as_me: program exited with status $ac_status" >&5
17550echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017551sed 's/^/| /' conftest.$ac_ext >&5
17552
17553( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017554ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017555fi
17556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17557fi
17558
17559
17560
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017561fi
17562{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17563echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17564if test "$ac_cv_have_lchflags" = cross ; then
17565 { echo "$as_me:$LINENO: checking for lchflags" >&5
17566echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17567if test "${ac_cv_func_lchflags+set}" = set; then
17568 echo $ECHO_N "(cached) $ECHO_C" >&6
17569else
17570 cat >conftest.$ac_ext <<_ACEOF
17571/* confdefs.h. */
17572_ACEOF
17573cat confdefs.h >>conftest.$ac_ext
17574cat >>conftest.$ac_ext <<_ACEOF
17575/* end confdefs.h. */
17576/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17577 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17578#define lchflags innocuous_lchflags
17579
17580/* System header to define __stub macros and hopefully few prototypes,
17581 which can conflict with char lchflags (); below.
17582 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17583 <limits.h> exists even on freestanding compilers. */
17584
17585#ifdef __STDC__
17586# include <limits.h>
17587#else
17588# include <assert.h>
17589#endif
17590
17591#undef lchflags
17592
17593/* Override any GCC internal prototype to avoid an error.
17594 Use char because int might match the return type of a GCC
17595 builtin and then its argument prototype would still apply. */
17596#ifdef __cplusplus
17597extern "C"
17598#endif
17599char lchflags ();
17600/* The GNU C library defines this for functions which it implements
17601 to always fail with ENOSYS. Some functions are actually named
17602 something starting with __ and the normal name is an alias. */
17603#if defined __stub_lchflags || defined __stub___lchflags
17604choke me
17605#endif
17606
17607int
17608main ()
17609{
17610return lchflags ();
17611 ;
17612 return 0;
17613}
17614_ACEOF
17615rm -f conftest.$ac_objext conftest$ac_exeext
17616if { (ac_try="$ac_link"
17617case "(($ac_try" in
17618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17619 *) ac_try_echo=$ac_try;;
17620esac
17621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17622 (eval "$ac_link") 2>conftest.er1
17623 ac_status=$?
17624 grep -v '^ *+' conftest.er1 >conftest.err
17625 rm -f conftest.er1
17626 cat conftest.err >&5
17627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17628 (exit $ac_status); } && {
17629 test -z "$ac_c_werror_flag" ||
17630 test ! -s conftest.err
17631 } && test -s conftest$ac_exeext &&
17632 $as_test_x conftest$ac_exeext; then
17633 ac_cv_func_lchflags=yes
17634else
17635 echo "$as_me: failed program was:" >&5
17636sed 's/^/| /' conftest.$ac_ext >&5
17637
17638 ac_cv_func_lchflags=no
17639fi
17640
17641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17642 conftest$ac_exeext conftest.$ac_ext
17643fi
17644{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17645echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17646if test $ac_cv_func_lchflags = yes; then
17647 ac_cv_have_lchflags="yes"
17648else
17649 ac_cv_have_lchflags="no"
17650fi
17651
17652fi
17653if test "$ac_cv_have_lchflags" = yes ; then
17654
17655cat >>confdefs.h <<\_ACEOF
17656#define HAVE_LCHFLAGS 1
17657_ACEOF
17658
17659fi
17660
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017661case $ac_sys_system/$ac_sys_release in
17662Darwin/*)
17663 _CUR_CFLAGS="${CFLAGS}"
17664 _CUR_LDFLAGS="${LDFLAGS}"
17665 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17666 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17667 ;;
17668esac
17669
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017670{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17671echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017672if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017673 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017674else
17675 ac_check_lib_save_LIBS=$LIBS
17676LIBS="-lz $LIBS"
17677cat >conftest.$ac_ext <<_ACEOF
17678/* confdefs.h. */
17679_ACEOF
17680cat confdefs.h >>conftest.$ac_ext
17681cat >>conftest.$ac_ext <<_ACEOF
17682/* end confdefs.h. */
17683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684/* Override any GCC internal prototype to avoid an error.
17685 Use char because int might match the return type of a GCC
17686 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017687#ifdef __cplusplus
17688extern "C"
17689#endif
17690char inflateCopy ();
17691int
17692main ()
17693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017695 ;
17696 return 0;
17697}
17698_ACEOF
17699rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700if { (ac_try="$ac_link"
17701case "(($ac_try" in
17702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17703 *) ac_try_echo=$ac_try;;
17704esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017707 ac_status=$?
17708 grep -v '^ *+' conftest.er1 >conftest.err
17709 rm -f conftest.er1
17710 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 (exit $ac_status); } && {
17713 test -z "$ac_c_werror_flag" ||
17714 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017715 } && test -s conftest$ac_exeext &&
17716 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017717 ac_cv_lib_z_inflateCopy=yes
17718else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017719 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017720sed 's/^/| /' conftest.$ac_ext >&5
17721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724
17725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017726 conftest$ac_exeext conftest.$ac_ext
17727LIBS=$ac_check_lib_save_LIBS
17728fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017729{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17730echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17731if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017732
17733cat >>confdefs.h <<\_ACEOF
17734#define HAVE_ZLIB_COPY 1
17735_ACEOF
17736
17737fi
17738
17739
17740case $ac_sys_system/$ac_sys_release in
17741Darwin/*)
17742 CFLAGS="${_CUR_CFLAGS}"
17743 LDFLAGS="${_CUR_LDFLAGS}"
17744 ;;
17745esac
17746
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017747{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17748echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017750/* confdefs.h. */
17751_ACEOF
17752cat confdefs.h >>conftest.$ac_ext
17753cat >>conftest.$ac_ext <<_ACEOF
17754/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017755
17756#include "confdefs.h"
17757#include <netdb.h>
17758
Martin v. Löwise9416172003-05-03 10:12:45 +000017759int
17760main ()
17761{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017762void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017763 ;
17764 return 0;
17765}
17766_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017767rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768if { (ac_try="$ac_link"
17769case "(($ac_try" in
17770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17771 *) ac_try_echo=$ac_try;;
17772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017776 grep -v '^ *+' conftest.er1 >conftest.err
17777 rm -f conftest.er1
17778 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780 (exit $ac_status); } && {
17781 test -z "$ac_c_werror_flag" ||
17782 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017783 } && test -s conftest$ac_exeext &&
17784 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017785
17786cat >>confdefs.h <<\_ACEOF
17787#define HAVE_HSTRERROR 1
17788_ACEOF
17789
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017790 { echo "$as_me:$LINENO: result: yes" >&5
17791echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017792else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017794sed 's/^/| /' conftest.$ac_ext >&5
17795
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017796 { echo "$as_me:$LINENO: result: no" >&5
17797echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017798
17799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800
17801rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017803
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017804{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17805echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017807/* confdefs.h. */
17808_ACEOF
17809cat confdefs.h >>conftest.$ac_ext
17810cat >>conftest.$ac_ext <<_ACEOF
17811/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017812
17813#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017814#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017815#include <sys/socket.h>
17816#include <netinet/in.h>
17817#include <arpa/inet.h>
17818
Martin v. Löwise9416172003-05-03 10:12:45 +000017819int
17820main ()
17821{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017822void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017823 ;
17824 return 0;
17825}
17826_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017827rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828if { (ac_try="$ac_link"
17829case "(($ac_try" in
17830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17831 *) ac_try_echo=$ac_try;;
17832esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017836 grep -v '^ *+' conftest.er1 >conftest.err
17837 rm -f conftest.er1
17838 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840 (exit $ac_status); } && {
17841 test -z "$ac_c_werror_flag" ||
17842 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017843 } && test -s conftest$ac_exeext &&
17844 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017845
17846cat >>confdefs.h <<\_ACEOF
17847#define HAVE_INET_ATON 1
17848_ACEOF
17849
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017850 { echo "$as_me:$LINENO: result: yes" >&5
17851echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017852else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017854sed 's/^/| /' conftest.$ac_ext >&5
17855
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017856 { echo "$as_me:$LINENO: result: no" >&5
17857echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017858
17859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860
17861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017863
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017864{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17865echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017866cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017867/* confdefs.h. */
17868_ACEOF
17869cat confdefs.h >>conftest.$ac_ext
17870cat >>conftest.$ac_ext <<_ACEOF
17871/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017872
17873#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017874#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017875#include <sys/socket.h>
17876#include <netinet/in.h>
17877#include <arpa/inet.h>
17878
Martin v. Löwise9416172003-05-03 10:12:45 +000017879int
17880main ()
17881{
17882void* p = inet_pton
17883 ;
17884 return 0;
17885}
17886_ACEOF
17887rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888if { (ac_try="$ac_compile"
17889case "(($ac_try" in
17890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17891 *) ac_try_echo=$ac_try;;
17892esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017896 grep -v '^ *+' conftest.er1 >conftest.err
17897 rm -f conftest.er1
17898 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900 (exit $ac_status); } && {
17901 test -z "$ac_c_werror_flag" ||
17902 test ! -s conftest.err
17903 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017904
17905cat >>confdefs.h <<\_ACEOF
17906#define HAVE_INET_PTON 1
17907_ACEOF
17908
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017909 { echo "$as_me:$LINENO: result: yes" >&5
17910echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017911else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017913sed 's/^/| /' conftest.$ac_ext >&5
17914
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017915 { echo "$as_me:$LINENO: result: no" >&5
17916echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017917
17918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017919
17920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017921
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017922# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017923{ echo "$as_me:$LINENO: checking for setgroups" >&5
17924echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017926/* confdefs.h. */
17927_ACEOF
17928cat confdefs.h >>conftest.$ac_ext
17929cat >>conftest.$ac_ext <<_ACEOF
17930/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017931
17932#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017933#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017934#ifdef HAVE_GRP_H
17935#include <grp.h>
17936#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017937
Martin v. Löwisd5843682002-11-21 20:41:28 +000017938int
17939main ()
17940{
17941void* p = setgroups
17942 ;
17943 return 0;
17944}
17945_ACEOF
17946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947if { (ac_try="$ac_compile"
17948case "(($ac_try" in
17949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17950 *) ac_try_echo=$ac_try;;
17951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017955 grep -v '^ *+' conftest.er1 >conftest.err
17956 rm -f conftest.er1
17957 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959 (exit $ac_status); } && {
17960 test -z "$ac_c_werror_flag" ||
17961 test ! -s conftest.err
17962 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017963
17964cat >>confdefs.h <<\_ACEOF
17965#define HAVE_SETGROUPS 1
17966_ACEOF
17967
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017968 { echo "$as_me:$LINENO: result: yes" >&5
17969echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017970else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017972sed 's/^/| /' conftest.$ac_ext >&5
17973
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017974 { echo "$as_me:$LINENO: result: no" >&5
17975echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017976
17977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978
17979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017980
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017981# check for openpty and forkpty
17982
Martin v. Löwis11437992002-04-12 09:54:03 +000017983
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017984for ac_func in openpty
17985do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017986as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17987{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17988echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017991else
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017993/* confdefs.h. */
17994_ACEOF
17995cat confdefs.h >>conftest.$ac_ext
17996cat >>conftest.$ac_ext <<_ACEOF
17997/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017998/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17999 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18000#define $ac_func innocuous_$ac_func
18001
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018002/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018003 which can conflict with char $ac_func (); below.
18004 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018005 <limits.h> exists even on freestanding compilers. */
18006
18007#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018008# include <limits.h>
18009#else
18010# include <assert.h>
18011#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018012
18013#undef $ac_func
18014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015/* Override any GCC internal prototype to avoid an error.
18016 Use char because int might match the return type of a GCC
18017 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018018#ifdef __cplusplus
18019extern "C"
18020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018021char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018022/* The GNU C library defines this for functions which it implements
18023 to always fail with ENOSYS. Some functions are actually named
18024 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018026choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018027#endif
18028
Skip Montanaro6dead952003-09-25 14:50:04 +000018029int
18030main ()
18031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 ;
18034 return 0;
18035}
18036_ACEOF
18037rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038if { (ac_try="$ac_link"
18039case "(($ac_try" in
18040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18041 *) ac_try_echo=$ac_try;;
18042esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018046 grep -v '^ *+' conftest.er1 >conftest.err
18047 rm -f conftest.er1
18048 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050 (exit $ac_status); } && {
18051 test -z "$ac_c_werror_flag" ||
18052 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018053 } && test -s conftest$ac_exeext &&
18054 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018055 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018056else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018058sed 's/^/| /' conftest.$ac_ext >&5
18059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062
18063rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018064 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018065fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018066ac_res=`eval echo '${'$as_ac_var'}'`
18067 { echo "$as_me:$LINENO: result: $ac_res" >&5
18068echo "${ECHO_T}$ac_res" >&6; }
18069if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018071#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018072_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018073
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018074else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018075 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18076echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018077if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018078 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018079else
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018081LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018083/* confdefs.h. */
18084_ACEOF
18085cat confdefs.h >>conftest.$ac_ext
18086cat >>conftest.$ac_ext <<_ACEOF
18087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089/* Override any GCC internal prototype to avoid an error.
18090 Use char because int might match the return type of a GCC
18091 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018092#ifdef __cplusplus
18093extern "C"
18094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018095char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018096int
18097main ()
18098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018100 ;
18101 return 0;
18102}
18103_ACEOF
18104rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105if { (ac_try="$ac_link"
18106case "(($ac_try" in
18107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18108 *) ac_try_echo=$ac_try;;
18109esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018113 grep -v '^ *+' conftest.er1 >conftest.err
18114 rm -f conftest.er1
18115 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117 (exit $ac_status); } && {
18118 test -z "$ac_c_werror_flag" ||
18119 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018120 } && test -s conftest$ac_exeext &&
18121 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018122 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018125sed 's/^/| /' conftest.$ac_ext >&5
18126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129
18130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018132LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018133fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018134{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18135echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18136if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018137 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018138#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018139_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018140 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018141else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018142 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18143echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018144if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018146else
18147 ac_check_lib_save_LIBS=$LIBS
18148LIBS="-lbsd $LIBS"
18149cat >conftest.$ac_ext <<_ACEOF
18150/* confdefs.h. */
18151_ACEOF
18152cat confdefs.h >>conftest.$ac_ext
18153cat >>conftest.$ac_ext <<_ACEOF
18154/* end confdefs.h. */
18155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156/* Override any GCC internal prototype to avoid an error.
18157 Use char because int might match the return type of a GCC
18158 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018159#ifdef __cplusplus
18160extern "C"
18161#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018162char openpty ();
18163int
18164main ()
18165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018167 ;
18168 return 0;
18169}
18170_ACEOF
18171rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018172if { (ac_try="$ac_link"
18173case "(($ac_try" in
18174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18175 *) ac_try_echo=$ac_try;;
18176esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018179 ac_status=$?
18180 grep -v '^ *+' conftest.er1 >conftest.err
18181 rm -f conftest.er1
18182 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184 (exit $ac_status); } && {
18185 test -z "$ac_c_werror_flag" ||
18186 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018187 } && test -s conftest$ac_exeext &&
18188 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018189 ac_cv_lib_bsd_openpty=yes
18190else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018191 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018192sed 's/^/| /' conftest.$ac_ext >&5
18193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196
18197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018198 conftest$ac_exeext conftest.$ac_ext
18199LIBS=$ac_check_lib_save_LIBS
18200fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018201{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18202echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18203if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018204 cat >>confdefs.h <<\_ACEOF
18205#define HAVE_OPENPTY 1
18206_ACEOF
18207 LIBS="$LIBS -lbsd"
18208fi
18209
18210
18211fi
18212
Fred Drake8cef4cf2000-06-28 16:40:38 +000018213
18214fi
18215done
18216
Martin v. Löwis11437992002-04-12 09:54:03 +000018217
Fred Drake8cef4cf2000-06-28 16:40:38 +000018218for ac_func in forkpty
18219do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18221{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018224 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018225else
Martin v. Löwis11437992002-04-12 09:54:03 +000018226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018227/* confdefs.h. */
18228_ACEOF
18229cat confdefs.h >>conftest.$ac_ext
18230cat >>conftest.$ac_ext <<_ACEOF
18231/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018232/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18233 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18234#define $ac_func innocuous_$ac_func
18235
Fred Drake8cef4cf2000-06-28 16:40:38 +000018236/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018237 which can conflict with char $ac_func (); below.
18238 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018239 <limits.h> exists even on freestanding compilers. */
18240
18241#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018242# include <limits.h>
18243#else
18244# include <assert.h>
18245#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018246
18247#undef $ac_func
18248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249/* Override any GCC internal prototype to avoid an error.
18250 Use char because int might match the return type of a GCC
18251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018252#ifdef __cplusplus
18253extern "C"
18254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018255char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018256/* The GNU C library defines this for functions which it implements
18257 to always fail with ENOSYS. Some functions are actually named
18258 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018260choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018261#endif
18262
Skip Montanaro6dead952003-09-25 14:50:04 +000018263int
18264main ()
18265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018267 ;
18268 return 0;
18269}
18270_ACEOF
18271rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018272if { (ac_try="$ac_link"
18273case "(($ac_try" in
18274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18275 *) ac_try_echo=$ac_try;;
18276esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018280 grep -v '^ *+' conftest.er1 >conftest.err
18281 rm -f conftest.er1
18282 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018284 (exit $ac_status); } && {
18285 test -z "$ac_c_werror_flag" ||
18286 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018287 } && test -s conftest$ac_exeext &&
18288 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018289 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018292sed 's/^/| /' conftest.$ac_ext >&5
18293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296
18297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018298 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018299fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018300ac_res=`eval echo '${'$as_ac_var'}'`
18301 { echo "$as_me:$LINENO: result: $ac_res" >&5
18302echo "${ECHO_T}$ac_res" >&6; }
18303if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018305#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018306_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018307
Fred Drake8cef4cf2000-06-28 16:40:38 +000018308else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018309 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18310echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018311if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018312 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018313else
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018315LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018323/* Override any GCC internal prototype to avoid an error.
18324 Use char because int might match the return type of a GCC
18325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018326#ifdef __cplusplus
18327extern "C"
18328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018329char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018330int
18331main ()
18332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018334 ;
18335 return 0;
18336}
18337_ACEOF
18338rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339if { (ac_try="$ac_link"
18340case "(($ac_try" in
18341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18342 *) ac_try_echo=$ac_try;;
18343esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018347 grep -v '^ *+' conftest.er1 >conftest.err
18348 rm -f conftest.er1
18349 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351 (exit $ac_status); } && {
18352 test -z "$ac_c_werror_flag" ||
18353 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018354 } && test -s conftest$ac_exeext &&
18355 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018357else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018359sed 's/^/| /' conftest.$ac_ext >&5
18360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018363
18364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018366LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018367fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018368{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18369echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18370if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018371 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018372#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018373_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018374 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018375else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018376 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18377echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018378if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018380else
18381 ac_check_lib_save_LIBS=$LIBS
18382LIBS="-lbsd $LIBS"
18383cat >conftest.$ac_ext <<_ACEOF
18384/* confdefs.h. */
18385_ACEOF
18386cat confdefs.h >>conftest.$ac_ext
18387cat >>conftest.$ac_ext <<_ACEOF
18388/* end confdefs.h. */
18389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390/* Override any GCC internal prototype to avoid an error.
18391 Use char because int might match the return type of a GCC
18392 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018393#ifdef __cplusplus
18394extern "C"
18395#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018396char forkpty ();
18397int
18398main ()
18399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018401 ;
18402 return 0;
18403}
18404_ACEOF
18405rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406if { (ac_try="$ac_link"
18407case "(($ac_try" in
18408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18409 *) ac_try_echo=$ac_try;;
18410esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018413 ac_status=$?
18414 grep -v '^ *+' conftest.er1 >conftest.err
18415 rm -f conftest.er1
18416 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418 (exit $ac_status); } && {
18419 test -z "$ac_c_werror_flag" ||
18420 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018421 } && test -s conftest$ac_exeext &&
18422 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018423 ac_cv_lib_bsd_forkpty=yes
18424else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018425 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018426sed 's/^/| /' conftest.$ac_ext >&5
18427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430
18431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018432 conftest$ac_exeext conftest.$ac_ext
18433LIBS=$ac_check_lib_save_LIBS
18434fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018435{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18436echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18437if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018438 cat >>confdefs.h <<\_ACEOF
18439#define HAVE_FORKPTY 1
18440_ACEOF
18441 LIBS="$LIBS -lbsd"
18442fi
18443
18444
18445fi
18446
Fred Drake8cef4cf2000-06-28 16:40:38 +000018447
18448fi
18449done
18450
Jack Jansendd19cf82001-12-06 22:36:17 +000018451
Christian Heimesb186d002008-03-18 15:15:01 +000018452# Stuff for expat.
18453
18454for ac_func in memmove
18455do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018456as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18457{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18458echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018459if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018460 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018461else
18462 cat >conftest.$ac_ext <<_ACEOF
18463/* confdefs.h. */
18464_ACEOF
18465cat confdefs.h >>conftest.$ac_ext
18466cat >>conftest.$ac_ext <<_ACEOF
18467/* end confdefs.h. */
18468/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18469 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18470#define $ac_func innocuous_$ac_func
18471
18472/* System header to define __stub macros and hopefully few prototypes,
18473 which can conflict with char $ac_func (); below.
18474 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18475 <limits.h> exists even on freestanding compilers. */
18476
18477#ifdef __STDC__
18478# include <limits.h>
18479#else
18480# include <assert.h>
18481#endif
18482
18483#undef $ac_func
18484
18485/* Override any GCC internal prototype to avoid an error.
18486 Use char because int might match the return type of a GCC
18487 builtin and then its argument prototype would still apply. */
18488#ifdef __cplusplus
18489extern "C"
18490#endif
18491char $ac_func ();
18492/* The GNU C library defines this for functions which it implements
18493 to always fail with ENOSYS. Some functions are actually named
18494 something starting with __ and the normal name is an alias. */
18495#if defined __stub_$ac_func || defined __stub___$ac_func
18496choke me
18497#endif
18498
18499int
18500main ()
18501{
18502return $ac_func ();
18503 ;
18504 return 0;
18505}
18506_ACEOF
18507rm -f conftest.$ac_objext conftest$ac_exeext
18508if { (ac_try="$ac_link"
18509case "(($ac_try" in
18510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18511 *) ac_try_echo=$ac_try;;
18512esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018514 (eval "$ac_link") 2>conftest.er1
18515 ac_status=$?
18516 grep -v '^ *+' conftest.er1 >conftest.err
18517 rm -f conftest.er1
18518 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018520 (exit $ac_status); } && {
18521 test -z "$ac_c_werror_flag" ||
18522 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018523 } && test -s conftest$ac_exeext &&
18524 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018525 eval "$as_ac_var=yes"
18526else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018527 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018528sed 's/^/| /' conftest.$ac_ext >&5
18529
18530 eval "$as_ac_var=no"
18531fi
18532
18533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18534 conftest$ac_exeext conftest.$ac_ext
18535fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018536ac_res=`eval echo '${'$as_ac_var'}'`
18537 { echo "$as_me:$LINENO: result: $ac_res" >&5
18538echo "${ECHO_T}$ac_res" >&6; }
18539if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018540 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018541#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018542_ACEOF
18543
18544fi
18545done
18546
18547
Michael W. Hudson54241132001-12-07 15:38:26 +000018548# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018549
18550
18551
18552
18553
18554
Fred Drake8cef4cf2000-06-28 16:40:38 +000018555for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18556do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018557as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18558{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18559echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018562else
Martin v. Löwis11437992002-04-12 09:54:03 +000018563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018564/* confdefs.h. */
18565_ACEOF
18566cat confdefs.h >>conftest.$ac_ext
18567cat >>conftest.$ac_ext <<_ACEOF
18568/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018569/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18570 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18571#define $ac_func innocuous_$ac_func
18572
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018573/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018574 which can conflict with char $ac_func (); below.
18575 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018576 <limits.h> exists even on freestanding compilers. */
18577
18578#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018579# include <limits.h>
18580#else
18581# include <assert.h>
18582#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018583
18584#undef $ac_func
18585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586/* Override any GCC internal prototype to avoid an error.
18587 Use char because int might match the return type of a GCC
18588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018589#ifdef __cplusplus
18590extern "C"
18591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018592char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018593/* The GNU C library defines this for functions which it implements
18594 to always fail with ENOSYS. Some functions are actually named
18595 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018596#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018597choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018598#endif
18599
Skip Montanaro6dead952003-09-25 14:50:04 +000018600int
18601main ()
18602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 ;
18605 return 0;
18606}
18607_ACEOF
18608rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609if { (ac_try="$ac_link"
18610case "(($ac_try" in
18611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18612 *) ac_try_echo=$ac_try;;
18613esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018615 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018617 grep -v '^ *+' conftest.er1 >conftest.err
18618 rm -f conftest.er1
18619 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621 (exit $ac_status); } && {
18622 test -z "$ac_c_werror_flag" ||
18623 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018624 } && test -s conftest$ac_exeext &&
18625 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018629sed 's/^/| /' conftest.$ac_ext >&5
18630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633
18634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018635 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018636fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018637ac_res=`eval echo '${'$as_ac_var'}'`
18638 { echo "$as_me:$LINENO: result: $ac_res" >&5
18639echo "${ECHO_T}$ac_res" >&6; }
18640if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018641 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018642#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018643_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018645fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018646done
18647
Michael W. Hudson54241132001-12-07 15:38:26 +000018648
Martin v. Löwis11437992002-04-12 09:54:03 +000018649
18650
18651
Christian Heimesb186d002008-03-18 15:15:01 +000018652for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018653do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018654as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18655{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18656echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018657if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018658 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018659else
Martin v. Löwis11437992002-04-12 09:54:03 +000018660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018661/* confdefs.h. */
18662_ACEOF
18663cat confdefs.h >>conftest.$ac_ext
18664cat >>conftest.$ac_ext <<_ACEOF
18665/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018666/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18667 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18668#define $ac_func innocuous_$ac_func
18669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018670/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018671 which can conflict with char $ac_func (); below.
18672 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018673 <limits.h> exists even on freestanding compilers. */
18674
18675#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018676# include <limits.h>
18677#else
18678# include <assert.h>
18679#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018680
18681#undef $ac_func
18682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018683/* Override any GCC internal prototype to avoid an error.
18684 Use char because int might match the return type of a GCC
18685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018686#ifdef __cplusplus
18687extern "C"
18688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018689char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018690/* The GNU C library defines this for functions which it implements
18691 to always fail with ENOSYS. Some functions are actually named
18692 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018693#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018694choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018695#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018696
Skip Montanaro6dead952003-09-25 14:50:04 +000018697int
18698main ()
18699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 ;
18702 return 0;
18703}
18704_ACEOF
18705rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018706if { (ac_try="$ac_link"
18707case "(($ac_try" in
18708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18709 *) ac_try_echo=$ac_try;;
18710esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018712 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018714 grep -v '^ *+' conftest.er1 >conftest.err
18715 rm -f conftest.er1
18716 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018718 (exit $ac_status); } && {
18719 test -z "$ac_c_werror_flag" ||
18720 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018721 } && test -s conftest$ac_exeext &&
18722 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018723 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018726sed 's/^/| /' conftest.$ac_ext >&5
18727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018728 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730
18731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018733fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018734ac_res=`eval echo '${'$as_ac_var'}'`
18735 { echo "$as_me:$LINENO: result: $ac_res" >&5
18736echo "${ECHO_T}$ac_res" >&6; }
18737if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018738 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018739#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018740_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018741
Martin v. Löwis1142de32002-03-29 16:28:31 +000018742else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018744 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18746 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018747esac
18748
Martin v. Löwis1142de32002-03-29 16:28:31 +000018749fi
18750done
18751
18752
Martin v. Löwis11437992002-04-12 09:54:03 +000018753
Martin v. Löwis1142de32002-03-29 16:28:31 +000018754for ac_func in getpgrp
18755do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018756as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18757{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18758echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018760 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018761else
Martin v. Löwis11437992002-04-12 09:54:03 +000018762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018763/* confdefs.h. */
18764_ACEOF
18765cat confdefs.h >>conftest.$ac_ext
18766cat >>conftest.$ac_ext <<_ACEOF
18767/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018768/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18769 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18770#define $ac_func innocuous_$ac_func
18771
Martin v. Löwis1142de32002-03-29 16:28:31 +000018772/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018773 which can conflict with char $ac_func (); below.
18774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018775 <limits.h> exists even on freestanding compilers. */
18776
18777#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018778# include <limits.h>
18779#else
18780# include <assert.h>
18781#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018782
18783#undef $ac_func
18784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018785/* Override any GCC internal prototype to avoid an error.
18786 Use char because int might match the return type of a GCC
18787 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018788#ifdef __cplusplus
18789extern "C"
18790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018791char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018792/* The GNU C library defines this for functions which it implements
18793 to always fail with ENOSYS. Some functions are actually named
18794 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018795#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018796choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018797#endif
18798
Skip Montanaro6dead952003-09-25 14:50:04 +000018799int
18800main ()
18801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 ;
18804 return 0;
18805}
18806_ACEOF
18807rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018808if { (ac_try="$ac_link"
18809case "(($ac_try" in
18810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18811 *) ac_try_echo=$ac_try;;
18812esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018814 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018816 grep -v '^ *+' conftest.er1 >conftest.err
18817 rm -f conftest.er1
18818 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820 (exit $ac_status); } && {
18821 test -z "$ac_c_werror_flag" ||
18822 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018823 } && test -s conftest$ac_exeext &&
18824 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018825 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018826else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018828sed 's/^/| /' conftest.$ac_ext >&5
18829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018830 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018832
18833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018834 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018835fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018836ac_res=`eval echo '${'$as_ac_var'}'`
18837 { echo "$as_me:$LINENO: result: $ac_res" >&5
18838echo "${ECHO_T}$ac_res" >&6; }
18839if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018840 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018841#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018842_ACEOF
18843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018844/* confdefs.h. */
18845_ACEOF
18846cat confdefs.h >>conftest.$ac_ext
18847cat >>conftest.$ac_ext <<_ACEOF
18848/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018849#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018850int
18851main ()
18852{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018853getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 ;
18855 return 0;
18856}
18857_ACEOF
18858rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859if { (ac_try="$ac_compile"
18860case "(($ac_try" in
18861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18862 *) ac_try_echo=$ac_try;;
18863esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018867 grep -v '^ *+' conftest.er1 >conftest.err
18868 rm -f conftest.er1
18869 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018871 (exit $ac_status); } && {
18872 test -z "$ac_c_werror_flag" ||
18873 test ! -s conftest.err
18874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018875
18876cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018877#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018878_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018879
Martin v. Löwis11437992002-04-12 09:54:03 +000018880
Guido van Rossumf78abae1997-01-21 22:02:36 +000018881else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018883sed 's/^/| /' conftest.$ac_ext >&5
18884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018885
Guido van Rossum627b2d71993-12-24 10:39:16 +000018886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018887
18888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018889
Guido van Rossum627b2d71993-12-24 10:39:16 +000018890fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018891done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018892
Jack Jansen150753c2003-03-29 22:07:47 +000018893
18894for ac_func in setpgrp
18895do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018896as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18897{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18898echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018899if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018901else
Martin v. Löwis11437992002-04-12 09:54:03 +000018902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018903/* confdefs.h. */
18904_ACEOF
18905cat confdefs.h >>conftest.$ac_ext
18906cat >>conftest.$ac_ext <<_ACEOF
18907/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018908/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18909 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18910#define $ac_func innocuous_$ac_func
18911
Jack Jansen150753c2003-03-29 22:07:47 +000018912/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018913 which can conflict with char $ac_func (); below.
18914 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018915 <limits.h> exists even on freestanding compilers. */
18916
18917#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018918# include <limits.h>
18919#else
18920# include <assert.h>
18921#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018922
18923#undef $ac_func
18924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925/* Override any GCC internal prototype to avoid an error.
18926 Use char because int might match the return type of a GCC
18927 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018928#ifdef __cplusplus
18929extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018930#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018931char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018932/* The GNU C library defines this for functions which it implements
18933 to always fail with ENOSYS. Some functions are actually named
18934 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018935#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018936choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018937#endif
18938
Skip Montanaro6dead952003-09-25 14:50:04 +000018939int
18940main ()
18941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018942return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018943 ;
18944 return 0;
18945}
18946_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018947rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018948if { (ac_try="$ac_link"
18949case "(($ac_try" in
18950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18951 *) ac_try_echo=$ac_try;;
18952esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018956 grep -v '^ *+' conftest.er1 >conftest.err
18957 rm -f conftest.er1
18958 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960 (exit $ac_status); } && {
18961 test -z "$ac_c_werror_flag" ||
18962 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018963 } && test -s conftest$ac_exeext &&
18964 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018965 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018966else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018968sed 's/^/| /' conftest.$ac_ext >&5
18969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018970 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018972
18973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018974 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018975fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018976ac_res=`eval echo '${'$as_ac_var'}'`
18977 { echo "$as_me:$LINENO: result: $ac_res" >&5
18978echo "${ECHO_T}$ac_res" >&6; }
18979if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018980 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018981#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018982_ACEOF
18983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018984/* confdefs.h. */
18985_ACEOF
18986cat confdefs.h >>conftest.$ac_ext
18987cat >>conftest.$ac_ext <<_ACEOF
18988/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018989#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018990int
18991main ()
18992{
18993setpgrp(0,0);
18994 ;
18995 return 0;
18996}
18997_ACEOF
18998rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999if { (ac_try="$ac_compile"
19000case "(($ac_try" in
19001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19002 *) ac_try_echo=$ac_try;;
19003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019007 grep -v '^ *+' conftest.er1 >conftest.err
19008 rm -f conftest.er1
19009 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019011 (exit $ac_status); } && {
19012 test -z "$ac_c_werror_flag" ||
19013 test ! -s conftest.err
19014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019015
19016cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019017#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019018_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019019
Jack Jansen150753c2003-03-29 22:07:47 +000019020
19021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019023sed 's/^/| /' conftest.$ac_ext >&5
19024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027
19028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019029
19030fi
19031done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019032
Martin v. Löwis11437992002-04-12 09:54:03 +000019033
Thomas Wouters3a584202000-08-05 23:28:51 +000019034for ac_func in gettimeofday
19035do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019036as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19037{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19038echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019039if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019041else
Martin v. Löwis11437992002-04-12 09:54:03 +000019042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019043/* confdefs.h. */
19044_ACEOF
19045cat confdefs.h >>conftest.$ac_ext
19046cat >>conftest.$ac_ext <<_ACEOF
19047/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019048/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19050#define $ac_func innocuous_$ac_func
19051
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019052/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019053 which can conflict with char $ac_func (); below.
19054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019055 <limits.h> exists even on freestanding compilers. */
19056
19057#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019058# include <limits.h>
19059#else
19060# include <assert.h>
19061#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019062
19063#undef $ac_func
19064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019065/* Override any GCC internal prototype to avoid an error.
19066 Use char because int might match the return type of a GCC
19067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019068#ifdef __cplusplus
19069extern "C"
19070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019071char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019072/* The GNU C library defines this for functions which it implements
19073 to always fail with ENOSYS. Some functions are actually named
19074 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019075#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019076choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019077#endif
19078
Skip Montanaro6dead952003-09-25 14:50:04 +000019079int
19080main ()
19081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019082return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019083 ;
19084 return 0;
19085}
19086_ACEOF
19087rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019088if { (ac_try="$ac_link"
19089case "(($ac_try" in
19090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19091 *) ac_try_echo=$ac_try;;
19092esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019094 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019096 grep -v '^ *+' conftest.er1 >conftest.err
19097 rm -f conftest.er1
19098 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019100 (exit $ac_status); } && {
19101 test -z "$ac_c_werror_flag" ||
19102 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019103 } && test -s conftest$ac_exeext &&
19104 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019105 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019106else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019108sed 's/^/| /' conftest.$ac_ext >&5
19109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019112
19113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019114 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019115fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019116ac_res=`eval echo '${'$as_ac_var'}'`
19117 { echo "$as_me:$LINENO: result: $ac_res" >&5
19118echo "${ECHO_T}$ac_res" >&6; }
19119if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019122_ACEOF
19123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019124/* confdefs.h. */
19125_ACEOF
19126cat confdefs.h >>conftest.$ac_ext
19127cat >>conftest.$ac_ext <<_ACEOF
19128/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019129#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019130int
19131main ()
19132{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019133gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 ;
19135 return 0;
19136}
19137_ACEOF
19138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019139if { (ac_try="$ac_compile"
19140case "(($ac_try" in
19141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19142 *) ac_try_echo=$ac_try;;
19143esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019147 grep -v '^ *+' conftest.er1 >conftest.err
19148 rm -f conftest.er1
19149 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019151 (exit $ac_status); } && {
19152 test -z "$ac_c_werror_flag" ||
19153 test ! -s conftest.err
19154 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019155 :
19156else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019158sed 's/^/| /' conftest.$ac_ext >&5
19159
Martin v. Löwis11437992002-04-12 09:54:03 +000019160
19161cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019162#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019163_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019164
Martin v. Löwis11437992002-04-12 09:54:03 +000019165
Guido van Rossum627b2d71993-12-24 10:39:16 +000019166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019167
19168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019169
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019170fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019171done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019172
Michael W. Hudson54241132001-12-07 15:38:26 +000019173
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019174{ echo "$as_me:$LINENO: checking for major" >&5
19175echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019177/* confdefs.h. */
19178_ACEOF
19179cat confdefs.h >>conftest.$ac_ext
19180cat >>conftest.$ac_ext <<_ACEOF
19181/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019182
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019183#if defined(MAJOR_IN_MKDEV)
19184#include <sys/mkdev.h>
19185#elif defined(MAJOR_IN_SYSMACROS)
19186#include <sys/sysmacros.h>
19187#else
19188#include <sys/types.h>
19189#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019190
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019191int
19192main ()
19193{
19194
19195 makedev(major(0),minor(0));
19196
19197 ;
19198 return 0;
19199}
19200_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019201rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019202if { (ac_try="$ac_link"
19203case "(($ac_try" in
19204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19205 *) ac_try_echo=$ac_try;;
19206esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019210 grep -v '^ *+' conftest.er1 >conftest.err
19211 rm -f conftest.er1
19212 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019214 (exit $ac_status); } && {
19215 test -z "$ac_c_werror_flag" ||
19216 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019217 } && test -s conftest$ac_exeext &&
19218 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019219
19220
19221cat >>confdefs.h <<\_ACEOF
19222#define HAVE_DEVICE_MACROS 1
19223_ACEOF
19224
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019225 { echo "$as_me:$LINENO: result: yes" >&5
19226echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019227
19228else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019230sed 's/^/| /' conftest.$ac_ext >&5
19231
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019232
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019233 { echo "$as_me:$LINENO: result: no" >&5
19234echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019235
19236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019237
19238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019239 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019240
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019241# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019242# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019243{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19244echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019246/* confdefs.h. */
19247_ACEOF
19248cat confdefs.h >>conftest.$ac_ext
19249cat >>conftest.$ac_ext <<_ACEOF
19250/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019251
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019252#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019253#include <sys/socket.h>
19254#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019255#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019256
Martin v. Löwis11437992002-04-12 09:54:03 +000019257int
19258main ()
19259{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019260
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019261getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019262
Martin v. Löwis11437992002-04-12 09:54:03 +000019263 ;
19264 return 0;
19265}
19266_ACEOF
19267rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019268if { (ac_try="$ac_link"
19269case "(($ac_try" in
19270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19271 *) ac_try_echo=$ac_try;;
19272esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019276 grep -v '^ *+' conftest.er1 >conftest.err
19277 rm -f conftest.er1
19278 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280 (exit $ac_status); } && {
19281 test -z "$ac_c_werror_flag" ||
19282 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019283 } && test -s conftest$ac_exeext &&
19284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019285
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019286{ echo "$as_me:$LINENO: result: yes" >&5
19287echo "${ECHO_T}yes" >&6; }
19288{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19289echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019290if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019291 { echo "$as_me:$LINENO: result: buggy" >&5
19292echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019293buggygetaddrinfo=yes
19294else
Martin v. Löwis11437992002-04-12 09:54:03 +000019295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019296/* confdefs.h. */
19297_ACEOF
19298cat confdefs.h >>conftest.$ac_ext
19299cat >>conftest.$ac_ext <<_ACEOF
19300/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019301
19302#include <sys/types.h>
19303#include <netdb.h>
19304#include <string.h>
19305#include <sys/socket.h>
19306#include <netinet/in.h>
19307
19308main()
19309{
19310 int passive, gaierr, inet4 = 0, inet6 = 0;
19311 struct addrinfo hints, *ai, *aitop;
19312 char straddr[INET6_ADDRSTRLEN], strport[16];
19313
19314 for (passive = 0; passive <= 1; passive++) {
19315 memset(&hints, 0, sizeof(hints));
19316 hints.ai_family = AF_UNSPEC;
19317 hints.ai_flags = passive ? AI_PASSIVE : 0;
19318 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019319 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019320 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19321 (void)gai_strerror(gaierr);
19322 goto bad;
19323 }
19324 for (ai = aitop; ai; ai = ai->ai_next) {
19325 if (ai->ai_addr == NULL ||
19326 ai->ai_addrlen == 0 ||
19327 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19328 straddr, sizeof(straddr), strport, sizeof(strport),
19329 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19330 goto bad;
19331 }
19332 switch (ai->ai_family) {
19333 case AF_INET:
19334 if (strcmp(strport, "54321") != 0) {
19335 goto bad;
19336 }
19337 if (passive) {
19338 if (strcmp(straddr, "0.0.0.0") != 0) {
19339 goto bad;
19340 }
19341 } else {
19342 if (strcmp(straddr, "127.0.0.1") != 0) {
19343 goto bad;
19344 }
19345 }
19346 inet4++;
19347 break;
19348 case AF_INET6:
19349 if (strcmp(strport, "54321") != 0) {
19350 goto bad;
19351 }
19352 if (passive) {
19353 if (strcmp(straddr, "::") != 0) {
19354 goto bad;
19355 }
19356 } else {
19357 if (strcmp(straddr, "::1") != 0) {
19358 goto bad;
19359 }
19360 }
19361 inet6++;
19362 break;
19363 case AF_UNSPEC:
19364 goto bad;
19365 break;
19366 default:
19367 /* another family support? */
19368 break;
19369 }
19370 }
19371 }
19372
19373 if (!(inet4 == 0 || inet4 == 2))
19374 goto bad;
19375 if (!(inet6 == 0 || inet6 == 2))
19376 goto bad;
19377
19378 if (aitop)
19379 freeaddrinfo(aitop);
19380 exit(0);
19381
19382 bad:
19383 if (aitop)
19384 freeaddrinfo(aitop);
19385 exit(1);
19386}
19387
Martin v. Löwis11437992002-04-12 09:54:03 +000019388_ACEOF
19389rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019390if { (ac_try="$ac_link"
19391case "(($ac_try" in
19392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19393 *) ac_try_echo=$ac_try;;
19394esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019396 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019400 { (case "(($ac_try" in
19401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19402 *) ac_try_echo=$ac_try;;
19403esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019405 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019406 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019408 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019409 { echo "$as_me:$LINENO: result: good" >&5
19410echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019411buggygetaddrinfo=no
19412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019413 echo "$as_me: program exited with status $ac_status" >&5
19414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019415sed 's/^/| /' conftest.$ac_ext >&5
19416
Martin v. Löwis11437992002-04-12 09:54:03 +000019417( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019418{ echo "$as_me:$LINENO: result: buggy" >&5
19419echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019420buggygetaddrinfo=yes
19421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019422rm -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 +000019423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019424
19425
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019428sed 's/^/| /' conftest.$ac_ext >&5
19429
Martin v. Löwis11437992002-04-12 09:54:03 +000019430
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019431{ echo "$as_me:$LINENO: result: no" >&5
19432echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019433buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019434
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019436
19437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019439
19440if test "$buggygetaddrinfo" = "yes"; then
19441 if test "$ipv6" = "yes"; then
19442 echo 'Fatal: You must get working getaddrinfo() function.'
19443 echo ' or you can specify "--disable-ipv6"'.
19444 exit 1
19445 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019446else
Martin v. Löwis11437992002-04-12 09:54:03 +000019447
19448cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019449#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019450_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019451
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019453
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019454for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019455do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019456as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19457{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19458echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019459if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019460 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019461else
Martin v. Löwis11437992002-04-12 09:54:03 +000019462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019463/* confdefs.h. */
19464_ACEOF
19465cat confdefs.h >>conftest.$ac_ext
19466cat >>conftest.$ac_ext <<_ACEOF
19467/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019468/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19469 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19470#define $ac_func innocuous_$ac_func
19471
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019472/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019473 which can conflict with char $ac_func (); below.
19474 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019475 <limits.h> exists even on freestanding compilers. */
19476
19477#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019478# include <limits.h>
19479#else
19480# include <assert.h>
19481#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019482
19483#undef $ac_func
19484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019485/* Override any GCC internal prototype to avoid an error.
19486 Use char because int might match the return type of a GCC
19487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019488#ifdef __cplusplus
19489extern "C"
19490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019491char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019492/* The GNU C library defines this for functions which it implements
19493 to always fail with ENOSYS. Some functions are actually named
19494 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019495#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019496choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019497#endif
19498
Skip Montanaro6dead952003-09-25 14:50:04 +000019499int
19500main ()
19501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019502return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019503 ;
19504 return 0;
19505}
19506_ACEOF
19507rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019508if { (ac_try="$ac_link"
19509case "(($ac_try" in
19510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19511 *) ac_try_echo=$ac_try;;
19512esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019514 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019516 grep -v '^ *+' conftest.er1 >conftest.err
19517 rm -f conftest.er1
19518 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019520 (exit $ac_status); } && {
19521 test -z "$ac_c_werror_flag" ||
19522 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019523 } && test -s conftest$ac_exeext &&
19524 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019525 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019526else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019528sed 's/^/| /' conftest.$ac_ext >&5
19529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019532
19533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019534 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019535fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019536ac_res=`eval echo '${'$as_ac_var'}'`
19537 { echo "$as_me:$LINENO: result: $ac_res" >&5
19538echo "${ECHO_T}$ac_res" >&6; }
19539if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019540 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019541#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019542_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019543
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019544fi
19545done
19546
Michael W. Hudson54241132001-12-07 15:38:26 +000019547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019548# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019549{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19550echo $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 +000019551if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019553else
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019555/* confdefs.h. */
19556_ACEOF
19557cat confdefs.h >>conftest.$ac_ext
19558cat >>conftest.$ac_ext <<_ACEOF
19559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019560#include <sys/types.h>
19561#include <sys/time.h>
19562#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019563
Martin v. Löwis11437992002-04-12 09:54:03 +000019564int
19565main ()
19566{
19567if ((struct tm *) 0)
19568return 0;
19569 ;
19570 return 0;
19571}
19572_ACEOF
19573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019574if { (ac_try="$ac_compile"
19575case "(($ac_try" in
19576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19577 *) ac_try_echo=$ac_try;;
19578esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019582 grep -v '^ *+' conftest.er1 >conftest.err
19583 rm -f conftest.er1
19584 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019586 (exit $ac_status); } && {
19587 test -z "$ac_c_werror_flag" ||
19588 test ! -s conftest.err
19589 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019590 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019591else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019593sed 's/^/| /' conftest.$ac_ext >&5
19594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019595 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019597
19598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019599fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019600{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19601echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019602if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019603
19604cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019605#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019606_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019607
19608fi
19609
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019610{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19611echo $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 +000019612if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019614else
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019616/* confdefs.h. */
19617_ACEOF
19618cat confdefs.h >>conftest.$ac_ext
19619cat >>conftest.$ac_ext <<_ACEOF
19620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019621#include <sys/types.h>
19622#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019623
Martin v. Löwis11437992002-04-12 09:54:03 +000019624int
19625main ()
19626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019627struct tm tm;
19628 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019629 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 ;
19631 return 0;
19632}
19633_ACEOF
19634rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019635if { (ac_try="$ac_compile"
19636case "(($ac_try" in
19637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19638 *) ac_try_echo=$ac_try;;
19639esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019643 grep -v '^ *+' conftest.er1 >conftest.err
19644 rm -f conftest.er1
19645 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647 (exit $ac_status); } && {
19648 test -z "$ac_c_werror_flag" ||
19649 test ! -s conftest.err
19650 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019651 ac_cv_struct_tm=time.h
19652else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019654sed 's/^/| /' conftest.$ac_ext >&5
19655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019656 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019658
19659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019660fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019661{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19662echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019663if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019664
19665cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019666#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019667_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019668
19669fi
19670
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019671{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19672echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019673if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019675else
Martin v. Löwis11437992002-04-12 09:54:03 +000019676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019682#include <sys/types.h>
19683#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019684
19685
Martin v. Löwis11437992002-04-12 09:54:03 +000019686int
19687main ()
19688{
19689static struct tm ac_aggr;
19690if (ac_aggr.tm_zone)
19691return 0;
19692 ;
19693 return 0;
19694}
19695_ACEOF
19696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019697if { (ac_try="$ac_compile"
19698case "(($ac_try" in
19699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19700 *) ac_try_echo=$ac_try;;
19701esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019705 grep -v '^ *+' conftest.er1 >conftest.err
19706 rm -f conftest.er1
19707 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019709 (exit $ac_status); } && {
19710 test -z "$ac_c_werror_flag" ||
19711 test ! -s conftest.err
19712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019713 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019714else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019716sed 's/^/| /' conftest.$ac_ext >&5
19717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019719/* confdefs.h. */
19720_ACEOF
19721cat confdefs.h >>conftest.$ac_ext
19722cat >>conftest.$ac_ext <<_ACEOF
19723/* end confdefs.h. */
19724#include <sys/types.h>
19725#include <$ac_cv_struct_tm>
19726
19727
19728int
19729main ()
19730{
19731static struct tm ac_aggr;
19732if (sizeof ac_aggr.tm_zone)
19733return 0;
19734 ;
19735 return 0;
19736}
19737_ACEOF
19738rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019739if { (ac_try="$ac_compile"
19740case "(($ac_try" in
19741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19742 *) ac_try_echo=$ac_try;;
19743esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019745 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019747 grep -v '^ *+' conftest.er1 >conftest.err
19748 rm -f conftest.er1
19749 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019751 (exit $ac_status); } && {
19752 test -z "$ac_c_werror_flag" ||
19753 test ! -s conftest.err
19754 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019755 ac_cv_member_struct_tm_tm_zone=yes
19756else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019758sed 's/^/| /' conftest.$ac_ext >&5
19759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019760 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019762
19763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019765
19766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019767fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019768{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19769echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19770if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019771
19772cat >>confdefs.h <<_ACEOF
19773#define HAVE_STRUCT_TM_TM_ZONE 1
19774_ACEOF
19775
19776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019777fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019778
Martin v. Löwis11437992002-04-12 09:54:03 +000019779if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19780
19781cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019782#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019783_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019784
19785else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019786 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19787echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019788if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019789 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790else
19791 cat >conftest.$ac_ext <<_ACEOF
19792/* confdefs.h. */
19793_ACEOF
19794cat confdefs.h >>conftest.$ac_ext
19795cat >>conftest.$ac_ext <<_ACEOF
19796/* end confdefs.h. */
19797#include <time.h>
19798
19799int
19800main ()
19801{
19802#ifndef tzname
19803 (void) tzname;
19804#endif
19805
19806 ;
19807 return 0;
19808}
19809_ACEOF
19810rm -f conftest.$ac_objext
19811if { (ac_try="$ac_compile"
19812case "(($ac_try" in
19813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19814 *) ac_try_echo=$ac_try;;
19815esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019817 (eval "$ac_compile") 2>conftest.er1
19818 ac_status=$?
19819 grep -v '^ *+' conftest.er1 >conftest.err
19820 rm -f conftest.er1
19821 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019823 (exit $ac_status); } && {
19824 test -z "$ac_c_werror_flag" ||
19825 test ! -s conftest.err
19826 } && test -s conftest.$ac_objext; then
19827 ac_cv_have_decl_tzname=yes
19828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019829 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019830sed 's/^/| /' conftest.$ac_ext >&5
19831
19832 ac_cv_have_decl_tzname=no
19833fi
19834
19835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19836fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019837{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19838echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19839if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019840
19841cat >>confdefs.h <<_ACEOF
19842#define HAVE_DECL_TZNAME 1
19843_ACEOF
19844
19845
19846else
19847 cat >>confdefs.h <<_ACEOF
19848#define HAVE_DECL_TZNAME 0
19849_ACEOF
19850
19851
19852fi
19853
19854
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019855 { echo "$as_me:$LINENO: checking for tzname" >&5
19856echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019857if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019859else
Martin v. Löwis11437992002-04-12 09:54:03 +000019860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019861/* confdefs.h. */
19862_ACEOF
19863cat confdefs.h >>conftest.$ac_ext
19864cat >>conftest.$ac_ext <<_ACEOF
19865/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019866#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019867#if !HAVE_DECL_TZNAME
19868extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019870
Martin v. Löwis11437992002-04-12 09:54:03 +000019871int
19872main ()
19873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019874return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ;
19876 return 0;
19877}
19878_ACEOF
19879rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880if { (ac_try="$ac_link"
19881case "(($ac_try" in
19882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19883 *) ac_try_echo=$ac_try;;
19884esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019888 grep -v '^ *+' conftest.er1 >conftest.err
19889 rm -f conftest.er1
19890 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019892 (exit $ac_status); } && {
19893 test -z "$ac_c_werror_flag" ||
19894 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019895 } && test -s conftest$ac_exeext &&
19896 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019897 ac_cv_var_tzname=yes
19898else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019900sed 's/^/| /' conftest.$ac_ext >&5
19901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904
19905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019906 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019907fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019908{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19909echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019910 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019911
19912cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019913#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019916 fi
19917fi
19918
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019919{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19920echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019921if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019922 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019923else
19924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019925/* confdefs.h. */
19926_ACEOF
19927cat confdefs.h >>conftest.$ac_ext
19928cat >>conftest.$ac_ext <<_ACEOF
19929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019930$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019931int
19932main ()
19933{
19934static struct stat ac_aggr;
19935if (ac_aggr.st_rdev)
19936return 0;
19937 ;
19938 return 0;
19939}
19940_ACEOF
19941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019942if { (ac_try="$ac_compile"
19943case "(($ac_try" in
19944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19945 *) ac_try_echo=$ac_try;;
19946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019950 grep -v '^ *+' conftest.er1 >conftest.err
19951 rm -f conftest.er1
19952 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954 (exit $ac_status); } && {
19955 test -z "$ac_c_werror_flag" ||
19956 test ! -s conftest.err
19957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019958 ac_cv_member_struct_stat_st_rdev=yes
19959else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019961sed 's/^/| /' conftest.$ac_ext >&5
19962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019964/* confdefs.h. */
19965_ACEOF
19966cat confdefs.h >>conftest.$ac_ext
19967cat >>conftest.$ac_ext <<_ACEOF
19968/* end confdefs.h. */
19969$ac_includes_default
19970int
19971main ()
19972{
19973static struct stat ac_aggr;
19974if (sizeof ac_aggr.st_rdev)
19975return 0;
19976 ;
19977 return 0;
19978}
19979_ACEOF
19980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019981if { (ac_try="$ac_compile"
19982case "(($ac_try" in
19983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19984 *) ac_try_echo=$ac_try;;
19985esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019987 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019989 grep -v '^ *+' conftest.er1 >conftest.err
19990 rm -f conftest.er1
19991 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019993 (exit $ac_status); } && {
19994 test -z "$ac_c_werror_flag" ||
19995 test ! -s conftest.err
19996 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019997 ac_cv_member_struct_stat_st_rdev=yes
19998else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020000sed 's/^/| /' conftest.$ac_ext >&5
20001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004
20005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020007
20008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020009fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020010{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20011echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20012if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020013
20014cat >>confdefs.h <<_ACEOF
20015#define HAVE_STRUCT_STAT_ST_RDEV 1
20016_ACEOF
20017
20018
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020019fi
20020
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020021{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20022echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020023if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020025else
Martin v. Löwis11437992002-04-12 09:54:03 +000020026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020027/* confdefs.h. */
20028_ACEOF
20029cat confdefs.h >>conftest.$ac_ext
20030cat >>conftest.$ac_ext <<_ACEOF
20031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020033int
20034main ()
20035{
20036static struct stat ac_aggr;
20037if (ac_aggr.st_blksize)
20038return 0;
20039 ;
20040 return 0;
20041}
20042_ACEOF
20043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020044if { (ac_try="$ac_compile"
20045case "(($ac_try" in
20046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20047 *) ac_try_echo=$ac_try;;
20048esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020052 grep -v '^ *+' conftest.er1 >conftest.err
20053 rm -f conftest.er1
20054 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020056 (exit $ac_status); } && {
20057 test -z "$ac_c_werror_flag" ||
20058 test ! -s conftest.err
20059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020060 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020061else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020063sed 's/^/| /' conftest.$ac_ext >&5
20064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020066/* confdefs.h. */
20067_ACEOF
20068cat confdefs.h >>conftest.$ac_ext
20069cat >>conftest.$ac_ext <<_ACEOF
20070/* end confdefs.h. */
20071$ac_includes_default
20072int
20073main ()
20074{
20075static struct stat ac_aggr;
20076if (sizeof ac_aggr.st_blksize)
20077return 0;
20078 ;
20079 return 0;
20080}
20081_ACEOF
20082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020083if { (ac_try="$ac_compile"
20084case "(($ac_try" in
20085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20086 *) ac_try_echo=$ac_try;;
20087esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020091 grep -v '^ *+' conftest.er1 >conftest.err
20092 rm -f conftest.er1
20093 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020095 (exit $ac_status); } && {
20096 test -z "$ac_c_werror_flag" ||
20097 test ! -s conftest.err
20098 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020099 ac_cv_member_struct_stat_st_blksize=yes
20100else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020102sed 's/^/| /' conftest.$ac_ext >&5
20103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020104 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020106
20107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020109
20110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020111fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020112{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20113echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20114if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020115
Martin v. Löwis11437992002-04-12 09:54:03 +000020116cat >>confdefs.h <<_ACEOF
20117#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20118_ACEOF
20119
20120
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020121fi
20122
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020123{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20124echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020125if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020126 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020127else
20128 cat >conftest.$ac_ext <<_ACEOF
20129/* confdefs.h. */
20130_ACEOF
20131cat confdefs.h >>conftest.$ac_ext
20132cat >>conftest.$ac_ext <<_ACEOF
20133/* end confdefs.h. */
20134$ac_includes_default
20135int
20136main ()
20137{
20138static struct stat ac_aggr;
20139if (ac_aggr.st_flags)
20140return 0;
20141 ;
20142 return 0;
20143}
20144_ACEOF
20145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146if { (ac_try="$ac_compile"
20147case "(($ac_try" in
20148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20149 *) ac_try_echo=$ac_try;;
20150esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020153 ac_status=$?
20154 grep -v '^ *+' conftest.er1 >conftest.err
20155 rm -f conftest.er1
20156 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158 (exit $ac_status); } && {
20159 test -z "$ac_c_werror_flag" ||
20160 test ! -s conftest.err
20161 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020162 ac_cv_member_struct_stat_st_flags=yes
20163else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020164 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020165sed 's/^/| /' conftest.$ac_ext >&5
20166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020167 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020168/* confdefs.h. */
20169_ACEOF
20170cat confdefs.h >>conftest.$ac_ext
20171cat >>conftest.$ac_ext <<_ACEOF
20172/* end confdefs.h. */
20173$ac_includes_default
20174int
20175main ()
20176{
20177static struct stat ac_aggr;
20178if (sizeof ac_aggr.st_flags)
20179return 0;
20180 ;
20181 return 0;
20182}
20183_ACEOF
20184rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020185if { (ac_try="$ac_compile"
20186case "(($ac_try" in
20187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188 *) ac_try_echo=$ac_try;;
20189esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020191 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020192 ac_status=$?
20193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020197 (exit $ac_status); } && {
20198 test -z "$ac_c_werror_flag" ||
20199 test ! -s conftest.err
20200 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020201 ac_cv_member_struct_stat_st_flags=yes
20202else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020203 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020204sed 's/^/| /' conftest.$ac_ext >&5
20205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020208
20209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020211
20212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020213fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020214{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20215echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20216if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020217
20218cat >>confdefs.h <<_ACEOF
20219#define HAVE_STRUCT_STAT_ST_FLAGS 1
20220_ACEOF
20221
20222
20223fi
20224
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020225{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20226echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020227if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020228 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020229else
20230 cat >conftest.$ac_ext <<_ACEOF
20231/* confdefs.h. */
20232_ACEOF
20233cat confdefs.h >>conftest.$ac_ext
20234cat >>conftest.$ac_ext <<_ACEOF
20235/* end confdefs.h. */
20236$ac_includes_default
20237int
20238main ()
20239{
20240static struct stat ac_aggr;
20241if (ac_aggr.st_gen)
20242return 0;
20243 ;
20244 return 0;
20245}
20246_ACEOF
20247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020248if { (ac_try="$ac_compile"
20249case "(($ac_try" in
20250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20251 *) ac_try_echo=$ac_try;;
20252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020255 ac_status=$?
20256 grep -v '^ *+' conftest.er1 >conftest.err
20257 rm -f conftest.er1
20258 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020260 (exit $ac_status); } && {
20261 test -z "$ac_c_werror_flag" ||
20262 test ! -s conftest.err
20263 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020264 ac_cv_member_struct_stat_st_gen=yes
20265else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020266 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020267sed 's/^/| /' conftest.$ac_ext >&5
20268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020269 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020270/* confdefs.h. */
20271_ACEOF
20272cat confdefs.h >>conftest.$ac_ext
20273cat >>conftest.$ac_ext <<_ACEOF
20274/* end confdefs.h. */
20275$ac_includes_default
20276int
20277main ()
20278{
20279static struct stat ac_aggr;
20280if (sizeof ac_aggr.st_gen)
20281return 0;
20282 ;
20283 return 0;
20284}
20285_ACEOF
20286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020287if { (ac_try="$ac_compile"
20288case "(($ac_try" in
20289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290 *) ac_try_echo=$ac_try;;
20291esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020294 ac_status=$?
20295 grep -v '^ *+' conftest.er1 >conftest.err
20296 rm -f conftest.er1
20297 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299 (exit $ac_status); } && {
20300 test -z "$ac_c_werror_flag" ||
20301 test ! -s conftest.err
20302 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020303 ac_cv_member_struct_stat_st_gen=yes
20304else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020305 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020306sed 's/^/| /' conftest.$ac_ext >&5
20307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020308 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020310
20311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020313
20314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020315fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020316{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20317echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20318if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020319
20320cat >>confdefs.h <<_ACEOF
20321#define HAVE_STRUCT_STAT_ST_GEN 1
20322_ACEOF
20323
20324
20325fi
20326
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020327{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20328echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020329if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020331else
20332 cat >conftest.$ac_ext <<_ACEOF
20333/* confdefs.h. */
20334_ACEOF
20335cat confdefs.h >>conftest.$ac_ext
20336cat >>conftest.$ac_ext <<_ACEOF
20337/* end confdefs.h. */
20338$ac_includes_default
20339int
20340main ()
20341{
20342static struct stat ac_aggr;
20343if (ac_aggr.st_birthtime)
20344return 0;
20345 ;
20346 return 0;
20347}
20348_ACEOF
20349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020350if { (ac_try="$ac_compile"
20351case "(($ac_try" in
20352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20353 *) ac_try_echo=$ac_try;;
20354esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020357 ac_status=$?
20358 grep -v '^ *+' conftest.er1 >conftest.err
20359 rm -f conftest.er1
20360 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020362 (exit $ac_status); } && {
20363 test -z "$ac_c_werror_flag" ||
20364 test ! -s conftest.err
20365 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020366 ac_cv_member_struct_stat_st_birthtime=yes
20367else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020368 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020369sed 's/^/| /' conftest.$ac_ext >&5
20370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020372/* confdefs.h. */
20373_ACEOF
20374cat confdefs.h >>conftest.$ac_ext
20375cat >>conftest.$ac_ext <<_ACEOF
20376/* end confdefs.h. */
20377$ac_includes_default
20378int
20379main ()
20380{
20381static struct stat ac_aggr;
20382if (sizeof ac_aggr.st_birthtime)
20383return 0;
20384 ;
20385 return 0;
20386}
20387_ACEOF
20388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020389if { (ac_try="$ac_compile"
20390case "(($ac_try" in
20391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20392 *) ac_try_echo=$ac_try;;
20393esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020396 ac_status=$?
20397 grep -v '^ *+' conftest.er1 >conftest.err
20398 rm -f conftest.er1
20399 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020401 (exit $ac_status); } && {
20402 test -z "$ac_c_werror_flag" ||
20403 test ! -s conftest.err
20404 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020405 ac_cv_member_struct_stat_st_birthtime=yes
20406else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020407 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020408sed 's/^/| /' conftest.$ac_ext >&5
20409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412
20413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415
20416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020417fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020418{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20419echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20420if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020421
20422cat >>confdefs.h <<_ACEOF
20423#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20424_ACEOF
20425
20426
20427fi
20428
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020429{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20430echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020431if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020433else
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020435/* confdefs.h. */
20436_ACEOF
20437cat confdefs.h >>conftest.$ac_ext
20438cat >>conftest.$ac_ext <<_ACEOF
20439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020440$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020441int
20442main ()
20443{
20444static struct stat ac_aggr;
20445if (ac_aggr.st_blocks)
20446return 0;
20447 ;
20448 return 0;
20449}
20450_ACEOF
20451rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020452if { (ac_try="$ac_compile"
20453case "(($ac_try" in
20454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20455 *) ac_try_echo=$ac_try;;
20456esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020460 grep -v '^ *+' conftest.er1 >conftest.err
20461 rm -f conftest.er1
20462 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020464 (exit $ac_status); } && {
20465 test -z "$ac_c_werror_flag" ||
20466 test ! -s conftest.err
20467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020468 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020469else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020471sed 's/^/| /' conftest.$ac_ext >&5
20472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020474/* confdefs.h. */
20475_ACEOF
20476cat confdefs.h >>conftest.$ac_ext
20477cat >>conftest.$ac_ext <<_ACEOF
20478/* end confdefs.h. */
20479$ac_includes_default
20480int
20481main ()
20482{
20483static struct stat ac_aggr;
20484if (sizeof ac_aggr.st_blocks)
20485return 0;
20486 ;
20487 return 0;
20488}
20489_ACEOF
20490rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491if { (ac_try="$ac_compile"
20492case "(($ac_try" in
20493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494 *) ac_try_echo=$ac_try;;
20495esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020497 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020499 grep -v '^ *+' conftest.er1 >conftest.err
20500 rm -f conftest.er1
20501 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020503 (exit $ac_status); } && {
20504 test -z "$ac_c_werror_flag" ||
20505 test ! -s conftest.err
20506 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020507 ac_cv_member_struct_stat_st_blocks=yes
20508else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020510sed 's/^/| /' conftest.$ac_ext >&5
20511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020512 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020514
20515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020517
20518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020519fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020520{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20521echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20522if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020523
Martin v. Löwis11437992002-04-12 09:54:03 +000020524cat >>confdefs.h <<_ACEOF
20525#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20526_ACEOF
20527
20528
20529cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020530#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020531_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020532
20533else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020534 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020535 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20537 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020538esac
20539
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020540fi
20541
Michael W. Hudson54241132001-12-07 15:38:26 +000020542
Martin v. Löwis11437992002-04-12 09:54:03 +000020543
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020544{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20545echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020546if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020548else
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020550/* confdefs.h. */
20551_ACEOF
20552cat confdefs.h >>conftest.$ac_ext
20553cat >>conftest.$ac_ext <<_ACEOF
20554/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020555#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020556int
20557main ()
20558{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020559return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 ;
20561 return 0;
20562}
20563_ACEOF
20564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020565if { (ac_try="$ac_compile"
20566case "(($ac_try" in
20567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20568 *) ac_try_echo=$ac_try;;
20569esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020573 grep -v '^ *+' conftest.er1 >conftest.err
20574 rm -f conftest.er1
20575 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020577 (exit $ac_status); } && {
20578 test -z "$ac_c_werror_flag" ||
20579 test ! -s conftest.err
20580 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020581 ac_cv_header_time_altzone=yes
20582else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020584sed 's/^/| /' conftest.$ac_ext >&5
20585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020586 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020587fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20590fi
20591
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020592{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20593echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020594if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020595
20596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020597#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020598_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020599
20600fi
20601
Guido van Rossumda88dad1995-01-26 00:46:29 +000020602was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020603{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20604echo $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 +000020605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020606/* confdefs.h. */
20607_ACEOF
20608cat confdefs.h >>conftest.$ac_ext
20609cat >>conftest.$ac_ext <<_ACEOF
20610/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020611
20612#include <sys/types.h>
20613#include <sys/select.h>
20614#include <sys/time.h>
20615
Martin v. Löwis11437992002-04-12 09:54:03 +000020616int
20617main ()
20618{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020619;
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 ;
20621 return 0;
20622}
20623_ACEOF
20624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625if { (ac_try="$ac_compile"
20626case "(($ac_try" in
20627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20628 *) ac_try_echo=$ac_try;;
20629esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020633 grep -v '^ *+' conftest.er1 >conftest.err
20634 rm -f conftest.er1
20635 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020637 (exit $ac_status); } && {
20638 test -z "$ac_c_werror_flag" ||
20639 test ! -s conftest.err
20640 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020641
20642
20643cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020644#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020645_ACEOF
20646
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020647 was_it_defined=yes
20648
Guido van Rossumf78abae1997-01-21 22:02:36 +000020649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020651sed 's/^/| /' conftest.$ac_ext >&5
20652
Thomas Wouters477c8d52006-05-27 19:21:47 +000020653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020654fi
20655
20656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020657{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20658echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020659
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020660{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20661echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020662if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664else
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020666/* confdefs.h. */
20667_ACEOF
20668cat confdefs.h >>conftest.$ac_ext
20669cat >>conftest.$ac_ext <<_ACEOF
20670/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020671
20672# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020673int
20674main ()
20675{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020676struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 ;
20678 return 0;
20679}
20680_ACEOF
20681rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682if { (ac_try="$ac_compile"
20683case "(($ac_try" in
20684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20685 *) ac_try_echo=$ac_try;;
20686esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020690 grep -v '^ *+' conftest.er1 >conftest.err
20691 rm -f conftest.er1
20692 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020694 (exit $ac_status); } && {
20695 test -z "$ac_c_werror_flag" ||
20696 test ! -s conftest.err
20697 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020698 ac_cv_struct_addrinfo=yes
20699else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020701sed 's/^/| /' conftest.$ac_ext >&5
20702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020703 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020704fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20707fi
20708
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020709{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20710echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020711if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020712
20713cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020714#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020715_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020716
20717fi
20718
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020719{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20720echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020721if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020722 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020723else
Martin v. Löwis11437992002-04-12 09:54:03 +000020724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020725/* confdefs.h. */
20726_ACEOF
20727cat confdefs.h >>conftest.$ac_ext
20728cat >>conftest.$ac_ext <<_ACEOF
20729/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020730
20731# include <sys/types.h>
20732# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020733int
20734main ()
20735{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020736struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 ;
20738 return 0;
20739}
20740_ACEOF
20741rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742if { (ac_try="$ac_compile"
20743case "(($ac_try" in
20744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20745 *) ac_try_echo=$ac_try;;
20746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020750 grep -v '^ *+' conftest.er1 >conftest.err
20751 rm -f conftest.er1
20752 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020754 (exit $ac_status); } && {
20755 test -z "$ac_c_werror_flag" ||
20756 test ! -s conftest.err
20757 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020758 ac_cv_struct_sockaddr_storage=yes
20759else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020761sed 's/^/| /' conftest.$ac_ext >&5
20762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020763 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020764fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20767fi
20768
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020769{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20770echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020771if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020772
20773cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020774#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020775_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020776
20777fi
20778
Guido van Rossum627b2d71993-12-24 10:39:16 +000020779# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020780
Michael W. Hudson54241132001-12-07 15:38:26 +000020781
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020782{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20783echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020784if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020785 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020786else
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020788/* confdefs.h. */
20789_ACEOF
20790cat confdefs.h >>conftest.$ac_ext
20791cat >>conftest.$ac_ext <<_ACEOF
20792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020794int
20795main ()
20796{
20797static int test_array [1 - 2 * !(((char) -1) < 0)];
20798test_array [0] = 0
20799
20800 ;
20801 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020802}
Martin v. Löwis11437992002-04-12 09:54:03 +000020803_ACEOF
20804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805if { (ac_try="$ac_compile"
20806case "(($ac_try" in
20807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20808 *) ac_try_echo=$ac_try;;
20809esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020813 grep -v '^ *+' conftest.er1 >conftest.err
20814 rm -f conftest.er1
20815 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020817 (exit $ac_status); } && {
20818 test -z "$ac_c_werror_flag" ||
20819 test ! -s conftest.err
20820 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020821 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020822else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020824sed 's/^/| /' conftest.$ac_ext >&5
20825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020826 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020828
20829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020830fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020831{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20832echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020833if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020835#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020836_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020837
20838fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020839
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020840{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20841echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020842if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020844else
20845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020846/* confdefs.h. */
20847_ACEOF
20848cat confdefs.h >>conftest.$ac_ext
20849cat >>conftest.$ac_ext <<_ACEOF
20850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020851
Martin v. Löwis11437992002-04-12 09:54:03 +000020852int
20853main ()
20854{
20855/* FIXME: Include the comments suggested by Paul. */
20856#ifndef __cplusplus
20857 /* Ultrix mips cc rejects this. */
20858 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020859 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020861 char const *const *pcpcc;
20862 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 /* NEC SVR4.0.2 mips cc rejects this. */
20864 struct point {int x, y;};
20865 static struct point const zero = {0,0};
20866 /* AIX XL C 1.02.0.0 rejects this.
20867 It does not let you subtract one const X* pointer from another in
20868 an arm of an if-expression whose if-part is not a constant
20869 expression */
20870 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020871 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873 ++pcpcc;
20874 ppc = (char**) pcpcc;
20875 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020876 { /* SCO 3.2v4 cc rejects this. */
20877 char *t;
20878 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020879
Martin v. Löwis11437992002-04-12 09:54:03 +000020880 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020881 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020882 }
20883 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20884 int x[] = {25, 17};
20885 const int *foo = &x[0];
20886 ++foo;
20887 }
20888 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20889 typedef const int *iptr;
20890 iptr p = 0;
20891 ++p;
20892 }
20893 { /* AIX XL C 1.02.0.0 rejects this saying
20894 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20895 struct s { int j; const int *ap[3]; };
20896 struct s *b; b->j = 5;
20897 }
20898 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20899 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020900 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020901 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020902 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020903#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020904
Martin v. Löwis11437992002-04-12 09:54:03 +000020905 ;
20906 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020907}
Martin v. Löwis11437992002-04-12 09:54:03 +000020908_ACEOF
20909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910if { (ac_try="$ac_compile"
20911case "(($ac_try" in
20912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20913 *) ac_try_echo=$ac_try;;
20914esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020918 grep -v '^ *+' conftest.er1 >conftest.err
20919 rm -f conftest.er1
20920 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020922 (exit $ac_status); } && {
20923 test -z "$ac_c_werror_flag" ||
20924 test ! -s conftest.err
20925 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020926 ac_cv_c_const=yes
20927else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020929sed 's/^/| /' conftest.$ac_ext >&5
20930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020933
20934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020935fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020936{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20937echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020938if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020939
20940cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020941#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020942_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020943
20944fi
20945
Michael W. Hudson54241132001-12-07 15:38:26 +000020946
Guido van Rossumda88dad1995-01-26 00:46:29 +000020947works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020948{ echo "$as_me:$LINENO: checking for working volatile" >&5
20949echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020951/* confdefs.h. */
20952_ACEOF
20953cat confdefs.h >>conftest.$ac_ext
20954cat >>conftest.$ac_ext <<_ACEOF
20955/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020956
Martin v. Löwis11437992002-04-12 09:54:03 +000020957int
20958main ()
20959{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020960volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 ;
20962 return 0;
20963}
20964_ACEOF
20965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966if { (ac_try="$ac_compile"
20967case "(($ac_try" in
20968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20969 *) ac_try_echo=$ac_try;;
20970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020974 grep -v '^ *+' conftest.er1 >conftest.err
20975 rm -f conftest.er1
20976 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020978 (exit $ac_status); } && {
20979 test -z "$ac_c_werror_flag" ||
20980 test ! -s conftest.err
20981 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020982 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020983else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020985sed 's/^/| /' conftest.$ac_ext >&5
20986
Martin v. Löwis11437992002-04-12 09:54:03 +000020987
20988cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020989#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020990_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020991
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020992
Guido van Rossum627b2d71993-12-24 10:39:16 +000020993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994
20995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020996{ echo "$as_me:$LINENO: result: $works" >&5
20997echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020998
Guido van Rossumda88dad1995-01-26 00:46:29 +000020999works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021000{ echo "$as_me:$LINENO: checking for working signed char" >&5
21001echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021003/* confdefs.h. */
21004_ACEOF
21005cat confdefs.h >>conftest.$ac_ext
21006cat >>conftest.$ac_ext <<_ACEOF
21007/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021008
Martin v. Löwis11437992002-04-12 09:54:03 +000021009int
21010main ()
21011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021012signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021013 ;
21014 return 0;
21015}
21016_ACEOF
21017rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021018if { (ac_try="$ac_compile"
21019case "(($ac_try" in
21020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21021 *) ac_try_echo=$ac_try;;
21022esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021026 grep -v '^ *+' conftest.er1 >conftest.err
21027 rm -f conftest.er1
21028 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021030 (exit $ac_status); } && {
21031 test -z "$ac_c_werror_flag" ||
21032 test ! -s conftest.err
21033 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021034 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021035else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021037sed 's/^/| /' conftest.$ac_ext >&5
21038
Martin v. Löwis11437992002-04-12 09:54:03 +000021039
21040cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021041#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021042_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021043
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021044
Guido van Rossum7f43da71994-08-01 12:15:30 +000021045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021046
21047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021048{ echo "$as_me:$LINENO: result: $works" >&5
21049echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021050
Guido van Rossumda88dad1995-01-26 00:46:29 +000021051have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021052{ echo "$as_me:$LINENO: checking for prototypes" >&5
21053echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021055/* confdefs.h. */
21056_ACEOF
21057cat confdefs.h >>conftest.$ac_ext
21058cat >>conftest.$ac_ext <<_ACEOF
21059/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021060int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021061int
21062main ()
21063{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021064return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 ;
21066 return 0;
21067}
21068_ACEOF
21069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021070if { (ac_try="$ac_compile"
21071case "(($ac_try" in
21072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21073 *) ac_try_echo=$ac_try;;
21074esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021078 grep -v '^ *+' conftest.er1 >conftest.err
21079 rm -f conftest.er1
21080 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021082 (exit $ac_status); } && {
21083 test -z "$ac_c_werror_flag" ||
21084 test ! -s conftest.err
21085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021086
21087
21088cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021089#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021090_ACEOF
21091
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021092 have_prototypes=yes
21093
Guido van Rossumf78abae1997-01-21 22:02:36 +000021094else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021096sed 's/^/| /' conftest.$ac_ext >&5
21097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021098
Guido van Rossum7f43da71994-08-01 12:15:30 +000021099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021100
21101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021102{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21103echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021104
Guido van Rossumda88dad1995-01-26 00:46:29 +000021105works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021106{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21107echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021109/* confdefs.h. */
21110_ACEOF
21111cat confdefs.h >>conftest.$ac_ext
21112cat >>conftest.$ac_ext <<_ACEOF
21113/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021114
21115#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021116int foo(int x, ...) {
21117 va_list va;
21118 va_start(va, x);
21119 va_arg(va, int);
21120 va_arg(va, char *);
21121 va_arg(va, double);
21122 return 0;
21123}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021124
Martin v. Löwis11437992002-04-12 09:54:03 +000021125int
21126main ()
21127{
Guido van Rossum90eea071996-08-30 20:58:57 +000021128return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021129 ;
21130 return 0;
21131}
21132_ACEOF
21133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021134if { (ac_try="$ac_compile"
21135case "(($ac_try" in
21136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21137 *) ac_try_echo=$ac_try;;
21138esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021142 grep -v '^ *+' conftest.er1 >conftest.err
21143 rm -f conftest.er1
21144 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021146 (exit $ac_status); } && {
21147 test -z "$ac_c_werror_flag" ||
21148 test ! -s conftest.err
21149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021150
21151
21152cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021153#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021154_ACEOF
21155
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021156 works=yes
21157
Guido van Rossumf78abae1997-01-21 22:02:36 +000021158else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021160sed 's/^/| /' conftest.$ac_ext >&5
21161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021162
Guido van Rossum627b2d71993-12-24 10:39:16 +000021163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021164
21165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021166{ echo "$as_me:$LINENO: result: $works" >&5
21167echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021168
Martin v. Löwisd6320502004-08-12 13:45:08 +000021169# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021170{ echo "$as_me:$LINENO: checking for socketpair" >&5
21171echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021172cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021173/* confdefs.h. */
21174_ACEOF
21175cat confdefs.h >>conftest.$ac_ext
21176cat >>conftest.$ac_ext <<_ACEOF
21177/* end confdefs.h. */
21178
21179#include <sys/types.h>
21180#include <sys/socket.h>
21181
21182int
21183main ()
21184{
21185void *x=socketpair
21186 ;
21187 return 0;
21188}
21189_ACEOF
21190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021191if { (ac_try="$ac_compile"
21192case "(($ac_try" in
21193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21194 *) ac_try_echo=$ac_try;;
21195esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021199 grep -v '^ *+' conftest.er1 >conftest.err
21200 rm -f conftest.er1
21201 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021203 (exit $ac_status); } && {
21204 test -z "$ac_c_werror_flag" ||
21205 test ! -s conftest.err
21206 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021207
21208cat >>confdefs.h <<\_ACEOF
21209#define HAVE_SOCKETPAIR 1
21210_ACEOF
21211
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021212 { echo "$as_me:$LINENO: result: yes" >&5
21213echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021214else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021215 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021216sed 's/^/| /' conftest.$ac_ext >&5
21217
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021218 { echo "$as_me:$LINENO: result: no" >&5
21219echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021220
21221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021222
21223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021224
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021225# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021226{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21227echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021229/* confdefs.h. */
21230_ACEOF
21231cat confdefs.h >>conftest.$ac_ext
21232cat >>conftest.$ac_ext <<_ACEOF
21233/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021234#include <sys/types.h>
21235#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021236int
21237main ()
21238{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021239struct sockaddr x;
21240x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 ;
21242 return 0;
21243}
21244_ACEOF
21245rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021246if { (ac_try="$ac_compile"
21247case "(($ac_try" in
21248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21249 *) ac_try_echo=$ac_try;;
21250esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021254 grep -v '^ *+' conftest.er1 >conftest.err
21255 rm -f conftest.er1
21256 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258 (exit $ac_status); } && {
21259 test -z "$ac_c_werror_flag" ||
21260 test ! -s conftest.err
21261 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021262 { echo "$as_me:$LINENO: result: yes" >&5
21263echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021264
21265cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021267_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021268
21269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021271sed 's/^/| /' conftest.$ac_ext >&5
21272
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021273 { echo "$as_me:$LINENO: result: no" >&5
21274echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276
21277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021278
Guido van Rossumda88dad1995-01-26 00:46:29 +000021279va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021280{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21281echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021283/* confdefs.h. */
21284_ACEOF
21285cat confdefs.h >>conftest.$ac_ext
21286cat >>conftest.$ac_ext <<_ACEOF
21287/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021288
21289#ifdef HAVE_STDARG_PROTOTYPES
21290#include <stdarg.h>
21291#else
21292#include <varargs.h>
21293#endif
21294
Martin v. Löwis11437992002-04-12 09:54:03 +000021295int
21296main ()
21297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021298va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021299 ;
21300 return 0;
21301}
21302_ACEOF
21303rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021304if { (ac_try="$ac_compile"
21305case "(($ac_try" in
21306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21307 *) ac_try_echo=$ac_try;;
21308esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021312 grep -v '^ *+' conftest.er1 >conftest.err
21313 rm -f conftest.er1
21314 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316 (exit $ac_status); } && {
21317 test -z "$ac_c_werror_flag" ||
21318 test ! -s conftest.err
21319 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021320 :
21321else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021323sed 's/^/| /' conftest.$ac_ext >&5
21324
Martin v. Löwis11437992002-04-12 09:54:03 +000021325
21326
21327cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021328#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021329_ACEOF
21330
Guido van Rossumda88dad1995-01-26 00:46:29 +000021331 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021334
21335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021336{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21337echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021339# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021340
21341
21342
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021343{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21344echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021345if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021347else
Martin v. Löwis11437992002-04-12 09:54:03 +000021348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021349/* confdefs.h. */
21350_ACEOF
21351cat confdefs.h >>conftest.$ac_ext
21352cat >>conftest.$ac_ext <<_ACEOF
21353/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021354/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21355 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21356#define gethostbyname_r innocuous_gethostbyname_r
21357
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021358/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021359 which can conflict with char gethostbyname_r (); below.
21360 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021361 <limits.h> exists even on freestanding compilers. */
21362
21363#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021364# include <limits.h>
21365#else
21366# include <assert.h>
21367#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021368
21369#undef gethostbyname_r
21370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021371/* Override any GCC internal prototype to avoid an error.
21372 Use char because int might match the return type of a GCC
21373 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021374#ifdef __cplusplus
21375extern "C"
21376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021377char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021378/* The GNU C library defines this for functions which it implements
21379 to always fail with ENOSYS. Some functions are actually named
21380 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021381#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021382choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021383#endif
21384
Skip Montanaro6dead952003-09-25 14:50:04 +000021385int
21386main ()
21387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021388return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ;
21390 return 0;
21391}
21392_ACEOF
21393rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394if { (ac_try="$ac_link"
21395case "(($ac_try" in
21396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21397 *) ac_try_echo=$ac_try;;
21398esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021402 grep -v '^ *+' conftest.er1 >conftest.err
21403 rm -f conftest.er1
21404 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021406 (exit $ac_status); } && {
21407 test -z "$ac_c_werror_flag" ||
21408 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021409 } && test -s conftest$ac_exeext &&
21410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021411 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021414sed 's/^/| /' conftest.$ac_ext >&5
21415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021416 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418
21419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021420 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021421fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021422{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21423echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21424if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021425
Martin v. Löwis11437992002-04-12 09:54:03 +000021426 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021427#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021428_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021429
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021430 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21431echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021432 OLD_CFLAGS=$CFLAGS
21433 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021435/* confdefs.h. */
21436_ACEOF
21437cat confdefs.h >>conftest.$ac_ext
21438cat >>conftest.$ac_ext <<_ACEOF
21439/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021440
21441# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021442
Martin v. Löwis11437992002-04-12 09:54:03 +000021443int
21444main ()
21445{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021446
21447 char *name;
21448 struct hostent *he, *res;
21449 char buffer[2048];
21450 int buflen = 2048;
21451 int h_errnop;
21452
21453 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021454
21455 ;
21456 return 0;
21457}
21458_ACEOF
21459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460if { (ac_try="$ac_compile"
21461case "(($ac_try" in
21462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21463 *) ac_try_echo=$ac_try;;
21464esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021468 grep -v '^ *+' conftest.er1 >conftest.err
21469 rm -f conftest.er1
21470 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021472 (exit $ac_status); } && {
21473 test -z "$ac_c_werror_flag" ||
21474 test ! -s conftest.err
21475 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021476
21477 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021478#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021479_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021480
Martin v. Löwis11437992002-04-12 09:54:03 +000021481
21482cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021483#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021484_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021485
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021486 { echo "$as_me:$LINENO: result: yes" >&5
21487echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021488
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021489else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021491sed 's/^/| /' conftest.$ac_ext >&5
21492
Martin v. Löwis11437992002-04-12 09:54:03 +000021493
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021494 { echo "$as_me:$LINENO: result: no" >&5
21495echo "${ECHO_T}no" >&6; }
21496 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21497echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021499/* confdefs.h. */
21500_ACEOF
21501cat confdefs.h >>conftest.$ac_ext
21502cat >>conftest.$ac_ext <<_ACEOF
21503/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021504
21505# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021506
Martin v. Löwis11437992002-04-12 09:54:03 +000021507int
21508main ()
21509{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021510
21511 char *name;
21512 struct hostent *he;
21513 char buffer[2048];
21514 int buflen = 2048;
21515 int h_errnop;
21516
21517 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021518
21519 ;
21520 return 0;
21521}
21522_ACEOF
21523rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021524if { (ac_try="$ac_compile"
21525case "(($ac_try" in
21526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21527 *) ac_try_echo=$ac_try;;
21528esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021532 grep -v '^ *+' conftest.er1 >conftest.err
21533 rm -f conftest.er1
21534 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021536 (exit $ac_status); } && {
21537 test -z "$ac_c_werror_flag" ||
21538 test ! -s conftest.err
21539 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021540
21541 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021542#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021543_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021544
Martin v. Löwis11437992002-04-12 09:54:03 +000021545
21546cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021547#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021548_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021549
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021550 { echo "$as_me:$LINENO: result: yes" >&5
21551echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021553else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021555sed 's/^/| /' conftest.$ac_ext >&5
21556
Martin v. Löwis11437992002-04-12 09:54:03 +000021557
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021558 { echo "$as_me:$LINENO: result: no" >&5
21559echo "${ECHO_T}no" >&6; }
21560 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21561echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021563/* confdefs.h. */
21564_ACEOF
21565cat confdefs.h >>conftest.$ac_ext
21566cat >>conftest.$ac_ext <<_ACEOF
21567/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021568
21569# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021570
Martin v. Löwis11437992002-04-12 09:54:03 +000021571int
21572main ()
21573{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021574
21575 char *name;
21576 struct hostent *he;
21577 struct hostent_data data;
21578
21579 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021580
21581 ;
21582 return 0;
21583}
21584_ACEOF
21585rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021586if { (ac_try="$ac_compile"
21587case "(($ac_try" in
21588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21589 *) ac_try_echo=$ac_try;;
21590esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021594 grep -v '^ *+' conftest.er1 >conftest.err
21595 rm -f conftest.er1
21596 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021598 (exit $ac_status); } && {
21599 test -z "$ac_c_werror_flag" ||
21600 test ! -s conftest.err
21601 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021602
21603 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021604#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021605_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021606
Martin v. Löwis11437992002-04-12 09:54:03 +000021607
21608cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021609#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021610_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021611
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021612 { echo "$as_me:$LINENO: result: yes" >&5
21613echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021615else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021617sed 's/^/| /' conftest.$ac_ext >&5
21618
Martin v. Löwis11437992002-04-12 09:54:03 +000021619
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021620 { echo "$as_me:$LINENO: result: no" >&5
21621echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021624
21625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628
21629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021630
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021632
21633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021634 CFLAGS=$OLD_CFLAGS
21635
21636else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021637
Martin v. Löwis11437992002-04-12 09:54:03 +000021638
21639for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021640do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21642{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021644if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021646else
Martin v. Löwis11437992002-04-12 09:54:03 +000021647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021648/* confdefs.h. */
21649_ACEOF
21650cat confdefs.h >>conftest.$ac_ext
21651cat >>conftest.$ac_ext <<_ACEOF
21652/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021653/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21655#define $ac_func innocuous_$ac_func
21656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021657/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021658 which can conflict with char $ac_func (); below.
21659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021660 <limits.h> exists even on freestanding compilers. */
21661
21662#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021663# include <limits.h>
21664#else
21665# include <assert.h>
21666#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021667
21668#undef $ac_func
21669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021670/* Override any GCC internal prototype to avoid an error.
21671 Use char because int might match the return type of a GCC
21672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021673#ifdef __cplusplus
21674extern "C"
21675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021676char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021677/* The GNU C library defines this for functions which it implements
21678 to always fail with ENOSYS. Some functions are actually named
21679 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021680#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021681choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021682#endif
21683
Skip Montanaro6dead952003-09-25 14:50:04 +000021684int
21685main ()
21686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021687return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021688 ;
21689 return 0;
21690}
21691_ACEOF
21692rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021693if { (ac_try="$ac_link"
21694case "(($ac_try" in
21695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696 *) ac_try_echo=$ac_try;;
21697esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021701 grep -v '^ *+' conftest.er1 >conftest.err
21702 rm -f conftest.er1
21703 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021705 (exit $ac_status); } && {
21706 test -z "$ac_c_werror_flag" ||
21707 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021708 } && test -s conftest$ac_exeext &&
21709 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021710 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021711else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021713sed 's/^/| /' conftest.$ac_ext >&5
21714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021715 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021717
21718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021719 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021721ac_res=`eval echo '${'$as_ac_var'}'`
21722 { echo "$as_me:$LINENO: result: $ac_res" >&5
21723echo "${ECHO_T}$ac_res" >&6; }
21724if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021726#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021727_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021728
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021729fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021730done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021731
Michael W. Hudson54241132001-12-07 15:38:26 +000021732
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021733fi
21734
Michael W. Hudson54241132001-12-07 15:38:26 +000021735
21736
21737
21738
21739
21740
Guido van Rossum627b2d71993-12-24 10:39:16 +000021741# checks for system services
21742# (none yet)
21743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021744# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021745{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21746echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021747if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021748 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021749else
Martin v. Löwis11437992002-04-12 09:54:03 +000021750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021751/* confdefs.h. */
21752_ACEOF
21753cat confdefs.h >>conftest.$ac_ext
21754cat >>conftest.$ac_ext <<_ACEOF
21755/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021756/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21758#define __fpu_control innocuous___fpu_control
21759
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021761 which can conflict with char __fpu_control (); below.
21762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021763 <limits.h> exists even on freestanding compilers. */
21764
21765#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021766# include <limits.h>
21767#else
21768# include <assert.h>
21769#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021770
21771#undef __fpu_control
21772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021773/* Override any GCC internal prototype to avoid an error.
21774 Use char because int might match the return type of a GCC
21775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021776#ifdef __cplusplus
21777extern "C"
21778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021779char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021780/* The GNU C library defines this for functions which it implements
21781 to always fail with ENOSYS. Some functions are actually named
21782 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021783#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021784choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021785#endif
21786
Skip Montanaro6dead952003-09-25 14:50:04 +000021787int
21788main ()
21789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021790return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021791 ;
21792 return 0;
21793}
21794_ACEOF
21795rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021796if { (ac_try="$ac_link"
21797case "(($ac_try" in
21798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21799 *) ac_try_echo=$ac_try;;
21800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021804 grep -v '^ *+' conftest.er1 >conftest.err
21805 rm -f conftest.er1
21806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021808 (exit $ac_status); } && {
21809 test -z "$ac_c_werror_flag" ||
21810 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021811 } && test -s conftest$ac_exeext &&
21812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021813 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021814else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021816sed 's/^/| /' conftest.$ac_ext >&5
21817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021818 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021820
21821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021822 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021823fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021824{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21825echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21826if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021827 :
21828else
Martin v. Löwis11437992002-04-12 09:54:03 +000021829
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021830{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21831echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021832if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021833 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021834else
Martin v. Löwis11437992002-04-12 09:54:03 +000021835 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021836LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021837cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021838/* confdefs.h. */
21839_ACEOF
21840cat confdefs.h >>conftest.$ac_ext
21841cat >>conftest.$ac_ext <<_ACEOF
21842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021844/* Override any GCC internal prototype to avoid an error.
21845 Use char because int might match the return type of a GCC
21846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021847#ifdef __cplusplus
21848extern "C"
21849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021850char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021851int
21852main ()
21853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021854return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021855 ;
21856 return 0;
21857}
21858_ACEOF
21859rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021860if { (ac_try="$ac_link"
21861case "(($ac_try" in
21862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21863 *) ac_try_echo=$ac_try;;
21864esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021866 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021868 grep -v '^ *+' conftest.er1 >conftest.err
21869 rm -f conftest.er1
21870 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021872 (exit $ac_status); } && {
21873 test -z "$ac_c_werror_flag" ||
21874 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021875 } && test -s conftest$ac_exeext &&
21876 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021877 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021878else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021880sed 's/^/| /' conftest.$ac_ext >&5
21881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021882 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021884
21885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021888fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021889{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21890echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21891if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021892 cat >>confdefs.h <<_ACEOF
21893#define HAVE_LIBIEEE 1
21894_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021896 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021897
Guido van Rossum627b2d71993-12-24 10:39:16 +000021898fi
21899
Michael W. Hudson54241132001-12-07 15:38:26 +000021900
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021901fi
21902
Michael W. Hudson54241132001-12-07 15:38:26 +000021903
Guido van Rossum7f253911997-05-09 02:42:48 +000021904# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021905{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21906echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021908# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021909if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021910 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021911if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021912then
21913
21914cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021915#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021916_ACEOF
21917
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021918 { echo "$as_me:$LINENO: result: yes" >&5
21919echo "${ECHO_T}yes" >&6; }
21920else { echo "$as_me:$LINENO: result: no" >&5
21921echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021922fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021923else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021924 { echo "$as_me:$LINENO: result: no" >&5
21925echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021926fi
21927
Guido van Rossum7f253911997-05-09 02:42:48 +000021928
Guido van Rossum7f43da71994-08-01 12:15:30 +000021929# check for --with-libm=...
21930
Guido van Rossum563e7081996-09-10 18:20:48 +000021931case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021932Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021933*) LIBM=-lm
21934esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021935{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21936echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021938# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021939if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021940 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021941if test "$withval" = no
21942then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021943 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21944echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021945elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021946then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021947 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21948echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21949else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21950echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021951 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021952fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021953else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021954 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21955echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021956fi
21957
Guido van Rossum7f43da71994-08-01 12:15:30 +000021958
21959# check for --with-libc=...
21960
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021961{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21962echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021964# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021965if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021966 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021967if test "$withval" = no
21968then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021969 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21970echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021971elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021972then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021973 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21974echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21975else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21976echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021978fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021979else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021980 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21981echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021982fi
21983
Guido van Rossum7f43da71994-08-01 12:15:30 +000021984
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021985# **************************************************
21986# * Check for various properties of floating point *
21987# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021988
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021989{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21990echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021991if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021992 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021993else
21994
21995if test "$cross_compiling" = yes; then
21996 ac_cv_little_endian_double=no
21997else
21998 cat >conftest.$ac_ext <<_ACEOF
21999/* confdefs.h. */
22000_ACEOF
22001cat confdefs.h >>conftest.$ac_ext
22002cat >>conftest.$ac_ext <<_ACEOF
22003/* end confdefs.h. */
22004
22005#include <string.h>
22006int main() {
22007 double x = 9006104071832581.0;
22008 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22009 return 0;
22010 else
22011 return 1;
22012}
22013
22014_ACEOF
22015rm -f conftest$ac_exeext
22016if { (ac_try="$ac_link"
22017case "(($ac_try" in
22018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22019 *) ac_try_echo=$ac_try;;
22020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022022 (eval "$ac_link") 2>&5
22023 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22026 { (case "(($ac_try" in
22027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22028 *) ac_try_echo=$ac_try;;
22029esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022031 (eval "$ac_try") 2>&5
22032 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022034 (exit $ac_status); }; }; then
22035 ac_cv_little_endian_double=yes
22036else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022037 echo "$as_me: program exited with status $ac_status" >&5
22038echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022039sed 's/^/| /' conftest.$ac_ext >&5
22040
22041( exit $ac_status )
22042ac_cv_little_endian_double=no
22043fi
22044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22045fi
22046
22047
22048fi
22049
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022050{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22051echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022052if test "$ac_cv_little_endian_double" = yes
22053then
22054
22055cat >>confdefs.h <<\_ACEOF
22056#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22057_ACEOF
22058
22059fi
22060
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022061{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22062echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022063if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022064 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022065else
22066
22067if test "$cross_compiling" = yes; then
22068 ac_cv_big_endian_double=no
22069else
22070 cat >conftest.$ac_ext <<_ACEOF
22071/* confdefs.h. */
22072_ACEOF
22073cat confdefs.h >>conftest.$ac_ext
22074cat >>conftest.$ac_ext <<_ACEOF
22075/* end confdefs.h. */
22076
22077#include <string.h>
22078int main() {
22079 double x = 9006104071832581.0;
22080 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22081 return 0;
22082 else
22083 return 1;
22084}
22085
22086_ACEOF
22087rm -f conftest$ac_exeext
22088if { (ac_try="$ac_link"
22089case "(($ac_try" in
22090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22091 *) ac_try_echo=$ac_try;;
22092esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022094 (eval "$ac_link") 2>&5
22095 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22098 { (case "(($ac_try" in
22099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22100 *) ac_try_echo=$ac_try;;
22101esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022103 (eval "$ac_try") 2>&5
22104 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022106 (exit $ac_status); }; }; then
22107 ac_cv_big_endian_double=yes
22108else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022109 echo "$as_me: program exited with status $ac_status" >&5
22110echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022111sed 's/^/| /' conftest.$ac_ext >&5
22112
22113( exit $ac_status )
22114ac_cv_big_endian_double=no
22115fi
22116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22117fi
22118
22119
22120fi
22121
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022122{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22123echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022124if test "$ac_cv_big_endian_double" = yes
22125then
22126
22127cat >>confdefs.h <<\_ACEOF
22128#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22129_ACEOF
22130
22131fi
22132
22133# Some ARM platforms use a mixed-endian representation for doubles.
22134# While Python doesn't currently have full support for these platforms
22135# (see e.g., issue 1762561), we can at least make sure that float <-> string
22136# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022137{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22138echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022139if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022140 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022141else
22142
22143if test "$cross_compiling" = yes; then
22144 ac_cv_mixed_endian_double=no
22145else
22146 cat >conftest.$ac_ext <<_ACEOF
22147/* confdefs.h. */
22148_ACEOF
22149cat confdefs.h >>conftest.$ac_ext
22150cat >>conftest.$ac_ext <<_ACEOF
22151/* end confdefs.h. */
22152
22153#include <string.h>
22154int main() {
22155 double x = 9006104071832581.0;
22156 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22157 return 0;
22158 else
22159 return 1;
22160}
22161
22162_ACEOF
22163rm -f conftest$ac_exeext
22164if { (ac_try="$ac_link"
22165case "(($ac_try" in
22166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22167 *) ac_try_echo=$ac_try;;
22168esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022170 (eval "$ac_link") 2>&5
22171 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22174 { (case "(($ac_try" in
22175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22176 *) ac_try_echo=$ac_try;;
22177esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022179 (eval "$ac_try") 2>&5
22180 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022182 (exit $ac_status); }; }; then
22183 ac_cv_mixed_endian_double=yes
22184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022185 echo "$as_me: program exited with status $ac_status" >&5
22186echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022187sed 's/^/| /' conftest.$ac_ext >&5
22188
22189( exit $ac_status )
22190ac_cv_mixed_endian_double=no
22191fi
22192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22193fi
22194
22195
22196fi
22197
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022198{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22199echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022200if test "$ac_cv_mixed_endian_double" = yes
22201then
22202
22203cat >>confdefs.h <<\_ACEOF
22204#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22205_ACEOF
22206
22207fi
22208
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022209# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022210# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022211# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022212# rounding; this is a problem on x86, where the x87 FPU has a default
22213# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22214# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022215if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22216then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022217 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022218 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022219 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22220echo $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 +000022221 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022222/* confdefs.h. */
22223_ACEOF
22224cat confdefs.h >>conftest.$ac_ext
22225cat >>conftest.$ac_ext <<_ACEOF
22226/* end confdefs.h. */
22227
22228int
22229main ()
22230{
22231
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022232 unsigned short cw;
22233 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22234 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022235
22236 ;
22237 return 0;
22238}
22239_ACEOF
22240rm -f conftest.$ac_objext
22241if { (ac_try="$ac_compile"
22242case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022247 (eval "$ac_compile") 2>conftest.er1
22248 ac_status=$?
22249 grep -v '^ *+' conftest.er1 >conftest.err
22250 rm -f conftest.er1
22251 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022253 (exit $ac_status); } && {
22254 test -z "$ac_c_werror_flag" ||
22255 test ! -s conftest.err
22256 } && test -s conftest.$ac_objext; then
22257 have_gcc_asm_for_x87=yes
22258else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022259 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022260sed 's/^/| /' conftest.$ac_ext >&5
22261
22262 have_gcc_asm_for_x87=no
22263fi
22264
22265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022266 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22267echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022268 if test "$have_gcc_asm_for_x87" = yes
22269 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022270
22271cat >>confdefs.h <<\_ACEOF
22272#define HAVE_GCC_ASM_FOR_X87 1
22273_ACEOF
22274
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022275 fi
22276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022277
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022278# Detect whether system arithmetic is subject to x87-style double
22279# rounding issues. The result of this test has little meaning on non
22280# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22281# mode is round-to-nearest and double rounding issues are present, and
22282# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022283{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22284echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022285# $BASECFLAGS may affect the result
22286ac_save_cc="$CC"
22287CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022288if test "$cross_compiling" = yes; then
22289 ac_cv_x87_double_rounding=no
22290else
22291 cat >conftest.$ac_ext <<_ACEOF
22292/* confdefs.h. */
22293_ACEOF
22294cat confdefs.h >>conftest.$ac_ext
22295cat >>conftest.$ac_ext <<_ACEOF
22296/* end confdefs.h. */
22297
22298#include <stdlib.h>
22299#include <math.h>
22300int main() {
22301 volatile double x, y, z;
22302 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22303 x = 0.99999999999999989; /* 1-2**-53 */
22304 y = 1./x;
22305 if (y != 1.)
22306 exit(0);
22307 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22308 x = 1e16;
22309 y = 2.99999;
22310 z = x + y;
22311 if (z != 1e16+4.)
22312 exit(0);
22313 /* both tests show evidence of double rounding */
22314 exit(1);
22315}
22316
22317_ACEOF
22318rm -f conftest$ac_exeext
22319if { (ac_try="$ac_link"
22320case "(($ac_try" in
22321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22322 *) ac_try_echo=$ac_try;;
22323esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022325 (eval "$ac_link") 2>&5
22326 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22329 { (case "(($ac_try" in
22330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22331 *) ac_try_echo=$ac_try;;
22332esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022334 (eval "$ac_try") 2>&5
22335 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022337 (exit $ac_status); }; }; then
22338 ac_cv_x87_double_rounding=no
22339else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022340 echo "$as_me: program exited with status $ac_status" >&5
22341echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022342sed 's/^/| /' conftest.$ac_ext >&5
22343
22344( exit $ac_status )
22345ac_cv_x87_double_rounding=yes
22346fi
22347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22348fi
22349
22350
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022351CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022352{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22353echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022354if test "$ac_cv_x87_double_rounding" = yes
22355then
22356
22357cat >>confdefs.h <<\_ACEOF
22358#define X87_DOUBLE_ROUNDING 1
22359_ACEOF
22360
22361fi
22362
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022363# ************************************
22364# * Check for mathematical functions *
22365# ************************************
22366
22367LIBS_SAVE=$LIBS
22368LIBS="$LIBS $LIBM"
22369
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022370# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22371# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022372{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22373echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022374if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022375 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022376else
22377
22378if test "$cross_compiling" = yes; then
22379 ac_cv_tanh_preserves_zero_sign=no
22380else
22381 cat >conftest.$ac_ext <<_ACEOF
22382/* confdefs.h. */
22383_ACEOF
22384cat confdefs.h >>conftest.$ac_ext
22385cat >>conftest.$ac_ext <<_ACEOF
22386/* end confdefs.h. */
22387
22388#include <math.h>
22389#include <stdlib.h>
22390int main() {
22391 /* return 0 if either negative zeros don't exist
22392 on this platform or if negative zeros exist
22393 and tanh(-0.) == -0. */
22394 if (atan2(0., -1.) == atan2(-0., -1.) ||
22395 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22396 else exit(1);
22397}
22398
22399_ACEOF
22400rm -f conftest$ac_exeext
22401if { (ac_try="$ac_link"
22402case "(($ac_try" in
22403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22404 *) ac_try_echo=$ac_try;;
22405esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022407 (eval "$ac_link") 2>&5
22408 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22411 { (case "(($ac_try" in
22412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22413 *) ac_try_echo=$ac_try;;
22414esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022416 (eval "$ac_try") 2>&5
22417 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022419 (exit $ac_status); }; }; then
22420 ac_cv_tanh_preserves_zero_sign=yes
22421else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022422 echo "$as_me: program exited with status $ac_status" >&5
22423echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022424sed 's/^/| /' conftest.$ac_ext >&5
22425
22426( exit $ac_status )
22427ac_cv_tanh_preserves_zero_sign=no
22428fi
22429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22430fi
22431
22432
22433fi
22434
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022435{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22436echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022437if test "$ac_cv_tanh_preserves_zero_sign" = yes
22438then
22439
22440cat >>confdefs.h <<\_ACEOF
22441#define TANH_PRESERVES_ZERO_SIGN 1
22442_ACEOF
22443
22444fi
22445
22446
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022447
Michael W. Hudson54241132001-12-07 15:38:26 +000022448
Christian Heimes99170a52007-12-19 02:07:34 +000022449
22450
22451
22452
22453
Mark Dickinsonf2537862009-04-18 13:58:18 +000022454
22455for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022456do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022457as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22458{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22459echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022460if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022461 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022462else
22463 cat >conftest.$ac_ext <<_ACEOF
22464/* confdefs.h. */
22465_ACEOF
22466cat confdefs.h >>conftest.$ac_ext
22467cat >>conftest.$ac_ext <<_ACEOF
22468/* end confdefs.h. */
22469/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22470 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22471#define $ac_func innocuous_$ac_func
22472
22473/* System header to define __stub macros and hopefully few prototypes,
22474 which can conflict with char $ac_func (); below.
22475 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22476 <limits.h> exists even on freestanding compilers. */
22477
22478#ifdef __STDC__
22479# include <limits.h>
22480#else
22481# include <assert.h>
22482#endif
22483
22484#undef $ac_func
22485
22486/* Override any GCC internal prototype to avoid an error.
22487 Use char because int might match the return type of a GCC
22488 builtin and then its argument prototype would still apply. */
22489#ifdef __cplusplus
22490extern "C"
22491#endif
22492char $ac_func ();
22493/* The GNU C library defines this for functions which it implements
22494 to always fail with ENOSYS. Some functions are actually named
22495 something starting with __ and the normal name is an alias. */
22496#if defined __stub_$ac_func || defined __stub___$ac_func
22497choke me
22498#endif
22499
22500int
22501main ()
22502{
22503return $ac_func ();
22504 ;
22505 return 0;
22506}
22507_ACEOF
22508rm -f conftest.$ac_objext conftest$ac_exeext
22509if { (ac_try="$ac_link"
22510case "(($ac_try" in
22511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22512 *) ac_try_echo=$ac_try;;
22513esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022515 (eval "$ac_link") 2>conftest.er1
22516 ac_status=$?
22517 grep -v '^ *+' conftest.er1 >conftest.err
22518 rm -f conftest.er1
22519 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022521 (exit $ac_status); } && {
22522 test -z "$ac_c_werror_flag" ||
22523 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022524 } && test -s conftest$ac_exeext &&
22525 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022526 eval "$as_ac_var=yes"
22527else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022528 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022529sed 's/^/| /' conftest.$ac_ext >&5
22530
22531 eval "$as_ac_var=no"
22532fi
22533
22534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22535 conftest$ac_exeext conftest.$ac_ext
22536fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022537ac_res=`eval echo '${'$as_ac_var'}'`
22538 { echo "$as_me:$LINENO: result: $ac_res" >&5
22539echo "${ECHO_T}$ac_res" >&6; }
22540if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022541 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022542#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022543_ACEOF
22544
22545fi
22546done
22547
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022548{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22549echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022550if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022551 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022552else
22553 cat >conftest.$ac_ext <<_ACEOF
22554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
22559#include <math.h>
22560
22561int
22562main ()
22563{
22564#ifndef isinf
22565 (void) isinf;
22566#endif
22567
22568 ;
22569 return 0;
22570}
22571_ACEOF
22572rm -f conftest.$ac_objext
22573if { (ac_try="$ac_compile"
22574case "(($ac_try" in
22575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22576 *) ac_try_echo=$ac_try;;
22577esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022579 (eval "$ac_compile") 2>conftest.er1
22580 ac_status=$?
22581 grep -v '^ *+' conftest.er1 >conftest.err
22582 rm -f conftest.er1
22583 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022585 (exit $ac_status); } && {
22586 test -z "$ac_c_werror_flag" ||
22587 test ! -s conftest.err
22588 } && test -s conftest.$ac_objext; then
22589 ac_cv_have_decl_isinf=yes
22590else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022591 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022592sed 's/^/| /' conftest.$ac_ext >&5
22593
22594 ac_cv_have_decl_isinf=no
22595fi
22596
22597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22598fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022599{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22600echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22601if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022602
22603cat >>confdefs.h <<_ACEOF
22604#define HAVE_DECL_ISINF 1
22605_ACEOF
22606
22607
22608else
22609 cat >>confdefs.h <<_ACEOF
22610#define HAVE_DECL_ISINF 0
22611_ACEOF
22612
22613
22614fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022615{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22616echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022617if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022618 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022619else
22620 cat >conftest.$ac_ext <<_ACEOF
22621/* confdefs.h. */
22622_ACEOF
22623cat confdefs.h >>conftest.$ac_ext
22624cat >>conftest.$ac_ext <<_ACEOF
22625/* end confdefs.h. */
22626#include <math.h>
22627
22628int
22629main ()
22630{
22631#ifndef isnan
22632 (void) isnan;
22633#endif
22634
22635 ;
22636 return 0;
22637}
22638_ACEOF
22639rm -f conftest.$ac_objext
22640if { (ac_try="$ac_compile"
22641case "(($ac_try" in
22642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22643 *) ac_try_echo=$ac_try;;
22644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022646 (eval "$ac_compile") 2>conftest.er1
22647 ac_status=$?
22648 grep -v '^ *+' conftest.er1 >conftest.err
22649 rm -f conftest.er1
22650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022652 (exit $ac_status); } && {
22653 test -z "$ac_c_werror_flag" ||
22654 test ! -s conftest.err
22655 } && test -s conftest.$ac_objext; then
22656 ac_cv_have_decl_isnan=yes
22657else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022658 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022659sed 's/^/| /' conftest.$ac_ext >&5
22660
22661 ac_cv_have_decl_isnan=no
22662fi
22663
22664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22665fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022666{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22667echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22668if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022669
22670cat >>confdefs.h <<_ACEOF
22671#define HAVE_DECL_ISNAN 1
22672_ACEOF
22673
22674
22675else
22676 cat >>confdefs.h <<_ACEOF
22677#define HAVE_DECL_ISNAN 0
22678_ACEOF
22679
22680
22681fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022682{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22683echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022684if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022685 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022686else
22687 cat >conftest.$ac_ext <<_ACEOF
22688/* confdefs.h. */
22689_ACEOF
22690cat confdefs.h >>conftest.$ac_ext
22691cat >>conftest.$ac_ext <<_ACEOF
22692/* end confdefs.h. */
22693#include <math.h>
22694
22695int
22696main ()
22697{
22698#ifndef isfinite
22699 (void) isfinite;
22700#endif
22701
22702 ;
22703 return 0;
22704}
22705_ACEOF
22706rm -f conftest.$ac_objext
22707if { (ac_try="$ac_compile"
22708case "(($ac_try" in
22709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22710 *) ac_try_echo=$ac_try;;
22711esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022713 (eval "$ac_compile") 2>conftest.er1
22714 ac_status=$?
22715 grep -v '^ *+' conftest.er1 >conftest.err
22716 rm -f conftest.er1
22717 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022719 (exit $ac_status); } && {
22720 test -z "$ac_c_werror_flag" ||
22721 test ! -s conftest.err
22722 } && test -s conftest.$ac_objext; then
22723 ac_cv_have_decl_isfinite=yes
22724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022725 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022726sed 's/^/| /' conftest.$ac_ext >&5
22727
22728 ac_cv_have_decl_isfinite=no
22729fi
22730
22731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22732fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022733{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22734echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22735if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022736
22737cat >>confdefs.h <<_ACEOF
22738#define HAVE_DECL_ISFINITE 1
22739_ACEOF
22740
22741
22742else
22743 cat >>confdefs.h <<_ACEOF
22744#define HAVE_DECL_ISFINITE 0
22745_ACEOF
22746
22747
22748fi
22749
22750
Christian Heimes99170a52007-12-19 02:07:34 +000022751
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022752LIBS=$LIBS_SAVE
22753
Mark Dickinson875ada42009-11-28 12:52:39 +000022754# For multiprocessing module, check that sem_open
22755# actually works. For FreeBSD versions <= 7.2,
22756# the kernel module that provides POSIX semaphores
22757# isn't loaded by default, so an attempt to call
22758# sem_open results in a 'Signal 12' error.
22759{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22760echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22761if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22762 echo $ECHO_N "(cached) $ECHO_C" >&6
22763else
22764 if test "$cross_compiling" = yes; then
22765 ac_cv_posix_semaphores_enabled=yes
22766else
22767 cat >conftest.$ac_ext <<_ACEOF
22768/* confdefs.h. */
22769_ACEOF
22770cat confdefs.h >>conftest.$ac_ext
22771cat >>conftest.$ac_ext <<_ACEOF
22772/* end confdefs.h. */
22773
22774#include <unistd.h>
22775#include <fcntl.h>
22776#include <stdio.h>
22777#include <semaphore.h>
22778#include <sys/stat.h>
22779
22780int main(void) {
22781 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22782 if (a == SEM_FAILED) {
22783 perror("sem_open");
22784 return 1;
22785 }
22786 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022787 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022788 return 0;
22789}
22790
22791_ACEOF
22792rm -f conftest$ac_exeext
22793if { (ac_try="$ac_link"
22794case "(($ac_try" in
22795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22796 *) ac_try_echo=$ac_try;;
22797esac
22798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22799 (eval "$ac_link") 2>&5
22800 ac_status=$?
22801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22803 { (case "(($ac_try" in
22804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22805 *) ac_try_echo=$ac_try;;
22806esac
22807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22808 (eval "$ac_try") 2>&5
22809 ac_status=$?
22810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22811 (exit $ac_status); }; }; then
22812 ac_cv_posix_semaphores_enabled=yes
22813else
22814 echo "$as_me: program exited with status $ac_status" >&5
22815echo "$as_me: failed program was:" >&5
22816sed 's/^/| /' conftest.$ac_ext >&5
22817
22818( exit $ac_status )
22819ac_cv_posix_semaphores_enabled=no
22820fi
22821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22822fi
22823
22824
22825
22826fi
22827
22828{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22829echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22830if test $ac_cv_posix_semaphores_enabled = no
22831then
22832
22833cat >>confdefs.h <<\_ACEOF
22834#define POSIX_SEMAPHORES_NOT_ENABLED 1
22835_ACEOF
22836
22837fi
22838
Mark Dickinson10683072009-04-18 21:18:19 +000022839# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022840{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22841echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022842if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022843 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022844See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022845echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022846See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022847 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022848else
22849 cat >conftest.$ac_ext <<_ACEOF
22850/* confdefs.h. */
22851_ACEOF
22852cat confdefs.h >>conftest.$ac_ext
22853cat >>conftest.$ac_ext <<_ACEOF
22854/* end confdefs.h. */
22855
22856#include <unistd.h>
22857#include <fcntl.h>
22858#include <stdio.h>
22859#include <semaphore.h>
22860#include <sys/stat.h>
22861
22862int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022863 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022864 int count;
22865 int res;
22866 if(a==SEM_FAILED){
22867 perror("sem_open");
22868 return 1;
22869
22870 }
22871 res = sem_getvalue(a, &count);
22872 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022873 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022874 return res==-1 ? 1 : 0;
22875}
22876
22877
22878_ACEOF
22879rm -f conftest$ac_exeext
22880if { (ac_try="$ac_link"
22881case "(($ac_try" in
22882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22883 *) ac_try_echo=$ac_try;;
22884esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022886 (eval "$ac_link") 2>&5
22887 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22890 { (case "(($ac_try" in
22891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22892 *) ac_try_echo=$ac_try;;
22893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022895 (eval "$ac_try") 2>&5
22896 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022898 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022899 { echo "$as_me:$LINENO: result: no" >&5
22900echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022902 echo "$as_me: program exited with status $ac_status" >&5
22903echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022904sed 's/^/| /' conftest.$ac_ext >&5
22905
22906( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022907{ echo "$as_me:$LINENO: result: yes" >&5
22908echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022909
22910cat >>confdefs.h <<\_ACEOF
22911#define HAVE_BROKEN_SEM_GETVALUE 1
22912_ACEOF
22913
22914
22915fi
22916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22917fi
22918
22919
22920
Mark Dickinsonbd792642009-03-18 20:06:12 +000022921# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022922{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22923echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022924# Check whether --enable-big-digits was given.
22925if test "${enable_big_digits+set}" = set; then
22926 enableval=$enable_big_digits; case $enable_big_digits in
22927yes)
22928 enable_big_digits=30 ;;
22929no)
22930 enable_big_digits=15 ;;
2293115|30)
22932 ;;
22933*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022934 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22935echo "$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 +000022936 { (exit 1); exit 1; }; } ;;
22937esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022938{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22939echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022940
22941cat >>confdefs.h <<_ACEOF
22942#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22943_ACEOF
22944
22945
22946else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022947 { echo "$as_me:$LINENO: result: no value specified" >&5
22948echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022949fi
22950
22951
Guido van Rossumef2255b2000-03-10 22:30:29 +000022952# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022953if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022954 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22955echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022956if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022957 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022958fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022959{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22960echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022961else
Martin v. Löwis11437992002-04-12 09:54:03 +000022962 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022963{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22964echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022966/* confdefs.h. */
22967_ACEOF
22968cat confdefs.h >>conftest.$ac_ext
22969cat >>conftest.$ac_ext <<_ACEOF
22970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022971$ac_includes_default
22972#include <wchar.h>
22973_ACEOF
22974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022975if { (ac_try="$ac_compile"
22976case "(($ac_try" in
22977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22978 *) ac_try_echo=$ac_try;;
22979esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022983 grep -v '^ *+' conftest.er1 >conftest.err
22984 rm -f conftest.er1
22985 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022987 (exit $ac_status); } && {
22988 test -z "$ac_c_werror_flag" ||
22989 test ! -s conftest.err
22990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022991 ac_header_compiler=yes
22992else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022994sed 's/^/| /' conftest.$ac_ext >&5
22995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022996 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022998
22999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023000{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23001echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023002
23003# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023004{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23005echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023007/* confdefs.h. */
23008_ACEOF
23009cat confdefs.h >>conftest.$ac_ext
23010cat >>conftest.$ac_ext <<_ACEOF
23011/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023012#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023013_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023014if { (ac_try="$ac_cpp conftest.$ac_ext"
23015case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023020 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023022 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023023 rm -f conftest.er1
23024 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023026 (exit $ac_status); } >/dev/null && {
23027 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23028 test ! -s conftest.err
23029 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 ac_header_preproc=yes
23031else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023033sed 's/^/| /' conftest.$ac_ext >&5
23034
Martin v. Löwis11437992002-04-12 09:54:03 +000023035 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023037
Martin v. Löwis11437992002-04-12 09:54:03 +000023038rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023039{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23040echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023041
23042# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023043case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23044 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023045 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23046echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23047 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23048echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023049 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023050 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023051 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023052 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23053echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23054 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23055echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23056 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23057echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23058 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23059echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23060 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23061echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23062 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23063echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023064 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023065## -------------------------------------- ##
23066## Report this to http://bugs.python.org/ ##
23067## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023068_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023069 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023070 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023071esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023072{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23073echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023074if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023075 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023076else
23077 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023078fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023079{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23080echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023081
23082fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023083if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023084
23085
23086cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023087#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023088_ACEOF
23089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023090 wchar_h="yes"
23091
Guido van Rossumef2255b2000-03-10 22:30:29 +000023092else
Martin v. Löwis11437992002-04-12 09:54:03 +000023093 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023094
23095fi
23096
Michael W. Hudson54241132001-12-07 15:38:26 +000023097
Martin v. Löwis11437992002-04-12 09:54:03 +000023098
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023099# determine wchar_t size
23100if test "$wchar_h" = yes
23101then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023102 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23103echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23104if test "${ac_cv_type_wchar_t+set}" = set; then
23105 echo $ECHO_N "(cached) $ECHO_C" >&6
23106else
23107 cat >conftest.$ac_ext <<_ACEOF
23108/* confdefs.h. */
23109_ACEOF
23110cat confdefs.h >>conftest.$ac_ext
23111cat >>conftest.$ac_ext <<_ACEOF
23112/* end confdefs.h. */
23113#include <wchar.h>
23114
23115typedef wchar_t ac__type_new_;
23116int
23117main ()
23118{
23119if ((ac__type_new_ *) 0)
23120 return 0;
23121if (sizeof (ac__type_new_))
23122 return 0;
23123 ;
23124 return 0;
23125}
23126_ACEOF
23127rm -f conftest.$ac_objext
23128if { (ac_try="$ac_compile"
23129case "(($ac_try" in
23130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23131 *) ac_try_echo=$ac_try;;
23132esac
23133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23134 (eval "$ac_compile") 2>conftest.er1
23135 ac_status=$?
23136 grep -v '^ *+' conftest.er1 >conftest.err
23137 rm -f conftest.er1
23138 cat conftest.err >&5
23139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23140 (exit $ac_status); } && {
23141 test -z "$ac_c_werror_flag" ||
23142 test ! -s conftest.err
23143 } && test -s conftest.$ac_objext; then
23144 ac_cv_type_wchar_t=yes
23145else
23146 echo "$as_me: failed program was:" >&5
23147sed 's/^/| /' conftest.$ac_ext >&5
23148
23149 ac_cv_type_wchar_t=no
23150fi
23151
23152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23153fi
23154{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23155echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23156
23157# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023158# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23159# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23160# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023161{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23162echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023163if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023164 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023165else
Martin v. Löwis11437992002-04-12 09:54:03 +000023166 if test "$cross_compiling" = yes; then
23167 # Depending upon the size, compute the lo and hi bounds.
23168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023169/* confdefs.h. */
23170_ACEOF
23171cat confdefs.h >>conftest.$ac_ext
23172cat >>conftest.$ac_ext <<_ACEOF
23173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023174#include <wchar.h>
23175
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023176 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023177int
23178main ()
23179{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023181test_array [0] = 0
23182
23183 ;
23184 return 0;
23185}
23186_ACEOF
23187rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023188if { (ac_try="$ac_compile"
23189case "(($ac_try" in
23190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23191 *) ac_try_echo=$ac_try;;
23192esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023196 grep -v '^ *+' conftest.er1 >conftest.err
23197 rm -f conftest.er1
23198 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023200 (exit $ac_status); } && {
23201 test -z "$ac_c_werror_flag" ||
23202 test ! -s conftest.err
23203 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023204 ac_lo=0 ac_mid=0
23205 while :; do
23206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023207/* confdefs.h. */
23208_ACEOF
23209cat confdefs.h >>conftest.$ac_ext
23210cat >>conftest.$ac_ext <<_ACEOF
23211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023212#include <wchar.h>
23213
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023214 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023215int
23216main ()
23217{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023219test_array [0] = 0
23220
23221 ;
23222 return 0;
23223}
23224_ACEOF
23225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023226if { (ac_try="$ac_compile"
23227case "(($ac_try" in
23228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23229 *) ac_try_echo=$ac_try;;
23230esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023234 grep -v '^ *+' conftest.er1 >conftest.err
23235 rm -f conftest.er1
23236 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023238 (exit $ac_status); } && {
23239 test -z "$ac_c_werror_flag" ||
23240 test ! -s conftest.err
23241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023242 ac_hi=$ac_mid; break
23243else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023245sed 's/^/| /' conftest.$ac_ext >&5
23246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023247 ac_lo=`expr $ac_mid + 1`
23248 if test $ac_lo -le $ac_mid; then
23249 ac_lo= ac_hi=
23250 break
23251 fi
23252 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023254
23255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023256 done
23257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023259sed 's/^/| /' conftest.$ac_ext >&5
23260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023262/* confdefs.h. */
23263_ACEOF
23264cat confdefs.h >>conftest.$ac_ext
23265cat >>conftest.$ac_ext <<_ACEOF
23266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023267#include <wchar.h>
23268
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023269 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023270int
23271main ()
23272{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023274test_array [0] = 0
23275
23276 ;
23277 return 0;
23278}
23279_ACEOF
23280rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023281if { (ac_try="$ac_compile"
23282case "(($ac_try" in
23283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23284 *) ac_try_echo=$ac_try;;
23285esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023289 grep -v '^ *+' conftest.er1 >conftest.err
23290 rm -f conftest.er1
23291 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023293 (exit $ac_status); } && {
23294 test -z "$ac_c_werror_flag" ||
23295 test ! -s conftest.err
23296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023297 ac_hi=-1 ac_mid=-1
23298 while :; do
23299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023300/* confdefs.h. */
23301_ACEOF
23302cat confdefs.h >>conftest.$ac_ext
23303cat >>conftest.$ac_ext <<_ACEOF
23304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023305#include <wchar.h>
23306
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023307 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023308int
23309main ()
23310{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023312test_array [0] = 0
23313
23314 ;
23315 return 0;
23316}
23317_ACEOF
23318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023319if { (ac_try="$ac_compile"
23320case "(($ac_try" in
23321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23322 *) ac_try_echo=$ac_try;;
23323esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023327 grep -v '^ *+' conftest.er1 >conftest.err
23328 rm -f conftest.er1
23329 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023331 (exit $ac_status); } && {
23332 test -z "$ac_c_werror_flag" ||
23333 test ! -s conftest.err
23334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023335 ac_lo=$ac_mid; break
23336else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023338sed 's/^/| /' conftest.$ac_ext >&5
23339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023340 ac_hi=`expr '(' $ac_mid ')' - 1`
23341 if test $ac_mid -le $ac_hi; then
23342 ac_lo= ac_hi=
23343 break
23344 fi
23345 ac_mid=`expr 2 '*' $ac_mid`
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 done
23350else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023352sed 's/^/| /' conftest.$ac_ext >&5
23353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023354 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023356
23357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023359
23360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023361# Binary search between lo and hi bounds.
23362while test "x$ac_lo" != "x$ac_hi"; do
23363 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023365/* confdefs.h. */
23366_ACEOF
23367cat confdefs.h >>conftest.$ac_ext
23368cat >>conftest.$ac_ext <<_ACEOF
23369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023370#include <wchar.h>
23371
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023372 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023373int
23374main ()
23375{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023377test_array [0] = 0
23378
23379 ;
23380 return 0;
23381}
23382_ACEOF
23383rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023384if { (ac_try="$ac_compile"
23385case "(($ac_try" in
23386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23387 *) ac_try_echo=$ac_try;;
23388esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023392 grep -v '^ *+' conftest.er1 >conftest.err
23393 rm -f conftest.er1
23394 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023396 (exit $ac_status); } && {
23397 test -z "$ac_c_werror_flag" ||
23398 test ! -s conftest.err
23399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023400 ac_hi=$ac_mid
23401else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023403sed 's/^/| /' conftest.$ac_ext >&5
23404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023405 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023407
23408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023409done
23410case $ac_lo in
23411?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023412'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023413 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023414See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023415echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023416See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023417 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023418 else
23419 ac_cv_sizeof_wchar_t=0
23420 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023421esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023422else
Martin v. Löwis11437992002-04-12 09:54:03 +000023423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023424/* confdefs.h. */
23425_ACEOF
23426cat confdefs.h >>conftest.$ac_ext
23427cat >>conftest.$ac_ext <<_ACEOF
23428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023429#include <wchar.h>
23430
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023431 typedef wchar_t ac__type_sizeof_;
23432static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23433static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023434#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023435#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023436int
23437main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023438{
Martin v. Löwis11437992002-04-12 09:54:03 +000023439
23440 FILE *f = fopen ("conftest.val", "w");
23441 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023442 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023443 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023444 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023445 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023446 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023447 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023448 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023449 }
23450 else
23451 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023452 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023453 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023454 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023455 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023456 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023457 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023458
23459 ;
23460 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023461}
Martin v. Löwis11437992002-04-12 09:54:03 +000023462_ACEOF
23463rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023464if { (ac_try="$ac_link"
23465case "(($ac_try" in
23466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23467 *) ac_try_echo=$ac_try;;
23468esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023470 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023471 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023474 { (case "(($ac_try" in
23475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23476 *) ac_try_echo=$ac_try;;
23477esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023479 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023480 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023482 (exit $ac_status); }; }; then
23483 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023485 echo "$as_me: program exited with status $ac_status" >&5
23486echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023487sed 's/^/| /' conftest.$ac_ext >&5
23488
Martin v. Löwis11437992002-04-12 09:54:03 +000023489( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023490if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023491 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023492See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023493echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023494See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023495 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023496 else
23497 ac_cv_sizeof_wchar_t=0
23498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023500rm -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 +000023501fi
23502rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023503fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023504{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23505echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023506
23507
23508
Martin v. Löwis11437992002-04-12 09:54:03 +000023509cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023510#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023511_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023512
Michael W. Hudson54241132001-12-07 15:38:26 +000023513
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023514fi
23515
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023516{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23517echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023518have_ucs4_tcl=no
23519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023520/* confdefs.h. */
23521_ACEOF
23522cat confdefs.h >>conftest.$ac_ext
23523cat >>conftest.$ac_ext <<_ACEOF
23524/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023525
23526#include <tcl.h>
23527#if TCL_UTF_MAX != 6
23528# error "NOT UCS4_TCL"
23529#endif
23530int
23531main ()
23532{
23533
23534 ;
23535 return 0;
23536}
23537_ACEOF
23538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023539if { (ac_try="$ac_compile"
23540case "(($ac_try" in
23541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23542 *) ac_try_echo=$ac_try;;
23543esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023547 grep -v '^ *+' conftest.er1 >conftest.err
23548 rm -f conftest.er1
23549 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023551 (exit $ac_status); } && {
23552 test -z "$ac_c_werror_flag" ||
23553 test ! -s conftest.err
23554 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023555
23556
23557cat >>confdefs.h <<\_ACEOF
23558#define HAVE_UCS4_TCL 1
23559_ACEOF
23560
23561 have_ucs4_tcl=yes
23562
23563else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023565sed 's/^/| /' conftest.$ac_ext >&5
23566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023567
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023569
23570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023571{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23572echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023573
Skip Montanaro6dead952003-09-25 14:50:04 +000023574# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023575if test "$wchar_h" = yes
23576then
23577 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023578 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23579echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023580 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023581 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023582else
23583
23584 if test "$cross_compiling" = yes; then
23585 ac_cv_wchar_t_signed=yes
23586else
23587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023588/* confdefs.h. */
23589_ACEOF
23590cat confdefs.h >>conftest.$ac_ext
23591cat >>conftest.$ac_ext <<_ACEOF
23592/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023593
23594 #include <wchar.h>
23595 int main()
23596 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023597 /* Success: exit code 0 */
23598 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023599 }
23600
23601_ACEOF
23602rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023603if { (ac_try="$ac_link"
23604case "(($ac_try" in
23605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23606 *) ac_try_echo=$ac_try;;
23607esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023609 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023610 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023613 { (case "(($ac_try" in
23614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23615 *) ac_try_echo=$ac_try;;
23616esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023618 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023619 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023621 (exit $ac_status); }; }; then
23622 ac_cv_wchar_t_signed=yes
23623else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023624 echo "$as_me: program exited with status $ac_status" >&5
23625echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023626sed 's/^/| /' conftest.$ac_ext >&5
23627
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023628( exit $ac_status )
23629ac_cv_wchar_t_signed=no
23630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023631rm -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 +000023632fi
23633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023634
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023635fi
23636
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023637 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23638echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023639fi
23640
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023641{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23642echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023643
23644# Check whether --with-wide-unicode was given.
23645if test "${with_wide_unicode+set}" = set; then
23646 withval=$with_wide_unicode;
23647if test "$withval" != no
23648then unicode_size="4"
23649else unicode_size="2"
23650fi
23651
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023652else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023653
Georg Brandl52d168a2008-01-07 18:10:24 +000023654case "$have_ucs4_tcl" in
23655 yes) unicode_size="4" ;;
23656 *) unicode_size="2" ;;
23657esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023658
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023659fi
23660
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023661
23662
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023663
Georg Brandl52d168a2008-01-07 18:10:24 +000023664case "$unicode_size" in
23665 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023666#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023667_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023668 ;;
23669 *) cat >>confdefs.h <<\_ACEOF
23670#define Py_UNICODE_SIZE 2
23671_ACEOF
23672 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023673esac
23674
Michael W. Hudson54241132001-12-07 15:38:26 +000023675
Martin v. Löwis11437992002-04-12 09:54:03 +000023676
23677
Georg Brandl52d168a2008-01-07 18:10:24 +000023678# wchar_t is only usable if it maps to an unsigned type
23679if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023680 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023681then
23682 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023683
Martin v. Löwis11437992002-04-12 09:54:03 +000023684cat >>confdefs.h <<\_ACEOF
23685#define HAVE_USABLE_WCHAR_T 1
23686_ACEOF
23687
Georg Brandl52d168a2008-01-07 18:10:24 +000023688 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023689#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023690_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023691
Georg Brandl52d168a2008-01-07 18:10:24 +000023692elif test "$ac_cv_sizeof_short" = "$unicode_size"
23693then
23694 PY_UNICODE_TYPE="unsigned short"
23695 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023696#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023697_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023698
Georg Brandl52d168a2008-01-07 18:10:24 +000023699elif test "$ac_cv_sizeof_long" = "$unicode_size"
23700then
23701 PY_UNICODE_TYPE="unsigned long"
23702 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023703#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023704_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023705
Georg Brandl52d168a2008-01-07 18:10:24 +000023706else
23707 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023708fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023709{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23710echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023711
23712# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023713{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23714echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023715if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023717else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023718 # See if sys/param.h defines the BYTE_ORDER macro.
23719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023720/* confdefs.h. */
23721_ACEOF
23722cat confdefs.h >>conftest.$ac_ext
23723cat >>conftest.$ac_ext <<_ACEOF
23724/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023725#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023726#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023727
Martin v. Löwis11437992002-04-12 09:54:03 +000023728int
23729main ()
23730{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023731#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23732 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23733 bogus endian macros
23734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023735
23736 ;
23737 return 0;
23738}
23739_ACEOF
23740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023741if { (ac_try="$ac_compile"
23742case "(($ac_try" in
23743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23744 *) ac_try_echo=$ac_try;;
23745esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023749 grep -v '^ *+' conftest.er1 >conftest.err
23750 rm -f conftest.er1
23751 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023753 (exit $ac_status); } && {
23754 test -z "$ac_c_werror_flag" ||
23755 test ! -s conftest.err
23756 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023757 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023759/* confdefs.h. */
23760_ACEOF
23761cat confdefs.h >>conftest.$ac_ext
23762cat >>conftest.$ac_ext <<_ACEOF
23763/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023764#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023765#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023766
Martin v. Löwis11437992002-04-12 09:54:03 +000023767int
23768main ()
23769{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023770#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023771 not big endian
23772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023773
23774 ;
23775 return 0;
23776}
23777_ACEOF
23778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023779if { (ac_try="$ac_compile"
23780case "(($ac_try" in
23781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23782 *) ac_try_echo=$ac_try;;
23783esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023787 grep -v '^ *+' conftest.er1 >conftest.err
23788 rm -f conftest.er1
23789 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023791 (exit $ac_status); } && {
23792 test -z "$ac_c_werror_flag" ||
23793 test ! -s conftest.err
23794 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023795 ac_cv_c_bigendian=yes
23796else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023798sed 's/^/| /' conftest.$ac_ext >&5
23799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023800 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023802
23803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023804else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023806sed 's/^/| /' conftest.$ac_ext >&5
23807
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023808 # It does not; compile a test program.
23809if test "$cross_compiling" = yes; then
23810 # try to guess the endianness by grepping values into an object file
23811 ac_cv_c_bigendian=unknown
23812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023813/* confdefs.h. */
23814_ACEOF
23815cat confdefs.h >>conftest.$ac_ext
23816cat >>conftest.$ac_ext <<_ACEOF
23817/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023818short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23819short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23820void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23821short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23822short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23823void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023824int
23825main ()
23826{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023827 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023828 ;
23829 return 0;
23830}
23831_ACEOF
23832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023833if { (ac_try="$ac_compile"
23834case "(($ac_try" in
23835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23836 *) ac_try_echo=$ac_try;;
23837esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023841 grep -v '^ *+' conftest.er1 >conftest.err
23842 rm -f conftest.er1
23843 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023845 (exit $ac_status); } && {
23846 test -z "$ac_c_werror_flag" ||
23847 test ! -s conftest.err
23848 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023849 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023850 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023851fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023852if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23853 if test "$ac_cv_c_bigendian" = unknown; then
23854 ac_cv_c_bigendian=no
23855 else
23856 # finding both strings is unlikely to happen, but who knows?
23857 ac_cv_c_bigendian=unknown
23858 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023859fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023860else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023862sed 's/^/| /' conftest.$ac_ext >&5
23863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023864
Martin v. Löwis11437992002-04-12 09:54:03 +000023865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023866
23867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023868else
23869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023870/* confdefs.h. */
23871_ACEOF
23872cat confdefs.h >>conftest.$ac_ext
23873cat >>conftest.$ac_ext <<_ACEOF
23874/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023875$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023876int
23877main ()
23878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023879
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023880 /* Are we little or big endian? From Harbison&Steele. */
23881 union
23882 {
23883 long int l;
23884 char c[sizeof (long int)];
23885 } u;
23886 u.l = 1;
23887 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023888
23889 ;
23890 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023891}
Martin v. Löwis11437992002-04-12 09:54:03 +000023892_ACEOF
23893rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023894if { (ac_try="$ac_link"
23895case "(($ac_try" in
23896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23897 *) ac_try_echo=$ac_try;;
23898esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023900 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023901 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023904 { (case "(($ac_try" in
23905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23906 *) ac_try_echo=$ac_try;;
23907esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023909 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023910 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023912 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023913 ac_cv_c_bigendian=no
23914else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023915 echo "$as_me: program exited with status $ac_status" >&5
23916echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023917sed 's/^/| /' conftest.$ac_ext >&5
23918
Martin v. Löwis11437992002-04-12 09:54:03 +000023919( exit $ac_status )
23920ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023922rm -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 +000023923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023924
23925
Martin v. Löwis11437992002-04-12 09:54:03 +000023926fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023927
23928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23929fi
23930{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23931echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23932case $ac_cv_c_bigendian in
23933 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023934
23935cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023936#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023937_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023938 ;;
23939 no)
23940 ;;
23941 *)
23942 { { echo "$as_me:$LINENO: error: unknown endianness
23943presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23944echo "$as_me: error: unknown endianness
23945presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023946 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023947esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023948
Michael W. Hudson54241132001-12-07 15:38:26 +000023949
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023950# Check whether right shifting a negative integer extends the sign bit
23951# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023952{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23953echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023954if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023955 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023956else
Martin v. Löwis11437992002-04-12 09:54:03 +000023957
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023958if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023959 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023960else
Martin v. Löwis11437992002-04-12 09:54:03 +000023961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023962/* confdefs.h. */
23963_ACEOF
23964cat confdefs.h >>conftest.$ac_ext
23965cat >>conftest.$ac_ext <<_ACEOF
23966/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023967
23968int main()
23969{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023970 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023971}
23972
Martin v. Löwis11437992002-04-12 09:54:03 +000023973_ACEOF
23974rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023975if { (ac_try="$ac_link"
23976case "(($ac_try" in
23977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23978 *) ac_try_echo=$ac_try;;
23979esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023981 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023982 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023984 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023985 { (case "(($ac_try" in
23986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23987 *) ac_try_echo=$ac_try;;
23988esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023990 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023991 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023993 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023994 ac_cv_rshift_extends_sign=yes
23995else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023996 echo "$as_me: program exited with status $ac_status" >&5
23997echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023998sed 's/^/| /' conftest.$ac_ext >&5
23999
Martin v. Löwis11437992002-04-12 09:54:03 +000024000( exit $ac_status )
24001ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024003rm -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 +000024004fi
24005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024006
24007fi
24008
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024009{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24010echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024011if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024012then
Martin v. Löwis11437992002-04-12 09:54:03 +000024013
24014cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024015#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024016_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024017
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024018fi
24019
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024020# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024021{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24022echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024023if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024025else
Martin v. Löwis11437992002-04-12 09:54:03 +000024026
24027cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024028/* confdefs.h. */
24029_ACEOF
24030cat confdefs.h >>conftest.$ac_ext
24031cat >>conftest.$ac_ext <<_ACEOF
24032/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024033#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024034int
24035main ()
24036{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024037
24038 FILE *f = fopen("/dev/null", "r");
24039 flockfile(f);
24040 getc_unlocked(f);
24041 funlockfile(f);
24042
Martin v. Löwis11437992002-04-12 09:54:03 +000024043 ;
24044 return 0;
24045}
24046_ACEOF
24047rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024048if { (ac_try="$ac_link"
24049case "(($ac_try" in
24050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24051 *) ac_try_echo=$ac_try;;
24052esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024056 grep -v '^ *+' conftest.er1 >conftest.err
24057 rm -f conftest.er1
24058 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024060 (exit $ac_status); } && {
24061 test -z "$ac_c_werror_flag" ||
24062 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024063 } && test -s conftest$ac_exeext &&
24064 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024065 ac_cv_have_getc_unlocked=yes
24066else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024068sed 's/^/| /' conftest.$ac_ext >&5
24069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024070 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024072
24073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024074 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024075fi
24076
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024077{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24078echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024079if test "$ac_cv_have_getc_unlocked" = yes
24080then
Martin v. Löwis11437992002-04-12 09:54:03 +000024081
24082cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024083#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024084_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024085
24086fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024087
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024088# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024089# save the value of LIBS so we don't actually link Python with readline
24090LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024091
Gregory P. Smith18820942008-09-07 06:24:49 +000024092# On some systems we need to link readline to a termcap compatible
24093# library. NOTE: Keep the precedence of listed libraries synchronised
24094# with setup.py.
24095py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024096{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24097echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024098for py_libtermcap in "" ncursesw ncurses curses termcap; do
24099 if test -z "$py_libtermcap"; then
24100 READLINE_LIBS="-lreadline"
24101 else
24102 READLINE_LIBS="-lreadline -l$py_libtermcap"
24103 fi
24104 LIBS="$READLINE_LIBS $LIBS_no_readline"
24105 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024106/* confdefs.h. */
24107_ACEOF
24108cat confdefs.h >>conftest.$ac_ext
24109cat >>conftest.$ac_ext <<_ACEOF
24110/* end confdefs.h. */
24111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024112/* Override any GCC internal prototype to avoid an error.
24113 Use char because int might match the return type of a GCC
24114 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024115#ifdef __cplusplus
24116extern "C"
24117#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024118char readline ();
24119int
24120main ()
24121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024122return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024123 ;
24124 return 0;
24125}
24126_ACEOF
24127rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024128if { (ac_try="$ac_link"
24129case "(($ac_try" in
24130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24131 *) ac_try_echo=$ac_try;;
24132esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024134 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024135 ac_status=$?
24136 grep -v '^ *+' conftest.er1 >conftest.err
24137 rm -f conftest.er1
24138 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024140 (exit $ac_status); } && {
24141 test -z "$ac_c_werror_flag" ||
24142 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024143 } && test -s conftest$ac_exeext &&
24144 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024145 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024146else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024147 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024148sed 's/^/| /' conftest.$ac_ext >&5
24149
Gregory P. Smith18820942008-09-07 06:24:49 +000024150
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024152
24153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024154 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024155 if test $py_cv_lib_readline = yes; then
24156 break
24157 fi
24158done
24159# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24160#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024161if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024162 { echo "$as_me:$LINENO: result: none" >&5
24163echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024164else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024165 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24166echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024167
24168cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024169#define HAVE_LIBREADLINE 1
24170_ACEOF
24171
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024172fi
24173
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024174# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024175{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24176echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024177if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024178 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024179else
24180 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024181LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024182cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024183/* confdefs.h. */
24184_ACEOF
24185cat confdefs.h >>conftest.$ac_ext
24186cat >>conftest.$ac_ext <<_ACEOF
24187/* end confdefs.h. */
24188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024189/* Override any GCC internal prototype to avoid an error.
24190 Use char because int might match the return type of a GCC
24191 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024192#ifdef __cplusplus
24193extern "C"
24194#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024195char rl_callback_handler_install ();
24196int
24197main ()
24198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024199return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024200 ;
24201 return 0;
24202}
24203_ACEOF
24204rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024205if { (ac_try="$ac_link"
24206case "(($ac_try" in
24207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24208 *) ac_try_echo=$ac_try;;
24209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024211 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024213 grep -v '^ *+' conftest.er1 >conftest.err
24214 rm -f conftest.er1
24215 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024217 (exit $ac_status); } && {
24218 test -z "$ac_c_werror_flag" ||
24219 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024220 } && test -s conftest$ac_exeext &&
24221 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024222 ac_cv_lib_readline_rl_callback_handler_install=yes
24223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024224 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024225sed 's/^/| /' conftest.$ac_ext >&5
24226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024227 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024229
24230rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024231 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024232LIBS=$ac_check_lib_save_LIBS
24233fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024234{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24235echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24236if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024237
24238cat >>confdefs.h <<\_ACEOF
24239#define HAVE_RL_CALLBACK 1
24240_ACEOF
24241
24242fi
24243
24244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024245# check for readline 2.2
24246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024247/* confdefs.h. */
24248_ACEOF
24249cat confdefs.h >>conftest.$ac_ext
24250cat >>conftest.$ac_ext <<_ACEOF
24251/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024252#include <readline/readline.h>
24253_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024254if { (ac_try="$ac_cpp conftest.$ac_ext"
24255case "(($ac_try" in
24256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24257 *) ac_try_echo=$ac_try;;
24258esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024260 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024261 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024262 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024263 rm -f conftest.er1
24264 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024266 (exit $ac_status); } >/dev/null && {
24267 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24268 test ! -s conftest.err
24269 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024270 have_readline=yes
24271else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024273sed 's/^/| /' conftest.$ac_ext >&5
24274
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024275 have_readline=no
24276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024277
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024278rm -f conftest.err conftest.$ac_ext
24279if test $have_readline = yes
24280then
24281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024282/* confdefs.h. */
24283_ACEOF
24284cat confdefs.h >>conftest.$ac_ext
24285cat >>conftest.$ac_ext <<_ACEOF
24286/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024287#include <readline/readline.h>
24288
24289_ACEOF
24290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024291 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024292
24293cat >>confdefs.h <<\_ACEOF
24294#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24295_ACEOF
24296
24297fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000024298rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024299
24300 cat >conftest.$ac_ext <<_ACEOF
24301/* confdefs.h. */
24302_ACEOF
24303cat confdefs.h >>conftest.$ac_ext
24304cat >>conftest.$ac_ext <<_ACEOF
24305/* end confdefs.h. */
24306#include <readline/readline.h>
24307
24308_ACEOF
24309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24310 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24311
24312cat >>confdefs.h <<\_ACEOF
24313#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24314_ACEOF
24315
24316fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000024317rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024318
24319fi
24320
Martin v. Löwis0daad592001-09-30 21:09:59 +000024321# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024322{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24323echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024324if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024326else
Martin v. Löwis11437992002-04-12 09:54:03 +000024327 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024328LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024329cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024330/* confdefs.h. */
24331_ACEOF
24332cat confdefs.h >>conftest.$ac_ext
24333cat >>conftest.$ac_ext <<_ACEOF
24334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024336/* Override any GCC internal prototype to avoid an error.
24337 Use char because int might match the return type of a GCC
24338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024339#ifdef __cplusplus
24340extern "C"
24341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024342char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024343int
24344main ()
24345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024346return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024347 ;
24348 return 0;
24349}
24350_ACEOF
24351rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352if { (ac_try="$ac_link"
24353case "(($ac_try" in
24354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24355 *) ac_try_echo=$ac_try;;
24356esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024358 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024360 grep -v '^ *+' conftest.er1 >conftest.err
24361 rm -f conftest.er1
24362 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024364 (exit $ac_status); } && {
24365 test -z "$ac_c_werror_flag" ||
24366 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024367 } && test -s conftest$ac_exeext &&
24368 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024369 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024370else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024372sed 's/^/| /' conftest.$ac_ext >&5
24373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024374 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024376
24377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024378 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024379LIBS=$ac_check_lib_save_LIBS
24380fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024381{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24382echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24383if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024384
Martin v. Löwis11437992002-04-12 09:54:03 +000024385cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024386#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024387_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024388
Martin v. Löwis0daad592001-09-30 21:09:59 +000024389fi
24390
Michael W. Hudson54241132001-12-07 15:38:26 +000024391
Thomas Wouters89d996e2007-09-08 17:39:28 +000024392# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024393{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24394echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024395if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024396 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024397else
24398 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024399LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024400cat >conftest.$ac_ext <<_ACEOF
24401/* confdefs.h. */
24402_ACEOF
24403cat confdefs.h >>conftest.$ac_ext
24404cat >>conftest.$ac_ext <<_ACEOF
24405/* end confdefs.h. */
24406
24407/* Override any GCC internal prototype to avoid an error.
24408 Use char because int might match the return type of a GCC
24409 builtin and then its argument prototype would still apply. */
24410#ifdef __cplusplus
24411extern "C"
24412#endif
24413char rl_completion_display_matches_hook ();
24414int
24415main ()
24416{
24417return rl_completion_display_matches_hook ();
24418 ;
24419 return 0;
24420}
24421_ACEOF
24422rm -f conftest.$ac_objext conftest$ac_exeext
24423if { (ac_try="$ac_link"
24424case "(($ac_try" in
24425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24426 *) ac_try_echo=$ac_try;;
24427esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024429 (eval "$ac_link") 2>conftest.er1
24430 ac_status=$?
24431 grep -v '^ *+' conftest.er1 >conftest.err
24432 rm -f conftest.er1
24433 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024435 (exit $ac_status); } && {
24436 test -z "$ac_c_werror_flag" ||
24437 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024438 } && test -s conftest$ac_exeext &&
24439 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024440 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24441else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024442 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024443sed 's/^/| /' conftest.$ac_ext >&5
24444
24445 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24446fi
24447
24448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24449 conftest$ac_exeext conftest.$ac_ext
24450LIBS=$ac_check_lib_save_LIBS
24451fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024452{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24453echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24454if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024455
24456cat >>confdefs.h <<\_ACEOF
24457#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24458_ACEOF
24459
24460fi
24461
24462
Martin v. Löwis0daad592001-09-30 21:09:59 +000024463# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024464{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24465echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024466if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024468else
Martin v. Löwis11437992002-04-12 09:54:03 +000024469 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024470LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024472/* confdefs.h. */
24473_ACEOF
24474cat confdefs.h >>conftest.$ac_ext
24475cat >>conftest.$ac_ext <<_ACEOF
24476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024478/* Override any GCC internal prototype to avoid an error.
24479 Use char because int might match the return type of a GCC
24480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024481#ifdef __cplusplus
24482extern "C"
24483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024484char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024485int
24486main ()
24487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024488return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024489 ;
24490 return 0;
24491}
24492_ACEOF
24493rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024494if { (ac_try="$ac_link"
24495case "(($ac_try" in
24496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24497 *) ac_try_echo=$ac_try;;
24498esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024500 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024502 grep -v '^ *+' conftest.er1 >conftest.err
24503 rm -f conftest.er1
24504 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024506 (exit $ac_status); } && {
24507 test -z "$ac_c_werror_flag" ||
24508 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024509 } && test -s conftest$ac_exeext &&
24510 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024511 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024512else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024514sed 's/^/| /' conftest.$ac_ext >&5
24515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024516 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518
24519rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024521LIBS=$ac_check_lib_save_LIBS
24522fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024523{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24524echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24525if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024526
Martin v. Löwis11437992002-04-12 09:54:03 +000024527cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024528#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024529_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024530
Guido van Rossum353ae582001-07-10 16:45:32 +000024531fi
24532
Jack Jansendd19cf82001-12-06 22:36:17 +000024533
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024534# also in readline 4.2
24535cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024536/* confdefs.h. */
24537_ACEOF
24538cat confdefs.h >>conftest.$ac_ext
24539cat >>conftest.$ac_ext <<_ACEOF
24540/* end confdefs.h. */
24541#include <readline/readline.h>
24542_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024543if { (ac_try="$ac_cpp conftest.$ac_ext"
24544case "(($ac_try" in
24545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24546 *) ac_try_echo=$ac_try;;
24547esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024550 ac_status=$?
24551 grep -v '^ *+' conftest.er1 >conftest.err
24552 rm -f conftest.er1
24553 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024555 (exit $ac_status); } >/dev/null && {
24556 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24557 test ! -s conftest.err
24558 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024559 have_readline=yes
24560else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024561 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024562sed 's/^/| /' conftest.$ac_ext >&5
24563
24564 have_readline=no
24565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024566
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024567rm -f conftest.err conftest.$ac_ext
24568if test $have_readline = yes
24569then
24570 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024571/* confdefs.h. */
24572_ACEOF
24573cat confdefs.h >>conftest.$ac_ext
24574cat >>conftest.$ac_ext <<_ACEOF
24575/* end confdefs.h. */
24576#include <readline/readline.h>
24577
24578_ACEOF
24579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24580 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24581
24582cat >>confdefs.h <<\_ACEOF
24583#define HAVE_RL_CATCH_SIGNAL 1
24584_ACEOF
24585
24586fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000024587rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024588
24589fi
24590
Martin v. Löwis82bca632006-02-10 20:49:30 +000024591# End of readline checks: restore LIBS
24592LIBS=$LIBS_no_readline
24593
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024594{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24595echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024596if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024597 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024598else
Martin v. Löwis11437992002-04-12 09:54:03 +000024599
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024600if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024601 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024602else
Martin v. Löwis11437992002-04-12 09:54:03 +000024603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024604/* confdefs.h. */
24605_ACEOF
24606cat confdefs.h >>conftest.$ac_ext
24607cat >>conftest.$ac_ext <<_ACEOF
24608/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024609
24610int main()
24611{
24612 int val1 = nice(1);
24613 if (val1 != -1 && val1 == nice(2))
24614 exit(0);
24615 exit(1);
24616}
24617
Martin v. Löwis11437992002-04-12 09:54:03 +000024618_ACEOF
24619rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024620if { (ac_try="$ac_link"
24621case "(($ac_try" in
24622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24623 *) ac_try_echo=$ac_try;;
24624esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024626 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024630 { (case "(($ac_try" in
24631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24632 *) ac_try_echo=$ac_try;;
24633esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024635 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024636 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024638 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024639 ac_cv_broken_nice=yes
24640else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024641 echo "$as_me: program exited with status $ac_status" >&5
24642echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024643sed 's/^/| /' conftest.$ac_ext >&5
24644
Martin v. Löwis11437992002-04-12 09:54:03 +000024645( exit $ac_status )
24646ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024648rm -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 +000024649fi
24650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651
24652fi
24653
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024654{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24655echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024656if test "$ac_cv_broken_nice" = yes
24657then
Martin v. Löwis11437992002-04-12 09:54:03 +000024658
24659cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024660#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024661_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024662
24663fi
24664
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024665{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24666echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024667if test "$cross_compiling" = yes; then
24668 ac_cv_broken_poll=no
24669else
24670 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024671/* confdefs.h. */
24672_ACEOF
24673cat confdefs.h >>conftest.$ac_ext
24674cat >>conftest.$ac_ext <<_ACEOF
24675/* end confdefs.h. */
24676
24677#include <poll.h>
24678
24679int main (void)
24680 {
24681 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24682
24683 close (42);
24684
24685 int poll_test = poll (&poll_struct, 1, 0);
24686
24687 if (poll_test < 0)
24688 {
24689 exit(0);
24690 }
24691 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24692 {
24693 exit(0);
24694 }
24695 else
24696 {
24697 exit(1);
24698 }
24699 }
24700
24701_ACEOF
24702rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024703if { (ac_try="$ac_link"
24704case "(($ac_try" in
24705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24706 *) ac_try_echo=$ac_try;;
24707esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024709 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024710 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024713 { (case "(($ac_try" in
24714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24715 *) ac_try_echo=$ac_try;;
24716esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024718 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024719 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024721 (exit $ac_status); }; }; then
24722 ac_cv_broken_poll=yes
24723else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024724 echo "$as_me: program exited with status $ac_status" >&5
24725echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024726sed 's/^/| /' conftest.$ac_ext >&5
24727
24728( exit $ac_status )
24729ac_cv_broken_poll=no
24730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731rm -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 +000024732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024733
24734
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024735{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24736echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024737if test "$ac_cv_broken_poll" = yes
24738then
24739
24740cat >>confdefs.h <<\_ACEOF
24741#define HAVE_BROKEN_POLL 1
24742_ACEOF
24743
24744fi
24745
Brett Cannon43802422005-02-10 20:48:03 +000024746# 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 +000024747# (which is not required by ISO C or UNIX spec) and/or if we support
24748# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024749{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24750echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024751if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024752 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024753else
24754 cat >conftest.$ac_ext <<_ACEOF
24755/* confdefs.h. */
24756_ACEOF
24757cat confdefs.h >>conftest.$ac_ext
24758cat >>conftest.$ac_ext <<_ACEOF
24759/* end confdefs.h. */
24760#include <sys/types.h>
24761#include <$ac_cv_struct_tm>
24762
24763
24764int
24765main ()
24766{
24767static struct tm ac_aggr;
24768if (ac_aggr.tm_zone)
24769return 0;
24770 ;
24771 return 0;
24772}
24773_ACEOF
24774rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775if { (ac_try="$ac_compile"
24776case "(($ac_try" in
24777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24778 *) ac_try_echo=$ac_try;;
24779esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024782 ac_status=$?
24783 grep -v '^ *+' conftest.er1 >conftest.err
24784 rm -f conftest.er1
24785 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024787 (exit $ac_status); } && {
24788 test -z "$ac_c_werror_flag" ||
24789 test ! -s conftest.err
24790 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024791 ac_cv_member_struct_tm_tm_zone=yes
24792else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024793 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024794sed 's/^/| /' conftest.$ac_ext >&5
24795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024796 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024797/* confdefs.h. */
24798_ACEOF
24799cat confdefs.h >>conftest.$ac_ext
24800cat >>conftest.$ac_ext <<_ACEOF
24801/* end confdefs.h. */
24802#include <sys/types.h>
24803#include <$ac_cv_struct_tm>
24804
24805
24806int
24807main ()
24808{
24809static struct tm ac_aggr;
24810if (sizeof ac_aggr.tm_zone)
24811return 0;
24812 ;
24813 return 0;
24814}
24815_ACEOF
24816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024817if { (ac_try="$ac_compile"
24818case "(($ac_try" in
24819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24820 *) ac_try_echo=$ac_try;;
24821esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024823 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024824 ac_status=$?
24825 grep -v '^ *+' conftest.er1 >conftest.err
24826 rm -f conftest.er1
24827 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024829 (exit $ac_status); } && {
24830 test -z "$ac_c_werror_flag" ||
24831 test ! -s conftest.err
24832 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024833 ac_cv_member_struct_tm_tm_zone=yes
24834else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024835 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024836sed 's/^/| /' conftest.$ac_ext >&5
24837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024838 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024840
24841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024843
24844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024845fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024846{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24847echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24848if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024849
24850cat >>confdefs.h <<_ACEOF
24851#define HAVE_STRUCT_TM_TM_ZONE 1
24852_ACEOF
24853
24854
24855fi
24856
24857if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24858
24859cat >>confdefs.h <<\_ACEOF
24860#define HAVE_TM_ZONE 1
24861_ACEOF
24862
24863else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024864 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24865echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024866if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024867 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868else
24869 cat >conftest.$ac_ext <<_ACEOF
24870/* confdefs.h. */
24871_ACEOF
24872cat confdefs.h >>conftest.$ac_ext
24873cat >>conftest.$ac_ext <<_ACEOF
24874/* end confdefs.h. */
24875#include <time.h>
24876
24877int
24878main ()
24879{
24880#ifndef tzname
24881 (void) tzname;
24882#endif
24883
24884 ;
24885 return 0;
24886}
24887_ACEOF
24888rm -f conftest.$ac_objext
24889if { (ac_try="$ac_compile"
24890case "(($ac_try" in
24891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24892 *) ac_try_echo=$ac_try;;
24893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024895 (eval "$ac_compile") 2>conftest.er1
24896 ac_status=$?
24897 grep -v '^ *+' conftest.er1 >conftest.err
24898 rm -f conftest.er1
24899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024901 (exit $ac_status); } && {
24902 test -z "$ac_c_werror_flag" ||
24903 test ! -s conftest.err
24904 } && test -s conftest.$ac_objext; then
24905 ac_cv_have_decl_tzname=yes
24906else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024907 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908sed 's/^/| /' conftest.$ac_ext >&5
24909
24910 ac_cv_have_decl_tzname=no
24911fi
24912
24913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24914fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024915{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24916echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24917if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024918
24919cat >>confdefs.h <<_ACEOF
24920#define HAVE_DECL_TZNAME 1
24921_ACEOF
24922
24923
24924else
24925 cat >>confdefs.h <<_ACEOF
24926#define HAVE_DECL_TZNAME 0
24927_ACEOF
24928
24929
24930fi
24931
24932
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024933 { echo "$as_me:$LINENO: checking for tzname" >&5
24934echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024935if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024936 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024937else
24938 cat >conftest.$ac_ext <<_ACEOF
24939/* confdefs.h. */
24940_ACEOF
24941cat confdefs.h >>conftest.$ac_ext
24942cat >>conftest.$ac_ext <<_ACEOF
24943/* end confdefs.h. */
24944#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024945#if !HAVE_DECL_TZNAME
24946extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024947#endif
24948
24949int
24950main ()
24951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024952return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024953 ;
24954 return 0;
24955}
24956_ACEOF
24957rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024958if { (ac_try="$ac_link"
24959case "(($ac_try" in
24960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24961 *) ac_try_echo=$ac_try;;
24962esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024964 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024965 ac_status=$?
24966 grep -v '^ *+' conftest.er1 >conftest.err
24967 rm -f conftest.er1
24968 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024970 (exit $ac_status); } && {
24971 test -z "$ac_c_werror_flag" ||
24972 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024973 } && test -s conftest$ac_exeext &&
24974 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024975 ac_cv_var_tzname=yes
24976else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024977 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024978sed 's/^/| /' conftest.$ac_ext >&5
24979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024980 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024982
24983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024984 conftest$ac_exeext conftest.$ac_ext
24985fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024986{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24987echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024988 if test $ac_cv_var_tzname = yes; then
24989
24990cat >>confdefs.h <<\_ACEOF
24991#define HAVE_TZNAME 1
24992_ACEOF
24993
24994 fi
24995fi
24996
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024997
Martin v. Löwis1d459062005-03-14 21:23:33 +000024998# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024999{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25000echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025001if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025003else
25004
25005if test "$cross_compiling" = yes; then
25006 ac_cv_working_tzset=no
25007else
25008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025009/* confdefs.h. */
25010_ACEOF
25011cat confdefs.h >>conftest.$ac_ext
25012cat >>conftest.$ac_ext <<_ACEOF
25013/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025014
25015#include <stdlib.h>
25016#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025017#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025018
25019#if HAVE_TZNAME
25020extern char *tzname[];
25021#endif
25022
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025023int main()
25024{
Brett Cannon18367812003-09-19 00:59:16 +000025025 /* Note that we need to ensure that not only does tzset(3)
25026 do 'something' with localtime, but it works as documented
25027 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025028 This includes making sure that tzname is set properly if
25029 tm->tm_zone does not exist since it is the alternative way
25030 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025031
25032 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025033 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025034 */
25035
Martin v. Löwis1d459062005-03-14 21:23:33 +000025036 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025037 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25038
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025039 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025040 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025041 if (localtime(&groundhogday)->tm_hour != 0)
25042 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025043#if HAVE_TZNAME
25044 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25045 if (strcmp(tzname[0], "UTC") ||
25046 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25047 exit(1);
25048#endif
Brett Cannon18367812003-09-19 00:59:16 +000025049
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025050 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025051 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025052 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025053 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025054#if HAVE_TZNAME
25055 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25056 exit(1);
25057#endif
Brett Cannon18367812003-09-19 00:59:16 +000025058
25059 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25060 tzset();
25061 if (localtime(&groundhogday)->tm_hour != 11)
25062 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025063#if HAVE_TZNAME
25064 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25065 exit(1);
25066#endif
25067
25068#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025069 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25070 exit(1);
25071 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25072 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025073#endif
Brett Cannon18367812003-09-19 00:59:16 +000025074
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025075 exit(0);
25076}
25077
25078_ACEOF
25079rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025080if { (ac_try="$ac_link"
25081case "(($ac_try" in
25082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25083 *) ac_try_echo=$ac_try;;
25084esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025086 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025087 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025090 { (case "(($ac_try" in
25091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25092 *) ac_try_echo=$ac_try;;
25093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025095 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025096 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025098 (exit $ac_status); }; }; then
25099 ac_cv_working_tzset=yes
25100else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025101 echo "$as_me: program exited with status $ac_status" >&5
25102echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025103sed 's/^/| /' conftest.$ac_ext >&5
25104
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025105( exit $ac_status )
25106ac_cv_working_tzset=no
25107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025108rm -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 +000025109fi
25110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025111
25112fi
25113
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025114{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25115echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025116if test "$ac_cv_working_tzset" = yes
25117then
25118
25119cat >>confdefs.h <<\_ACEOF
25120#define HAVE_WORKING_TZSET 1
25121_ACEOF
25122
25123fi
25124
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025125# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025126{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25127echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025128if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025129 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025130else
25131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025132/* confdefs.h. */
25133_ACEOF
25134cat confdefs.h >>conftest.$ac_ext
25135cat >>conftest.$ac_ext <<_ACEOF
25136/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025137#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025138int
25139main ()
25140{
25141
25142struct stat st;
25143st.st_mtim.tv_nsec = 1;
25144
25145 ;
25146 return 0;
25147}
25148_ACEOF
25149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025150if { (ac_try="$ac_compile"
25151case "(($ac_try" in
25152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25153 *) ac_try_echo=$ac_try;;
25154esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025158 grep -v '^ *+' conftest.er1 >conftest.err
25159 rm -f conftest.er1
25160 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025162 (exit $ac_status); } && {
25163 test -z "$ac_c_werror_flag" ||
25164 test ! -s conftest.err
25165 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025166 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025167else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025169sed 's/^/| /' conftest.$ac_ext >&5
25170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025171 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025172fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25175fi
25176
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025177{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25178echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025179if test "$ac_cv_stat_tv_nsec" = yes
25180then
25181
25182cat >>confdefs.h <<\_ACEOF
25183#define HAVE_STAT_TV_NSEC 1
25184_ACEOF
25185
25186fi
25187
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025188# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025189{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25190echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025191if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025192 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025193else
25194 cat >conftest.$ac_ext <<_ACEOF
25195/* confdefs.h. */
25196_ACEOF
25197cat confdefs.h >>conftest.$ac_ext
25198cat >>conftest.$ac_ext <<_ACEOF
25199/* end confdefs.h. */
25200#include <sys/stat.h>
25201int
25202main ()
25203{
25204
25205struct stat st;
25206st.st_mtimespec.tv_nsec = 1;
25207
25208 ;
25209 return 0;
25210}
25211_ACEOF
25212rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025213if { (ac_try="$ac_compile"
25214case "(($ac_try" in
25215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25216 *) ac_try_echo=$ac_try;;
25217esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025220 ac_status=$?
25221 grep -v '^ *+' conftest.er1 >conftest.err
25222 rm -f conftest.er1
25223 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025225 (exit $ac_status); } && {
25226 test -z "$ac_c_werror_flag" ||
25227 test ! -s conftest.err
25228 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025229 ac_cv_stat_tv_nsec2=yes
25230else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025231 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025232sed 's/^/| /' conftest.$ac_ext >&5
25233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025234 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025235fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25238fi
25239
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025240{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25241echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025242if test "$ac_cv_stat_tv_nsec2" = yes
25243then
25244
25245cat >>confdefs.h <<\_ACEOF
25246#define HAVE_STAT_TV_NSEC2 1
25247_ACEOF
25248
25249fi
25250
Jack Jansen666b1e72001-10-31 12:11:48 +000025251# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025252{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25253echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025254if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025255 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025256else
Martin v. Löwis11437992002-04-12 09:54:03 +000025257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025258/* confdefs.h. */
25259_ACEOF
25260cat confdefs.h >>conftest.$ac_ext
25261cat >>conftest.$ac_ext <<_ACEOF
25262/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025263#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025264int
25265main ()
25266{
Jack Jansen666b1e72001-10-31 12:11:48 +000025267
25268 int rtn;
25269 rtn = mvwdelch(0,0,0);
25270
Martin v. Löwis11437992002-04-12 09:54:03 +000025271 ;
25272 return 0;
25273}
25274_ACEOF
25275rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025276if { (ac_try="$ac_compile"
25277case "(($ac_try" in
25278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25279 *) ac_try_echo=$ac_try;;
25280esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025282 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025284 grep -v '^ *+' conftest.er1 >conftest.err
25285 rm -f conftest.er1
25286 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025288 (exit $ac_status); } && {
25289 test -z "$ac_c_werror_flag" ||
25290 test ! -s conftest.err
25291 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025292 ac_cv_mvwdelch_is_expression=yes
25293else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025295sed 's/^/| /' conftest.$ac_ext >&5
25296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025297 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025298fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25301fi
25302
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025303{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25304echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025305
25306if test "$ac_cv_mvwdelch_is_expression" = yes
25307then
Martin v. Löwis11437992002-04-12 09:54:03 +000025308
25309cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025310#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025311_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025312
25313fi
25314
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025315{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25316echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025317if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025318 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025319else
Martin v. Löwis11437992002-04-12 09:54:03 +000025320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025321/* confdefs.h. */
25322_ACEOF
25323cat confdefs.h >>conftest.$ac_ext
25324cat >>conftest.$ac_ext <<_ACEOF
25325/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025326#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025327int
25328main ()
25329{
Jack Jansen666b1e72001-10-31 12:11:48 +000025330
25331 WINDOW *w;
25332 w->_flags = 0;
25333
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 ;
25335 return 0;
25336}
25337_ACEOF
25338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025339if { (ac_try="$ac_compile"
25340case "(($ac_try" in
25341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25342 *) ac_try_echo=$ac_try;;
25343esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025347 grep -v '^ *+' conftest.er1 >conftest.err
25348 rm -f conftest.er1
25349 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025351 (exit $ac_status); } && {
25352 test -z "$ac_c_werror_flag" ||
25353 test ! -s conftest.err
25354 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025355 ac_cv_window_has_flags=yes
25356else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025358sed 's/^/| /' conftest.$ac_ext >&5
25359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025360 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025361fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25364fi
25365
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025366{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25367echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025368
Jack Jansen666b1e72001-10-31 12:11:48 +000025369
25370if test "$ac_cv_window_has_flags" = yes
25371then
Martin v. Löwis11437992002-04-12 09:54:03 +000025372
25373cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025374#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025375_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025376
25377fi
25378
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025379{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25380echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025381cat >conftest.$ac_ext <<_ACEOF
25382/* confdefs.h. */
25383_ACEOF
25384cat confdefs.h >>conftest.$ac_ext
25385cat >>conftest.$ac_ext <<_ACEOF
25386/* end confdefs.h. */
25387#include <curses.h>
25388int
25389main ()
25390{
25391void *x=is_term_resized
25392 ;
25393 return 0;
25394}
25395_ACEOF
25396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025397if { (ac_try="$ac_compile"
25398case "(($ac_try" in
25399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25400 *) ac_try_echo=$ac_try;;
25401esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025403 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025404 ac_status=$?
25405 grep -v '^ *+' conftest.er1 >conftest.err
25406 rm -f conftest.er1
25407 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025409 (exit $ac_status); } && {
25410 test -z "$ac_c_werror_flag" ||
25411 test ! -s conftest.err
25412 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025413
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025414cat >>confdefs.h <<\_ACEOF
25415#define HAVE_CURSES_IS_TERM_RESIZED 1
25416_ACEOF
25417
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025418 { echo "$as_me:$LINENO: result: yes" >&5
25419echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025420else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025421 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025422sed 's/^/| /' conftest.$ac_ext >&5
25423
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025424 { echo "$as_me:$LINENO: result: no" >&5
25425echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025426
25427fi
25428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25430
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025431{ echo "$as_me:$LINENO: checking for resize_term" >&5
25432echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025433cat >conftest.$ac_ext <<_ACEOF
25434/* confdefs.h. */
25435_ACEOF
25436cat confdefs.h >>conftest.$ac_ext
25437cat >>conftest.$ac_ext <<_ACEOF
25438/* end confdefs.h. */
25439#include <curses.h>
25440int
25441main ()
25442{
25443void *x=resize_term
25444 ;
25445 return 0;
25446}
25447_ACEOF
25448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025449if { (ac_try="$ac_compile"
25450case "(($ac_try" in
25451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25452 *) ac_try_echo=$ac_try;;
25453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025455 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025456 ac_status=$?
25457 grep -v '^ *+' conftest.er1 >conftest.err
25458 rm -f conftest.er1
25459 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025461 (exit $ac_status); } && {
25462 test -z "$ac_c_werror_flag" ||
25463 test ! -s conftest.err
25464 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025465
25466cat >>confdefs.h <<\_ACEOF
25467#define HAVE_CURSES_RESIZE_TERM 1
25468_ACEOF
25469
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025470 { echo "$as_me:$LINENO: result: yes" >&5
25471echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025472else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025473 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025474sed 's/^/| /' conftest.$ac_ext >&5
25475
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025476 { echo "$as_me:$LINENO: result: no" >&5
25477echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025478
25479fi
25480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25482
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025483{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25484echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025485cat >conftest.$ac_ext <<_ACEOF
25486/* confdefs.h. */
25487_ACEOF
25488cat confdefs.h >>conftest.$ac_ext
25489cat >>conftest.$ac_ext <<_ACEOF
25490/* end confdefs.h. */
25491#include <curses.h>
25492int
25493main ()
25494{
25495void *x=resizeterm
25496 ;
25497 return 0;
25498}
25499_ACEOF
25500rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025501if { (ac_try="$ac_compile"
25502case "(($ac_try" in
25503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25504 *) ac_try_echo=$ac_try;;
25505esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025507 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025508 ac_status=$?
25509 grep -v '^ *+' conftest.er1 >conftest.err
25510 rm -f conftest.er1
25511 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025513 (exit $ac_status); } && {
25514 test -z "$ac_c_werror_flag" ||
25515 test ! -s conftest.err
25516 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025517
25518cat >>confdefs.h <<\_ACEOF
25519#define HAVE_CURSES_RESIZETERM 1
25520_ACEOF
25521
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025522 { echo "$as_me:$LINENO: result: yes" >&5
25523echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025524else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025525 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025526sed 's/^/| /' conftest.$ac_ext >&5
25527
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025528 { echo "$as_me:$LINENO: result: no" >&5
25529echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025530
25531fi
25532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25534
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025535{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25536echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025537
25538if test -r /dev/ptmx
25539then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025540 { echo "$as_me:$LINENO: result: yes" >&5
25541echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025542
25543cat >>confdefs.h <<\_ACEOF
25544#define HAVE_DEV_PTMX 1
25545_ACEOF
25546
Thomas Wouters89f507f2006-12-13 04:49:30 +000025547else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025548 { echo "$as_me:$LINENO: result: no" >&5
25549echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025550fi
25551
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025552{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25553echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025554
25555if test -r /dev/ptc
25556then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025557 { echo "$as_me:$LINENO: result: yes" >&5
25558echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025559
25560cat >>confdefs.h <<\_ACEOF
25561#define HAVE_DEV_PTC 1
25562_ACEOF
25563
Thomas Wouters89f507f2006-12-13 04:49:30 +000025564else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025565 { echo "$as_me:$LINENO: result: no" >&5
25566echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025567fi
25568
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025569{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25570echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025571if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025572 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025573See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025574echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025575See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025576 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025577else
25578 cat >conftest.$ac_ext <<_ACEOF
25579/* confdefs.h. */
25580_ACEOF
25581cat confdefs.h >>conftest.$ac_ext
25582cat >>conftest.$ac_ext <<_ACEOF
25583/* end confdefs.h. */
25584#include <stdio.h>
25585#include <stddef.h>
25586#include <string.h>
25587
Christian Heimes2c181612007-12-17 20:04:13 +000025588#ifdef HAVE_SYS_TYPES_H
25589#include <sys/types.h>
25590#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025591
25592#ifdef HAVE_SSIZE_T
25593typedef ssize_t Py_ssize_t;
25594#elif SIZEOF_VOID_P == SIZEOF_LONG
25595typedef long Py_ssize_t;
25596#else
25597typedef int Py_ssize_t;
25598#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025599
Christian Heimes2c181612007-12-17 20:04:13 +000025600int main()
25601{
25602 char buffer[256];
25603
Thomas Wouters477c8d52006-05-27 19:21:47 +000025604 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25605 return 1;
25606
Thomas Wouters89f507f2006-12-13 04:49:30 +000025607 if (strcmp(buffer, "123"))
25608 return 1;
25609
25610 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25611 return 1;
25612
25613 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025614 return 1;
25615
25616 return 0;
25617}
25618_ACEOF
25619rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025620if { (ac_try="$ac_link"
25621case "(($ac_try" in
25622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25623 *) ac_try_echo=$ac_try;;
25624esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025626 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025627 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025630 { (case "(($ac_try" in
25631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25632 *) ac_try_echo=$ac_try;;
25633esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025635 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025636 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025638 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025639 { echo "$as_me:$LINENO: result: yes" >&5
25640echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025641
25642cat >>confdefs.h <<\_ACEOF
25643#define PY_FORMAT_SIZE_T "z"
25644_ACEOF
25645
25646else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025647 echo "$as_me: program exited with status $ac_status" >&5
25648echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025649sed 's/^/| /' conftest.$ac_ext >&5
25650
25651( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025652{ echo "$as_me:$LINENO: result: no" >&5
25653echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025655rm -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 +000025656fi
25657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025658
25659
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025660{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25661echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025662if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025664else
Martin v. Löwis11437992002-04-12 09:54:03 +000025665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025666/* confdefs.h. */
25667_ACEOF
25668cat confdefs.h >>conftest.$ac_ext
25669cat >>conftest.$ac_ext <<_ACEOF
25670/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025671
25672#ifdef HAVE_SYS_TYPES_H
25673#include <sys/types.h>
25674#endif
25675#ifdef HAVE_SYS_SOCKET_H
25676#include <sys/socket.h>
25677#endif
25678
25679
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025680typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025681int
25682main ()
25683{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025684if ((ac__type_new_ *) 0)
25685 return 0;
25686if (sizeof (ac__type_new_))
25687 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025688 ;
25689 return 0;
25690}
25691_ACEOF
25692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025693if { (ac_try="$ac_compile"
25694case "(($ac_try" in
25695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25696 *) ac_try_echo=$ac_try;;
25697esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025701 grep -v '^ *+' conftest.er1 >conftest.err
25702 rm -f conftest.er1
25703 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025705 (exit $ac_status); } && {
25706 test -z "$ac_c_werror_flag" ||
25707 test ! -s conftest.err
25708 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025709 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025710else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025712sed 's/^/| /' conftest.$ac_ext >&5
25713
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025714 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025716
25717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025718fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025719{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25720echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25721if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025722 :
25723else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025724
Martin v. Löwis01c04012002-11-11 14:58:44 +000025725cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025726#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025727_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025728
25729fi
25730
Michael W. Hudson54241132001-12-07 15:38:26 +000025731
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025732{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25733echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025734if test "$cross_compiling" = yes; then
25735 ac_cv_broken_mbstowcs=no
25736else
25737 cat >conftest.$ac_ext <<_ACEOF
25738/* confdefs.h. */
25739_ACEOF
25740cat confdefs.h >>conftest.$ac_ext
25741cat >>conftest.$ac_ext <<_ACEOF
25742/* end confdefs.h. */
25743
25744#include<stdlib.h>
25745int main() {
25746 size_t len = -1;
25747 const char *str = "text";
25748 len = mbstowcs(NULL, str, 0);
25749 return (len != 4);
25750}
25751
25752_ACEOF
25753rm -f conftest$ac_exeext
25754if { (ac_try="$ac_link"
25755case "(($ac_try" in
25756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25757 *) ac_try_echo=$ac_try;;
25758esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025760 (eval "$ac_link") 2>&5
25761 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25764 { (case "(($ac_try" in
25765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25766 *) ac_try_echo=$ac_try;;
25767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025769 (eval "$ac_try") 2>&5
25770 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025772 (exit $ac_status); }; }; then
25773 ac_cv_broken_mbstowcs=no
25774else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025775 echo "$as_me: program exited with status $ac_status" >&5
25776echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025777sed 's/^/| /' conftest.$ac_ext >&5
25778
25779( exit $ac_status )
25780ac_cv_broken_mbstowcs=yes
25781fi
25782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25783fi
25784
25785
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025786{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25787echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025788if test "$ac_cv_broken_mbstowcs" = yes
25789then
25790
25791cat >>confdefs.h <<\_ACEOF
25792#define HAVE_BROKEN_MBSTOWCS 1
25793_ACEOF
25794
25795fi
25796
Antoine Pitroub52ec782009-01-25 16:34:23 +000025797# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025798{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25799echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025800
25801# Check whether --with-computed-gotos was given.
25802if test "${with_computed_gotos+set}" = set; then
25803 withval=$with_computed_gotos;
25804if test "$withval" != no
25805then
25806
25807cat >>confdefs.h <<\_ACEOF
25808#define USE_COMPUTED_GOTOS 1
25809_ACEOF
25810
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025811 { echo "$as_me:$LINENO: result: yes" >&5
25812echo "${ECHO_T}yes" >&6; }
25813else { echo "$as_me:$LINENO: result: no" >&5
25814echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025815fi
25816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025817 { echo "$as_me:$LINENO: result: no" >&5
25818echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025819fi
25820
25821
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025822if test $ac_sys_system = Darwin
25823then
25824 LIBS="$LIBS -framework CoreFoundation"
25825fi
25826
25827
Antoine Pitroub52ec782009-01-25 16:34:23 +000025828
Michael W. Hudson54241132001-12-07 15:38:26 +000025829
25830
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025831for h in `(cd $srcdir;echo Python/thread_*.h)`
25832do
25833 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25834done
25835
Michael W. Hudson54241132001-12-07 15:38:26 +000025836
Neal Norwitzd24499d2005-12-18 21:36:39 +000025837SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025838{ echo "$as_me:$LINENO: checking for build directories" >&5
25839echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025840for dir in $SRCDIRS; do
25841 if test ! -d $dir; then
25842 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025843 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025844done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025845{ echo "$as_me:$LINENO: result: done" >&5
25846echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025847
Guido van Rossum627b2d71993-12-24 10:39:16 +000025848# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025849ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025850
Martin v. Löwis11437992002-04-12 09:54:03 +000025851cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025852# This file is a shell script that caches the results of configure
25853# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025854# scripts and configure runs, see configure's option --config-cache.
25855# It is not useful on other systems. If it contains results you don't
25856# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025857#
Martin v. Löwis11437992002-04-12 09:54:03 +000025858# config.status only pays attention to the cache file if you give it
25859# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025860#
Skip Montanaro6dead952003-09-25 14:50:04 +000025861# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025862# loading this file, other *unset* `ac_cv_foo' will be assigned the
25863# following values.
25864
25865_ACEOF
25866
Guido van Rossumf78abae1997-01-21 22:02:36 +000025867# The following way of writing the cache mishandles newlines in values,
25868# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025869# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025870# Ultrix sh set writes to stderr and can't be redirected directly,
25871# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872(
25873 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25874 eval ac_val=\$$ac_var
25875 case $ac_val in #(
25876 *${as_nl}*)
25877 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025878 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25879echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025880 esac
25881 case $ac_var in #(
25882 _ | IFS | as_nl) ;; #(
25883 *) $as_unset $ac_var ;;
25884 esac ;;
25885 esac
25886 done
25887
Martin v. Löwis11437992002-04-12 09:54:03 +000025888 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025889 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25890 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025891 # `set' does not quote correctly, so add quotes (double-quote
25892 # substitution turns \\\\ into \\, and sed turns \\ into \).
25893 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025894 "s/'/'\\\\''/g;
25895 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025896 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025897 *)
25898 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025899 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025900 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025901 esac |
25902 sort
25903) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025904 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025905 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025906 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025907 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25909 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25911 :end' >>confcache
25912if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25913 if test -w "$cache_file"; then
25914 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025915 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25916echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025917 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025918 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025919 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25920echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025921 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025922fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025923rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025925test "x$prefix" = xNONE && prefix=$ac_default_prefix
25926# Let make expand exec_prefix.
25927test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025928
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025929DEFS=-DHAVE_CONFIG_H
25930
Skip Montanaro6dead952003-09-25 14:50:04 +000025931ac_libobjs=
25932ac_ltlibobjs=
25933for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25934 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025936 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25938 # will be set to the directory where LIBOBJS objects are built.
25939 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25940 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025941done
25942LIBOBJS=$ac_libobjs
25943
25944LTLIBOBJS=$ac_ltlibobjs
25945
25946
Martin v. Löwis11437992002-04-12 09:54:03 +000025947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025948: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025949ac_clean_files_save=$ac_clean_files
25950ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025951{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25952echo "$as_me: creating $CONFIG_STATUS" >&6;}
25953cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025954#! $SHELL
25955# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025956# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025957# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025958# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025959
Martin v. Löwis11437992002-04-12 09:54:03 +000025960debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025961ac_cs_recheck=false
25962ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025963SHELL=\${CONFIG_SHELL-$SHELL}
25964_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025965
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025966cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025967## --------------------- ##
25968## M4sh Initialization. ##
25969## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025971# Be more Bourne compatible
25972DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025973if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25974 emulate sh
25975 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025976 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025977 # is contrary to our usage. Disable this feature.
25978 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025979 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025980else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025981 case `(set -o) 2>/dev/null` in
25982 *posix*) set -o posix ;;
25983esac
25984
Michael W. Hudson54241132001-12-07 15:38:26 +000025985fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025986
25987
Michael W. Hudson54241132001-12-07 15:38:26 +000025988
Michael W. Hudson54241132001-12-07 15:38:26 +000025989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025990# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025991# Avoid depending upon Character Ranges.
25992as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25993as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25994as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25995as_cr_digits='0123456789'
25996as_cr_alnum=$as_cr_Letters$as_cr_digits
25997
25998# The user is always right.
25999if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026000 echo "#! /bin/sh" >conf$$.sh
26001 echo "exit 0" >>conf$$.sh
26002 chmod +x conf$$.sh
26003 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26004 PATH_SEPARATOR=';'
26005 else
26006 PATH_SEPARATOR=:
26007 fi
26008 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026009fi
26010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026011# Support unset when possible.
26012if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26013 as_unset=unset
26014else
26015 as_unset=false
26016fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026018
26019# IFS
26020# We need space, tab and new line, in precisely that order. Quoting is
26021# there to prevent editors from complaining about space-tab.
26022# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26023# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026024as_nl='
26025'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026026IFS=" "" $as_nl"
26027
26028# Find who we are. Look in the path if we contain no directory separator.
26029case $0 in
26030 *[\\/]* ) as_myself=$0 ;;
26031 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026032for as_dir in $PATH
26033do
26034 IFS=$as_save_IFS
26035 test -z "$as_dir" && as_dir=.
26036 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26037done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026038IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026040 ;;
26041esac
26042# We did not find ourselves, most probably we were run as `sh COMMAND'
26043# in which case we are not to be found in the path.
26044if test "x$as_myself" = x; then
26045 as_myself=$0
26046fi
26047if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026048 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026049 { (exit 1); exit 1; }
26050fi
26051
26052# Work around bugs in pre-3.0 UWIN ksh.
26053for as_var in ENV MAIL MAILPATH
26054do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26055done
26056PS1='$ '
26057PS2='> '
26058PS4='+ '
26059
26060# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026061for as_var in \
26062 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26063 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26064 LC_TELEPHONE LC_TIME
26065do
26066 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26067 eval $as_var=C; export $as_var
26068 else
26069 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26070 fi
26071done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072
26073# Required to use basename.
26074if expr a : '\(a\)' >/dev/null 2>&1 &&
26075 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26076 as_expr=expr
26077else
26078 as_expr=false
26079fi
26080
26081if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26082 as_basename=basename
26083else
26084 as_basename=false
26085fi
26086
26087
26088# Name of the executable.
26089as_me=`$as_basename -- "$0" ||
26090$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26091 X"$0" : 'X\(//\)$' \| \
26092 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026093echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026094 sed '/^.*\/\([^/][^/]*\)\/*$/{
26095 s//\1/
26096 q
26097 }
26098 /^X\/\(\/\/\)$/{
26099 s//\1/
26100 q
26101 }
26102 /^X\/\(\/\).*/{
26103 s//\1/
26104 q
26105 }
26106 s/.*/./; q'`
26107
26108# CDPATH.
26109$as_unset CDPATH
26110
26111
26112
Martin v. Löwis11437992002-04-12 09:54:03 +000026113 as_lineno_1=$LINENO
26114 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026115 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026116 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026117
Martin v. Löwis11437992002-04-12 09:54:03 +000026118 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26119 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026120 # line-number line after each line using $LINENO; the second 'sed'
26121 # does the real work. The second script uses 'N' to pair each
26122 # line-number line with the line containing $LINENO, and appends
26123 # trailing '-' during substitution so that $LINENO is not a special
26124 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026125 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026126 # scripts with optimization help from Paolo Bonzini. Blame Lee
26127 # E. McMahon (1931-1989) for sed's syntax. :-)
26128 sed -n '
26129 p
26130 /[$]LINENO/=
26131 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026132 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026133 s/[$]LINENO.*/&-/
26134 t lineno
26135 b
26136 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026137 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026138 :loop
26139 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026140 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026141 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026142 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026143 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026144 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026145 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026146
Martin v. Löwis11437992002-04-12 09:54:03 +000026147 # Don't try to exec as it changes $[0], causing all sort of problems
26148 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026149 # original and so on. Autoconf is especially sensitive to this).
26150 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026151 # Exit status is that of the last command.
26152 exit
26153}
26154
26155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026156if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26157 as_dirname=dirname
26158else
26159 as_dirname=false
26160fi
26161
26162ECHO_C= ECHO_N= ECHO_T=
26163case `echo -n x` in
26164-n*)
26165 case `echo 'x\c'` in
26166 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26167 *) ECHO_C='\c';;
26168 esac;;
26169*)
26170 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026171esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026173if expr a : '\(a\)' >/dev/null 2>&1 &&
26174 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026175 as_expr=expr
26176else
26177 as_expr=false
26178fi
26179
26180rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026181if test -d conf$$.dir; then
26182 rm -f conf$$.dir/conf$$.file
26183else
26184 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026185 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026186fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026187echo >conf$$.file
26188if ln -s conf$$.file conf$$ 2>/dev/null; then
26189 as_ln_s='ln -s'
26190 # ... but there are two gotchas:
26191 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26192 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26193 # In both cases, we have to default to `cp -p'.
26194 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026195 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026196elif ln conf$$.file conf$$ 2>/dev/null; then
26197 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026198else
26199 as_ln_s='cp -p'
26200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026201rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26202rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026203
Skip Montanaro6dead952003-09-25 14:50:04 +000026204if mkdir -p . 2>/dev/null; then
26205 as_mkdir_p=:
26206else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026207 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026208 as_mkdir_p=false
26209fi
26210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211if test -x / >/dev/null 2>&1; then
26212 as_test_x='test -x'
26213else
26214 if ls -dL / >/dev/null 2>&1; then
26215 as_ls_L_option=L
26216 else
26217 as_ls_L_option=
26218 fi
26219 as_test_x='
26220 eval sh -c '\''
26221 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026222 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026223 else
26224 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026225 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026226 esac;
26227 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26228 ???[sx]*):;;*)false;;esac;fi
26229 '\'' sh
26230 '
26231fi
26232as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026233
26234# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026235as_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 +000026236
26237# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026238as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026239
26240
Martin v. Löwis11437992002-04-12 09:54:03 +000026241exec 6>&1
26242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026243# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026244# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245# values after options handling.
26246ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026247This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026248generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026249
26250 CONFIG_FILES = $CONFIG_FILES
26251 CONFIG_HEADERS = $CONFIG_HEADERS
26252 CONFIG_LINKS = $CONFIG_LINKS
26253 CONFIG_COMMANDS = $CONFIG_COMMANDS
26254 $ $0 $@
26255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026256on `(hostname || uname -n) 2>/dev/null | sed 1q`
26257"
26258
Martin v. Löwis11437992002-04-12 09:54:03 +000026259_ACEOF
26260
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026261cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026262# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026263config_files="$ac_config_files"
26264config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026266_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026267
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026268cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026269ac_cs_usage="\
26270\`$as_me' instantiates files from templates according to the
26271current configuration.
26272
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026273Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026274
26275 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026276 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026277 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026278 -d, --debug don't remove temporary files
26279 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026280 --file=FILE[:TEMPLATE]
26281 instantiate the configuration file FILE
26282 --header=FILE[:TEMPLATE]
26283 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026284
26285Configuration files:
26286$config_files
26287
26288Configuration headers:
26289$config_headers
26290
26291Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026293_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026294cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026295ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026296python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026297configured by $0, generated by GNU Autoconf 2.61,
26298 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026299
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026300Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026301This config.status script is free software; the Free Software Foundation
26302gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026303
26304ac_pwd='$ac_pwd'
26305srcdir='$srcdir'
26306INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026307_ACEOF
26308
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026309cat >>$CONFIG_STATUS <<\_ACEOF
26310# If no file are specified by the user, then we need to provide default
26311# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026312ac_need_defaults=:
26313while test $# != 0
26314do
26315 case $1 in
26316 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026317 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26318 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026319 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026320 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026321 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026322 ac_option=$1
26323 ac_optarg=$2
26324 ac_shift=shift
26325 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026326 esac
26327
Skip Montanaro6dead952003-09-25 14:50:04 +000026328 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026329 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026330 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26331 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026332 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026333 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026334 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026335 debug=: ;;
26336 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026337 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026338 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026339 ac_need_defaults=false;;
26340 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026341 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026342 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026343 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026344 --he | --h)
26345 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026346 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026347Try \`$0 --help' for more information." >&2
26348 { (exit 1); exit 1; }; };;
26349 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026350 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026351 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26352 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26353 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026354
26355 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026356 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026357Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026358 { (exit 1); exit 1; }; } ;;
26359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026360 *) ac_config_targets="$ac_config_targets $1"
26361 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026362
26363 esac
26364 shift
26365done
26366
Skip Montanaro6dead952003-09-25 14:50:04 +000026367ac_configure_extra_args=
26368
26369if $ac_cs_silent; then
26370 exec 6>/dev/null
26371 ac_configure_extra_args="$ac_configure_extra_args --silent"
26372fi
26373
26374_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026375cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026376if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026377 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26378 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026379 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026380 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026381fi
26382
Martin v. Löwis11437992002-04-12 09:54:03 +000026383_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026384cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026385exec 5>>config.log
26386{
26387 echo
26388 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26389## Running $as_me. ##
26390_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026391 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026392} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026394_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026395cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026396_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026398cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399
26400# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026401for ac_config_target in $ac_config_targets
26402do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026403 case $ac_config_target in
26404 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26405 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26406 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026407 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26408 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026409 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26410 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026411 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026412
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026413 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26414echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026415 { (exit 1); exit 1; }; };;
26416 esac
26417done
26418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026419
Martin v. Löwis11437992002-04-12 09:54:03 +000026420# If the user did not use the arguments to specify the items to instantiate,
26421# then the envvar interface is used. Set only those that are not.
26422# We use the long form for the default assignment because of an extremely
26423# bizarre bug on SunOS 4.1.3.
26424if $ac_need_defaults; then
26425 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26426 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26427fi
26428
Skip Montanaro6dead952003-09-25 14:50:04 +000026429# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026430# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026431# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026432# Hook for its removal unless debugging.
26433# Note that there is a small window in which the directory will not be cleaned:
26434# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026435$debug ||
26436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026437 tmp=
26438 trap 'exit_status=$?
26439 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26440' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026441 trap '{ (exit 1); exit 1; }' 1 2 13 15
26442}
Martin v. Löwis11437992002-04-12 09:54:03 +000026443# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026444
Martin v. Löwis11437992002-04-12 09:54:03 +000026445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026446 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026447 test -n "$tmp" && test -d "$tmp"
26448} ||
26449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026450 tmp=./conf$$-$RANDOM
26451 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026452} ||
26453{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026454 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026455 { (exit 1); exit 1; }
26456}
26457
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026458#
26459# Set up the sed scripts for CONFIG_FILES section.
26460#
26461
26462# No need to generate the scripts if there are no CONFIG_FILES.
26463# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026465
26466_ACEOF
26467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026468
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026470ac_delim='%!_!# '
26471for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026472 cat >conf$$subs.sed <<_ACEOF
26473SHELL!$SHELL$ac_delim
26474PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26475PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26476PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26477PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26478PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26479PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26480exec_prefix!$exec_prefix$ac_delim
26481prefix!$prefix$ac_delim
26482program_transform_name!$program_transform_name$ac_delim
26483bindir!$bindir$ac_delim
26484sbindir!$sbindir$ac_delim
26485libexecdir!$libexecdir$ac_delim
26486datarootdir!$datarootdir$ac_delim
26487datadir!$datadir$ac_delim
26488sysconfdir!$sysconfdir$ac_delim
26489sharedstatedir!$sharedstatedir$ac_delim
26490localstatedir!$localstatedir$ac_delim
26491includedir!$includedir$ac_delim
26492oldincludedir!$oldincludedir$ac_delim
26493docdir!$docdir$ac_delim
26494infodir!$infodir$ac_delim
26495htmldir!$htmldir$ac_delim
26496dvidir!$dvidir$ac_delim
26497pdfdir!$pdfdir$ac_delim
26498psdir!$psdir$ac_delim
26499libdir!$libdir$ac_delim
26500localedir!$localedir$ac_delim
26501mandir!$mandir$ac_delim
26502DEFS!$DEFS$ac_delim
26503ECHO_C!$ECHO_C$ac_delim
26504ECHO_N!$ECHO_N$ac_delim
26505ECHO_T!$ECHO_T$ac_delim
26506LIBS!$LIBS$ac_delim
26507build_alias!$build_alias$ac_delim
26508host_alias!$host_alias$ac_delim
26509target_alias!$target_alias$ac_delim
26510VERSION!$VERSION$ac_delim
26511SOVERSION!$SOVERSION$ac_delim
26512CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26513UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26514ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26515PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26516PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26517PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26518PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26519PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26520FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26521FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26522FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26523FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26524FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26525MACHDEP!$MACHDEP$ac_delim
26526SGI_ABI!$SGI_ABI$ac_delim
26527CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26528EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26529CC!$CC$ac_delim
26530CFLAGS!$CFLAGS$ac_delim
26531LDFLAGS!$LDFLAGS$ac_delim
26532CPPFLAGS!$CPPFLAGS$ac_delim
26533ac_ct_CC!$ac_ct_CC$ac_delim
26534EXEEXT!$EXEEXT$ac_delim
26535OBJEXT!$OBJEXT$ac_delim
26536CXX!$CXX$ac_delim
26537MAINCC!$MAINCC$ac_delim
26538CPP!$CPP$ac_delim
26539GREP!$GREP$ac_delim
26540EGREP!$EGREP$ac_delim
26541BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26542LIBRARY!$LIBRARY$ac_delim
26543LDLIBRARY!$LDLIBRARY$ac_delim
26544DLLLIBRARY!$DLLLIBRARY$ac_delim
26545BLDLIBRARY!$BLDLIBRARY$ac_delim
26546LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26547INSTSONAME!$INSTSONAME$ac_delim
26548RUNSHARED!$RUNSHARED$ac_delim
26549LINKCC!$LINKCC$ac_delim
26550GNULD!$GNULD$ac_delim
26551RANLIB!$RANLIB$ac_delim
26552AR!$AR$ac_delim
26553ARFLAGS!$ARFLAGS$ac_delim
26554SVNVERSION!$SVNVERSION$ac_delim
26555INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26556INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26557INSTALL_DATA!$INSTALL_DATA$ac_delim
26558LN!$LN$ac_delim
26559OPT!$OPT$ac_delim
26560BASECFLAGS!$BASECFLAGS$ac_delim
26561UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26562OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26563LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26564SO!$SO$ac_delim
26565LDSHARED!$LDSHARED$ac_delim
26566BLDSHARED!$BLDSHARED$ac_delim
26567CCSHARED!$CCSHARED$ac_delim
26568LINKFORSHARED!$LINKFORSHARED$ac_delim
26569CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026571
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026572 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026573 break
26574 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026575 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26576echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026577 { (exit 1); exit 1; }; }
26578 else
26579 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026580 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026581done
26582
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026583ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26584if test -n "$ac_eof"; then
26585 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26586 ac_eof=`expr $ac_eof + 1`
26587fi
26588
26589cat >>$CONFIG_STATUS <<_ACEOF
26590cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26591/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026592_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026593sed '
26594s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26595s/^/s,@/; s/!/@,|#_!!_#|/
26596:n
26597t n
26598s/'"$ac_delim"'$/,g/; t
26599s/$/\\/; p
26600N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26601' >>$CONFIG_STATUS <conf$$subs.sed
26602rm -f conf$$subs.sed
26603cat >>$CONFIG_STATUS <<_ACEOF
26604CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026605_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026606
26607
26608ac_delim='%!_!# '
26609for ac_last_try in false false false false false :; do
26610 cat >conf$$subs.sed <<_ACEOF
26611SHLIBS!$SHLIBS$ac_delim
26612USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26613SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26614USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26615LDLAST!$LDLAST$ac_delim
26616THREADOBJ!$THREADOBJ$ac_delim
26617DLINCLDIR!$DLINCLDIR$ac_delim
26618DYNLOADFILE!$DYNLOADFILE$ac_delim
26619MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26620TRUE!$TRUE$ac_delim
26621LIBOBJS!$LIBOBJS$ac_delim
26622HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26623HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26624HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26625HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26626HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26627LIBM!$LIBM$ac_delim
26628LIBC!$LIBC$ac_delim
26629THREADHEADERS!$THREADHEADERS$ac_delim
26630SRCDIRS!$SRCDIRS$ac_delim
26631LTLIBOBJS!$LTLIBOBJS$ac_delim
26632_ACEOF
26633
26634 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26635 break
26636 elif $ac_last_try; then
26637 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26638echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026639 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026640 else
26641 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26642 fi
26643done
26644
26645ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26646if test -n "$ac_eof"; then
26647 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26648 ac_eof=`expr $ac_eof + 1`
26649fi
26650
26651cat >>$CONFIG_STATUS <<_ACEOF
26652cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26653/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026654_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026655sed '
26656s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26657s/^/s,@/; s/!/@,|#_!!_#|/
26658:n
26659t n
26660s/'"$ac_delim"'$/,g/; t
26661s/$/\\/; p
26662N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26663' >>$CONFIG_STATUS <conf$$subs.sed
26664rm -f conf$$subs.sed
26665cat >>$CONFIG_STATUS <<_ACEOF
26666:end
26667s/|#_!!_#|//g
26668CEOF$ac_eof
26669_ACEOF
26670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026671
26672# VPATH may cause trouble with some makes, so we remove $(srcdir),
26673# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26674# trailing colons and then remove the whole line if VPATH becomes empty
26675# (actually we leave an empty line to preserve line numbers).
26676if test "x$srcdir" = x.; then
26677 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26678s/:*\$(srcdir):*/:/
26679s/:*\${srcdir}:*/:/
26680s/:*@srcdir@:*/:/
26681s/^\([^=]*=[ ]*\):*/\1/
26682s/:*$//
26683s/^[^=]*=[ ]*$//
26684}'
26685fi
26686
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026687cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026688fi # test -n "$CONFIG_FILES"
26689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026690
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026691for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026692do
26693 case $ac_tag in
26694 :[FHLC]) ac_mode=$ac_tag; continue;;
26695 esac
26696 case $ac_mode$ac_tag in
26697 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026698 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26699echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026700 { (exit 1); exit 1; }; };;
26701 :[FH]-) ac_tag=-:-;;
26702 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26703 esac
26704 ac_save_IFS=$IFS
26705 IFS=:
26706 set x $ac_tag
26707 IFS=$ac_save_IFS
26708 shift
26709 ac_file=$1
26710 shift
26711
26712 case $ac_mode in
26713 :L) ac_source=$1;;
26714 :[FH])
26715 ac_file_inputs=
26716 for ac_f
26717 do
26718 case $ac_f in
26719 -) ac_f="$tmp/stdin";;
26720 *) # Look for the file first in the build tree, then in the source tree
26721 # (if the path is not absolute). The absolute path cannot be DOS-style,
26722 # because $ac_f cannot contain `:'.
26723 test -f "$ac_f" ||
26724 case $ac_f in
26725 [\\/$]*) false;;
26726 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26727 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026728 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26729echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026730 { (exit 1); exit 1; }; };;
26731 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026732 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026733 done
26734
26735 # Let's still pretend it is `configure' which instantiates (i.e., don't
26736 # use $as_me), people would be surprised to read:
26737 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026738 configure_input="Generated from "`IFS=:
26739 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026740 if test x"$ac_file" != x-; then
26741 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026742 { echo "$as_me:$LINENO: creating $ac_file" >&5
26743echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026744 fi
26745
26746 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026747 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026748 esac
26749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026750 esac
26751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026752 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026753$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026754 X"$ac_file" : 'X\(//\)[^/]' \| \
26755 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026756 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026757echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026758 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26759 s//\1/
26760 q
26761 }
26762 /^X\(\/\/\)[^/].*/{
26763 s//\1/
26764 q
26765 }
26766 /^X\(\/\/\)$/{
26767 s//\1/
26768 q
26769 }
26770 /^X\(\/\).*/{
26771 s//\1/
26772 q
26773 }
26774 s/.*/./; q'`
26775 { as_dir="$ac_dir"
26776 case $as_dir in #(
26777 -*) as_dir=./$as_dir;;
26778 esac
26779 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026780 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026781 while :; do
26782 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026783 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026784 *) as_qdir=$as_dir;;
26785 esac
26786 as_dirs="'$as_qdir' $as_dirs"
26787 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026788$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026789 X"$as_dir" : 'X\(//\)[^/]' \| \
26790 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026791 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026792echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026793 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26794 s//\1/
26795 q
26796 }
26797 /^X\(\/\/\)[^/].*/{
26798 s//\1/
26799 q
26800 }
26801 /^X\(\/\/\)$/{
26802 s//\1/
26803 q
26804 }
26805 /^X\(\/\).*/{
26806 s//\1/
26807 q
26808 }
26809 s/.*/./; q'`
26810 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026811 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026812 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026813 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26814echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026815 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026816 ac_builddir=.
26817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026818case "$ac_dir" in
26819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26820*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026821 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026823 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026824 case $ac_top_builddir_sub in
26825 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26826 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26827 esac ;;
26828esac
26829ac_abs_top_builddir=$ac_pwd
26830ac_abs_builddir=$ac_pwd$ac_dir_suffix
26831# for backward compatibility:
26832ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026833
26834case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026835 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026836 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026837 ac_top_srcdir=$ac_top_builddir_sub
26838 ac_abs_top_srcdir=$ac_pwd ;;
26839 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026840 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026841 ac_top_srcdir=$srcdir
26842 ac_abs_top_srcdir=$srcdir ;;
26843 *) # Relative name.
26844 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26845 ac_top_srcdir=$ac_top_build_prefix$srcdir
26846 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026847esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026849
Martin v. Löwis11437992002-04-12 09:54:03 +000026850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851 case $ac_mode in
26852 :F)
26853 #
26854 # CONFIG_FILE
26855 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026856
26857 case $INSTALL in
26858 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026859 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026860 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026861_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026862
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026863cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026864# If the template does not know about datarootdir, expand it.
26865# FIXME: This hack should be removed a few years after 2.60.
26866ac_datarootdir_hack=; ac_datarootdir_seen=
26867
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026868case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026869 p
26870 q
26871}
26872/@datadir@/p
26873/@docdir@/p
26874/@infodir@/p
26875/@localedir@/p
26876/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026877' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026878*datarootdir*) ac_datarootdir_seen=yes;;
26879*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026880 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26881echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026882_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026883cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026884 ac_datarootdir_hack='
26885 s&@datadir@&$datadir&g
26886 s&@docdir@&$docdir&g
26887 s&@infodir@&$infodir&g
26888 s&@localedir@&$localedir&g
26889 s&@mandir@&$mandir&g
26890 s&\\\${datarootdir}&$datarootdir&g' ;;
26891esac
26892_ACEOF
26893
26894# Neutralize VPATH when `$srcdir' = `.'.
26895# Shell code in configure.ac might set extrasub.
26896# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026897cat >>$CONFIG_STATUS <<_ACEOF
26898 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026899$extrasub
26900_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026901cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026902:t
26903/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026904s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026905s&@top_builddir@&$ac_top_builddir_sub&;t t
26906s&@srcdir@&$ac_srcdir&;t t
26907s&@abs_srcdir@&$ac_abs_srcdir&;t t
26908s&@top_srcdir@&$ac_top_srcdir&;t t
26909s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26910s&@builddir@&$ac_builddir&;t t
26911s&@abs_builddir@&$ac_abs_builddir&;t t
26912s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26913s&@INSTALL@&$ac_INSTALL&;t t
26914$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026915" $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 +000026916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026917test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26918 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26919 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026920 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026921which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026922echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026923which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026926 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026927 -) cat "$tmp/out"; rm -f "$tmp/out";;
26928 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26929 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026930 ;;
26931 :H)
26932 #
26933 # CONFIG_HEADER
26934 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026935_ACEOF
26936
26937# Transform confdefs.h into a sed script `conftest.defines', that
26938# substitutes the proper values into config.h.in to produce config.h.
26939rm -f conftest.defines conftest.tail
26940# First, append a space to every undef/define line, to ease matching.
26941echo 's/$/ /' >conftest.defines
26942# Then, protect against being on the right side of a sed subst, or in
26943# an unquoted here document, in config.status. If some macros were
26944# called several times there might be several #defines for the same
26945# symbol, which is useless. But do not sort them, since the last
26946# AC_DEFINE must be honored.
26947ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26948# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26949# NAME is the cpp macro being defined, VALUE is the value it is being given.
26950# PARAMS is the parameter list in the macro definition--in most cases, it's
26951# just an empty string.
26952ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26953ac_dB='\\)[ (].*,\\1define\\2'
26954ac_dC=' '
26955ac_dD=' ,'
26956
26957uniq confdefs.h |
26958 sed -n '
26959 t rset
26960 :rset
26961 s/^[ ]*#[ ]*define[ ][ ]*//
26962 t ok
26963 d
26964 :ok
26965 s/[\\&,]/\\&/g
26966 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26967 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26968 ' >>conftest.defines
26969
26970# Remove the space that was appended to ease matching.
26971# Then replace #undef with comments. This is necessary, for
26972# example, in the case of _POSIX_SOURCE, which is predefined and required
26973# on some systems where configure will not decide to define it.
26974# (The regexp can be short, since the line contains either #define or #undef.)
26975echo 's/ $//
26976s,^[ #]*u.*,/* & */,' >>conftest.defines
26977
26978# Break up conftest.defines:
26979ac_max_sed_lines=50
26980
26981# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26982# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26983# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26984# et cetera.
26985ac_in='$ac_file_inputs'
26986ac_out='"$tmp/out1"'
26987ac_nxt='"$tmp/out2"'
26988
26989while :
26990do
26991 # Write a here document:
26992 cat >>$CONFIG_STATUS <<_ACEOF
26993 # First, check the format of the line:
26994 cat >"\$tmp/defines.sed" <<\\CEOF
26995/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26996/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26997b
26998:def
26999_ACEOF
27000 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27001 echo 'CEOF
27002 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27003 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27004 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27005 grep . conftest.tail >/dev/null || break
27006 rm -f conftest.defines
27007 mv conftest.tail conftest.defines
27008done
27009rm -f conftest.defines conftest.tail
27010
27011echo "ac_result=$ac_in" >>$CONFIG_STATUS
27012cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027013 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027014 echo "/* $configure_input */" >"$tmp/config.h"
27015 cat "$ac_result" >>"$tmp/config.h"
27016 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27017 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27018echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027019 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027020 rm -f $ac_file
27021 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027022 fi
27023 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027024 echo "/* $configure_input */"
27025 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027026 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027027 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027028 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027030
27031 esac
27032
27033done # for ac_tag
27034
Guido van Rossum627b2d71993-12-24 10:39:16 +000027035
Martin v. Löwis11437992002-04-12 09:54:03 +000027036{ (exit 0); exit 0; }
27037_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027038chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027039ac_clean_files=$ac_clean_files_save
27040
27041
27042# configure is writing to config.log, and then calls config.status.
27043# config.status does its own redirection, appending to config.log.
27044# Unfortunately, on DOS this fails, as config.log is still kept open
27045# by configure, so config.status won't be able to write to it; its
27046# output is simply discarded. So we exec the FD to /dev/null,
27047# effectively closing config.log, so it can be properly (re)opened and
27048# appended to by config.status. When coming back to configure, we
27049# need to make the FD available again.
27050if test "$no_create" != yes; then
27051 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027052 ac_config_status_args=
27053 test "$silent" = yes &&
27054 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027055 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027056 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027057 exec 5>>config.log
27058 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27059 # would make configure fail if this is the last instruction.
27060 $ac_cs_success || { (exit 1); exit 1; }
27061fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027062
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027063
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027064echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027065if test ! -f Modules/Setup
27066then
27067 cp $srcdir/Modules/Setup.dist Modules/Setup
27068fi
27069
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027070echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027071if test ! -f Modules/Setup.local
27072then
27073 echo "# Edit this file for local setup changes" >Modules/Setup.local
27074fi
27075
27076echo "creating Makefile"
27077$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27078 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027079 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027080mv config.c Modules